/* Mobile-first styling for the quiz invitation.
   Light and dark via prefers-color-scheme. No external fonts or assets. */

:root {
  --bg: #f7f4ef;
  --surface: #ffffff;
  --text: #1c1813;
  --muted: #5c5346;
  --border: #ddd4c7;
  --accent: #b2401f;
  --accent-text: #ffffff;
  --ok: #1f7a3d;
  --ok-bg: #e4f3e8;
  --no: #b3261e;
  --no-bg: #fbe4e2;
  --radius: 14px;
  --maxw: 560px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16130f;
    --surface: #211d17;
    --text: #f1ece3;
    --muted: #b3a894;
    --border: #3a342b;
    --accent: #e8825e;
    --accent-text: #1c1206;
    --ok: #6ddf94;
    --ok-bg: #16331f;
    --no: #ff9a90;
    --no-bg: #3a1a17;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  padding:
    env(safe-area-inset-top)
    env(safe-area-inset-right)
    env(safe-area-inset-bottom)
    env(safe-area-inset-left);
}

#app {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 20px 18px 48px;
}

h1 { font-size: 1.7rem; line-height: 1.2; margin: 0.3em 0; }
h2 { font-size: 1.3rem; margin: 0.6em 0 0.3em; }
p { margin: 0.5em 0; }

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

/* ---- buttons ---- */
.btn {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 14px 18px;
  margin: 14px 0 0;
  border: 0;
  border-radius: var(--radius);
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
}
.btn-primary { background: var(--accent); color: var(--accent-text); }
.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--border);
}
.btn:active { transform: translateY(1px); }

.link-btn {
  display: inline-block;
  min-height: 48px;
  background: none;
  border: 0;
  color: var(--accent);
  font-size: 1rem;
  text-decoration: underline;
  cursor: pointer;
  padding: 12px 0;
}
.top-link { margin-bottom: 4px; }

/* ---- forms ---- */
label {
  display: block;
  margin: 16px 0 6px;
  font-weight: 600;
}
input[type="text"],
input[type="number"],
textarea {
  width: 100%;
  font-size: 16px; /* keeps iOS from zooming on focus */
  padding: 13px 14px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
}
textarea { resize: vertical; }
input:focus, textarea:focus, .btn:focus-visible, .option:focus-visible, .link-btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.field-error {
  color: var(--no);
  font-weight: 600;
  margin-top: 8px;
}

/* stepper for number of eaters */
.stepper { display: flex; align-items: stretch; gap: 10px; }
.stepper input {
  text-align: center;
  max-width: 100px;
  -moz-appearance: textfield;
}
.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.step-btn {
  min-width: 52px;
  min-height: 52px;
  font-size: 1.5rem;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

/* honeypot stays out of sight and off the tab order */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---- photos ---- */
.intro-photo {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--border);
}
.quiz-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--border);
  display: block;
}

.subtitle { color: var(--muted); font-size: 1.05rem; }

/* ---- quiz progress ---- */
.progress-row { display: flex; align-items: center; gap: 12px; margin: 6px 0 12px; }
.progress-row span { font-weight: 600; white-space: nowrap; }
.progress-bar {
  flex: 1;
  height: 10px;
  background: var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 0.25s ease;
}

/* ---- options ---- */
.options { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.option {
  min-height: 56px;
  padding: 14px;
  font-size: 1.15rem;
  font-weight: 600;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.option:disabled { cursor: default; opacity: 1; }
.option.correct { background: var(--ok-bg); border-color: var(--ok); color: var(--text); }
.option.wrong { background: var(--no-bg); border-color: var(--no); color: var(--text); }

.feedback { font-weight: 700; font-size: 1.1rem; margin-top: 14px; }
.feedback.ok { color: var(--ok); }
.feedback.no { color: var(--no); }
.anecdote { color: var(--muted); font-style: italic; }

/* ---- score ---- */
.score-headline { font-size: 2rem; }
.band-text { font-size: 1.15rem; }

/* ---- gallery ---- */
.gallery-item { margin: 0 0 28px; }
.gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--border);
  display: block;
}
.gallery-alt { font-weight: 700; font-size: 1.15rem; margin: 10px 0 2px; }
.gallery-anecdote { color: var(--muted); font-style: italic; margin: 4px 0 0; }

/* ---- invitation ---- */
.invitation-text p { font-size: 1.1rem; }
.inv-when { font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--border); margin: 28px 0; }
a { color: var(--accent); }
