/* Honeyguide wizard — mobile-first. Palette: jungle green, warm sand, honey gold. */
:root {
  --green: #1a3a2a;
  --green-mid: #2d6a4f;
  --sand: #f6f0e4;
  --honey: #d9a441;
  --honey-deep: #b5811f;
  --ink: #232a20;
  --card: #ffffff;
  --muted: #6b7263;
  --danger: #b3402a;
  --ok: #2d6a4f;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(26, 58, 42, 0.10);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--sand);
  color: var(--ink);
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .display {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  color: var(--green);
  line-height: 1.2;
  margin: 0 0 0.4em;
}
h1 { font-size: 1.9rem; font-weight: 600; }
h2 { font-size: 1.35rem; font-weight: 600; }
p { margin: 0 0 0.9em; }
.muted { color: var(--muted); font-size: 0.92rem; }

.topbar {
  background: var(--green);
  color: #fff;
  padding: 12px 16px 8px;
}
.topbar .brand {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand .bird { font-size: 1.2rem; }

/* Signature: the flight path. A dotted line across six milestones; the bird
   marker sits over the active one. */
.flightpath {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 10px 2px 2px;
  position: relative;
}
.flightpath::before {
  content: "";
  position: absolute;
  left: 10px; right: 10px; top: 50%;
  border-top: 2px dotted rgba(255, 255, 255, 0.35);
}
.flightpath .stop {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.35);
  position: relative;
  z-index: 1;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.62rem; color: rgba(255,255,255,0.8);
  transition: background 0.3s, border-color 0.3s;
}
.flightpath .stop.done { background: var(--honey); border-color: var(--honey); color: var(--green); }
.flightpath .stop.active {
  background: #fff; border-color: var(--honey); color: transparent;
}
.flightpath .stop.active::after {
  content: "🐦";
  position: absolute;
  top: -20px; left: 50%;
  transform: translateX(-50%);
  font-size: 1rem;
  animation: hover-bird 2.2s ease-in-out infinite;
}
@keyframes hover-bird {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-4px); }
}
@media (prefers-reduced-motion: reduce) {
  .flightpath .stop.active::after { animation: none; }
  * { transition: none !important; }
}

main { max-width: 560px; margin: 0 auto; padding: 18px 16px 60px; }
.screen { display: none; }
.screen.visible { display: block; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 14px;
}

label { display: block; font-weight: 600; font-size: 0.9rem; margin: 12px 0 4px; }
label .opt { font-weight: 400; color: var(--muted); }
input[type="text"], input[type="date"], input[type="tel"], input[type="email"],
input[type="number"], input[type="month"], select, textarea {
  width: 100%;
  padding: 12px;
  border: 1.5px solid #d8d2c2;
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
}
input:focus, select:focus, textarea:focus, button:focus-visible {
  outline: 3px solid rgba(217, 164, 65, 0.55);
  outline-offset: 1px;
  border-color: var(--honey-deep);
}
textarea { min-height: 140px; resize: vertical; }
.field-error { color: var(--danger); font-size: 0.85rem; margin-top: 3px; }
input.bad, select.bad, textarea.bad { border-color: var(--danger); }

button {
  font-family: inherit;
  font-size: 1.05rem;
  border: none;
  border-radius: 12px;
  padding: 14px 20px;
  cursor: pointer;
}
.btn-primary {
  background: var(--green-mid);
  color: #fff;
  width: 100%;
  font-weight: 600;
  margin-top: 14px;
}
.btn-primary:active { background: var(--green); }
.btn-primary:disabled { background: #a9b3a6; cursor: default; }
.btn-secondary {
  background: transparent;
  border: 1.5px solid var(--green-mid);
  color: var(--green-mid);
  width: 100%;
  margin-top: 8px;
}
.btn-small { padding: 8px 12px; font-size: 0.9rem; width: auto; margin: 0; }
.btn-danger-ghost { background: transparent; border: 1.5px solid var(--danger); color: var(--danger); }

.lang-toggle { display: flex; gap: 10px; margin: 14px 0; }
.lang-toggle button {
  flex: 1;
  background: #fff;
  border: 2px solid #d8d2c2;
  font-weight: 600;
  padding: 16px;
}
.lang-toggle button.on { border-color: var(--honey-deep); background: #fdf6e7; color: var(--green); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.chips button {
  background: #fff;
  border: 1.5px solid #d8d2c2;
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 0.92rem;
}
.chips button.on { background: var(--green-mid); border-color: var(--green-mid); color: #fff; }

.consent { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 4px; }
.consent input { width: 22px; height: 22px; margin-top: 2px; }
.consent span { font-size: 0.88rem; color: var(--muted); }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

.steps-mini { color: var(--muted); font-size: 0.85rem; margin-bottom: 6px; letter-spacing: 0.04em; text-transform: uppercase; }
.work-entry { border: 1.5px solid #e6dfd0; border-radius: 10px; padding: 12px; margin: 10px 0; position: relative; }
.work-entry .remove { position: absolute; top: 8px; right: 8px; }

video, .selfie-preview { width: 100%; border-radius: var(--radius); background: #000; }
.selfie-frame { position: relative; }
.selfie-frame::after {
  content: "";
  position: absolute; inset: 8% 18%;
  border: 3px dashed rgba(255,255,255,0.65);
  border-radius: 50% 50% 46% 46% / 60% 60% 40% 40%;
  pointer-events: none;
}

.q-card .question {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.15rem;
  color: var(--green);
  white-space: pre-wrap;
}
.progress-mini { font-size: 0.85rem; color: var(--muted); margin-bottom: 8px; }
.charcount { text-align: right; font-size: 0.8rem; color: var(--muted); }

/* verbal */
.speak-row { display: flex; align-items: center; gap: 10px; margin: 12px 0; }
.btn-speak { background: #fdf6e7; border: 1.5px solid var(--honey-deep); color: var(--honey-deep); border-radius: 999px; padding: 10px 16px; }
.btn-record {
  width: 100%;
  background: var(--honey);
  color: var(--green);
  font-weight: 700;
  font-size: 1.1rem;
  padding: 18px;
  border-radius: 999px;
}
.btn-record.recording { background: var(--danger); color: #fff; animation: pulse 1.2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.75; } }
.transcript-box { background: #faf7ef; border-radius: 10px; padding: 12px; min-height: 60px; font-size: 0.95rem; }

/* puzzles */
.puzzle-head { display: flex; justify-content: space-between; align-items: baseline; }
.seq-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: center; margin: 14px 0; }
.seq-cell {
  background: #faf7ef;
  border-radius: 10px;
  padding: 6px;
  min-width: 56px; min-height: 56px;
  display: flex; align-items: center; justify-content: center;
}
.seq-q { font-size: 1.6rem; color: var(--honey-deep); font-weight: 700; }
.opt-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 10px; }
.opt-grid button, .mem-grid button {
  background: #fff;
  border: 2px solid #d8d2c2;
  border-radius: 10px;
  padding: 10px;
  min-height: 64px;
  display: flex; align-items: center; justify-content: center;
}
.opt-grid button.picked, .mem-grid button.picked { border-color: var(--green-mid); background: #eef5f0; }
.mem-grid { display: grid; gap: 8px; margin: 14px auto; max-width: 320px; }
.mem-grid button { aspect-ratio: 1; min-height: 0; }
.mem-grid button.lit { background: var(--honey); border-color: var(--honey-deep); }
.sym-key { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; background: #faf7ef; border-radius: 10px; padding: 10px; }
.sym-key div { text-align: center; min-width: 44px; }
.sym-key .s { font-size: 1.4rem; }
.sym-key .d { font-weight: 700; color: var(--green-mid); }
.sym-run { display: flex; gap: 6px; justify-content: center; font-size: 1.7rem; margin: 12px 0; flex-wrap: wrap; }
.digit-pad { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.digit-pad button { background: #fff; border: 2px solid #d8d2c2; border-radius: 10px; font-size: 1.2rem; padding: 12px 0; }
.sym-entry { font-size: 1.5rem; letter-spacing: 0.2em; text-align: center; min-height: 2.2rem; margin: 8px 0; }
.timer { text-align: center; font-weight: 700; color: var(--honey-deep); }
.feedback { text-align: center; font-weight: 700; padding: 8px; border-radius: 10px; margin-top: 10px; }
.feedback.good { color: var(--ok); background: #eef5f0; }
.feedback.bad { color: var(--danger); background: #f9ece8; }
.series-row { display: flex; gap: 10px; justify-content: center; font-size: 1.5rem; font-weight: 600; color: var(--green); margin: 14px 0; flex-wrap: wrap; }

.toast {
  position: fixed;
  bottom: 16px; left: 50%;
  transform: translateX(-50%);
  background: var(--green);
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  max-width: 90%;
  z-index: 50;
}
.toast.error { background: var(--danger); }
.hidden { display: none !important; }

.finish-hero { text-align: center; padding: 30px 10px; }
.finish-hero .bird { font-size: 3rem; }
.intro-list { list-style: none; padding: 0; margin: 0 0 6px; }
.intro-list li { display: flex; gap: 10px; align-items: baseline; padding: 6px 0; }
.intro-list .n {
  background: var(--honey); color: var(--green);
  border-radius: 50%; width: 24px; height: 24px; flex: 0 0 24px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.8rem;
}
@media (min-width: 600px) {
  h1 { font-size: 2.3rem; }
  main { padding-top: 26px; }
}
