/* Matches the My Bible Quest phone mockup: Baloo 2 headings, Nunito text,
   cream background, teal buttons, gold "Most popular", red only for the child's name. */
:root {
  --cream: #FBF6EE;
  --peach: #FFF3E6;
  --ink: #3B2A1A;
  --muted: #6B5A4C;
  --line: #E8DCCB;
  --field: #CDBFAE;
  --teal: #1D6B6E;
  --teal-dark: #134B4D;
  --teal-soft: #E3EFEE;
  --gold: #FFD23F;
  --name-red: #B04A3A;
  --error-bg: #FFF4CC;
  --error-line: #E8C65A;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--cream); color: var(--ink);
  font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 17px; line-height: 1.5;
}
a { color: var(--teal); }
@media (hover: hover) { a:hover { color: var(--teal-dark); } }
[hidden] { display: none !important; }

.app { max-width: 480px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; background: var(--cream); }
form { flex: 1 0 auto; display: flex; flex-direction: column; }

/* Header: Back · brand · Step X of 3, then the progress track */
.bar { padding: 14px 20px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; position: sticky; top: 0; background: var(--cream); z-index: 2; }
.bar-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; }
.back {
  min-height: 44px; padding: 0 4px 0 0; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: 16px; color: var(--teal); text-decoration: underline;
}
.brand { font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: 20px; color: var(--teal); }
.stepcount { font-size: 15px; color: var(--muted); white-space: nowrap; }
.track { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.track-fill { height: 8px; width: 33%; border-radius: 4px; background: var(--teal); transition: width 0.25s; }

/* Each step's content */
.step { flex: 1 0 auto; }
.body { padding: 26px 20px 12px; display: flex; flex-direction: column; gap: 14px; }
.center { text-align: center; align-items: center; }
h1 { margin: 0; font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: 30px; line-height: 1.15; }
h2 { margin: 10px 0 0; font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: 22px; line-height: 1.2; }
.welcome { margin: 0; color: var(--teal); font-weight: 700; }
.muted { margin: 0; color: var(--muted); }
.small { font-size: 15px; }
.strong { margin: 0; font-weight: 700; }
.lead { margin: 0; font-size: 19px; }
.kidname { color: var(--name-red); }

label { font-weight: 700; font-size: 16px; }
input[type="text"], input[type="email"] {
  height: 52px; padding: 0 16px; font-size: 18px; width: 100%;
  border: 1.5px solid var(--field); border-radius: 12px; background: #FFFFFF;
  font-family: inherit; color: var(--ink);
}
input[type="text"]:focus, input[type="email"]:focus { outline: 3px solid rgba(29, 107, 110, 0.35); border-color: var(--teal); }

/* Name check, as on the mockup's checkout */
.namecheck {
  padding: 16px; background: #FFFFFF; border: 1px solid var(--line); border-radius: 14px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.namecheck .small { color: var(--muted); }
.bigname { font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: 44px; line-height: 1.1; color: var(--name-red); text-align: center; word-break: break-word; }
.check { display: flex; gap: 12px; align-items: flex-start; min-height: 44px; cursor: pointer; }
.check input { width: 24px; height: 24px; margin: 2px 0 0; flex: 0 0 24px; accent-color: var(--teal); }
.namecheck .check { align-items: center; }
.consent { font-weight: 400; margin-top: 6px; }

/* Girl / Boy */
.group { border: 0; margin: 0; padding: 0; }
.group legend { font-weight: 700; font-size: 16px; margin-bottom: 10px; padding: 0; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pill {
  min-height: 56px; display: flex; align-items: center; justify-content: center; gap: 8px;
  border: 1.5px solid var(--field); border-radius: 12px; background: #FFFFFF; cursor: pointer;
}
.pill input, .stylerow input { width: 22px; height: 22px; accent-color: var(--teal); }
.pill:has(input:checked) { border: 2px solid var(--teal); background: var(--teal-soft); }
.pill:has(input:focus-visible), .stylecard:has(input:focus-visible) { outline: 3px solid rgba(29, 107, 110, 0.35); }

/* Art style cards */
.stylecard {
  display: flex; flex-direction: column; border: 2px solid var(--field); border-radius: 16px;
  background: #FFFFFF; overflow: hidden; cursor: pointer; font-weight: 400;
}
.stylecard:has(input:checked) { border: 3px solid var(--teal); }
.stylecard img { width: 100%; height: 210px; object-fit: cover; display: block; }
.stylerow { padding: 12px 16px; display: flex; gap: 12px; align-items: center; min-height: 56px; }
.stylerow input { flex: 0 0 24px; width: 24px; height: 24px; }
.styletext { display: flex; flex-direction: column; }
.stylename { font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: 20px; line-height: 1.2; }
.badge {
  font-family: 'Nunito', sans-serif; font-size: 13px; font-weight: 700; color: var(--ink);
  background: var(--gold); border-radius: 10px; padding: 2px 8px; margin-left: 6px; vertical-align: middle;
}

/* Photo picker */
.pick {
  min-height: 150px; border: 2px dashed var(--teal); border-radius: 16px; background: #FFFFFF;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: 20px; color: var(--teal);
  cursor: pointer; text-align: center; padding: 12px;
}
@media (hover: hover) { .pick:hover { background: var(--teal-soft); } }
#photo:focus-visible + .pick { outline: 3px solid rgba(29, 107, 110, 0.35); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.preview { width: 170px; height: 210px; object-fit: cover; border-radius: 12px; align-self: center; border: 4px solid #FFFFFF; box-shadow: 0 4px 12px rgba(59, 42, 26, 0.15); }

.tips { display: flex; flex-direction: column; gap: 10px; }
.tip { margin: 0; display: flex; gap: 10px; align-items: center; }
.tip svg { color: var(--teal); flex: 0 0 22px; }

.promise { padding: 16px; background: var(--teal-soft); border-radius: 14px; display: flex; gap: 12px; align-items: flex-start; color: var(--teal); }
.promise svg { flex: 0 0 26px; }
.promise p { margin: 0; font-size: 16px; color: var(--ink); }

/* Bottom button area */
.footer-cta { padding: 16px 20px 28px; display: flex; flex-direction: column; gap: 12px; position: sticky; bottom: 0; background: var(--cream); border-top: 1px solid var(--line); }
.go {
  width: 100%; min-height: 56px; border: 0; border-radius: 14px; background: var(--teal); color: #FFFFFF;
  font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: 20px; cursor: pointer;
}
@media (hover: hover) { .go:hover { background: var(--teal-dark); } }
.go:disabled { opacity: 0.6; cursor: wait; }
.help { margin: 0; text-align: center; font-size: 14px; color: var(--muted); }
.error {
  margin: 0; padding: 12px 14px; border-radius: 12px;
  background: var(--error-bg); color: var(--ink); font-weight: 700; border: 1.5px solid var(--error-line);
}
.progress { display: flex; flex-direction: column; gap: 6px; }
.progress .small { margin: 0; color: var(--muted); }

/* Done */
.donemark { color: var(--teal); margin-top: 20px; }
.done p { margin: 0; }
.linkbtn { border: 0; background: none; padding: 0; font: inherit; color: var(--teal); text-decoration: underline; cursor: pointer; min-height: 44px; }
.done:focus { outline: none; }
