/* hi bubbie's signup (APR-240): the website's look (cream, ink, coral; Fraunces SOFT headings,
   DM Sans body), as in the mockup APR-240 links. Back arrow, logo and "Save and
   exit" on top, a progress bar that starts part-filled, one big button pinned to the bottom.
   One look on purpose (hi bubbie is cream), so no dark theme. */
:root {
  --cream: #FEF9ED;
  --ink: #2A1410;
  --ink-soft: #4B3A33;
  --muted: #6F5F55;
  --line: #EADFCB;
  --card: #FFFFFF;
  --coral: #E5483D;
  --coral-dark: #CC3A30;
  --coral-tint: #FCE4DF;
  --check-bg: #FFF3DA;
  --check-line: #E8C77E;
  --check-ink: #7A4E00;
  --bad: #B3261E;
  --shadow: 0 6px 18px rgba(74, 40, 20, 0.10), 0 1px 3px rgba(74, 40, 20, 0.08);
  --font-head: "Fraunces", Georgia, serif;
  --font-body: "DM Sans", system-ui, -apple-system, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { background: var(--cream); color: var(--ink); margin: 0; }
body { font-family: var(--font-body); font-size: 17px; line-height: 1.45; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--cream); }
a { color: var(--coral-dark); }
[hidden] { display: none !important; }
.wrap {
  max-width: 520px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 0 170px;
}

/* ---------- Top: back, logo, save and exit, progress ---------- */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--cream); padding-block: 12px 10px; display: flex; flex-direction: column; gap: 10px; }
.toprow { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 40px; }
.toprow > :first-child { justify-self: start; }
.toprow > :last-child { justify-self: end; }
.inline-form { margin: 0; display: contents; }
.iconbtn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: none; color: var(--ink); display: grid; place-items: center; cursor: pointer; padding: 0; }
.iconbtn:hover { background: #F5EBD8; }
.iconbtn svg { width: 22px; height: 22px; }
.logo { height: 28px; width: auto; mix-blend-mode: multiply; display: block; }
.linkish { background: none; border: 0; padding: 6px 0; font: inherit; font-size: 15px; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.linkish:hover { color: var(--ink); }
.textlink { background: none; border: 0; padding: 4px 0; font: inherit; font-size: 16px; font-weight: 700; color: var(--coral-dark); cursor: pointer; text-align: left; align-self: flex-start; text-decoration: none; }
.textlink:hover { text-decoration: underline; text-underline-offset: 3px; }
.center-link { align-self: center; text-align: center; }
.progress { display: flex; flex-direction: column; gap: 6px; }
.bar { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--coral); border-radius: 99px; transition: width .35s ease; }
/* Part-filled from the start: screen n of 7 fills n of 8 (no inline styles: the CSP). */
.bar .at-1 { width: 12.5%; } .bar .at-2 { width: 25%; } .bar .at-3 { width: 37.5%; }
.bar .at-4 { width: 50%; } .bar .at-5 { width: 62.5%; } .bar .at-6 { width: 75%; }
.bar .at-7 { width: 87.5%; }
.steps { display: grid; grid-template-columns: repeat(5, 1fr); font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.steps span { text-align: center; } .steps span:first-child { text-align: left; } .steps span:last-child { text-align: right; }
.steps .on { color: var(--coral-dark); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; }
/* Chips and option cards: a ring for keyboard focus only, on the pill itself. A click or tap shows none. */
label.chip input:focus-visible + span, label.option input:focus-visible + span { outline: 3px solid var(--coral); outline-offset: 2px; }

/* ---------- The screen ---------- */
.q, .stack { display: flex; flex-direction: column; gap: 22px; }
.q { padding-top: 16px; animation: in .22s ease both; }
form { margin: 0; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
/* Opacity only: a transform would trap the pinned button (position: fixed) inside the screen. */
@keyframes in { from { opacity: 0; } to { opacity: 1; } }
.head { display: grid; grid-template-columns: 1fr 72px; gap: 12px; align-items: end; }
.head > div { min-width: 0; }
.who { width: 72px; height: 72px; border-radius: 50%; background: var(--card); box-shadow: var(--shadow); overflow: hidden; position: relative; }
.who img { position: absolute; width: 185%; max-width: none; left: -42%; top: -6%; mix-blend-mode: multiply; }
h1 { font-family: var(--font-head); font-weight: 800; font-variation-settings: "SOFT" 100; font-size: clamp(28px, 7.4vw, 36px); line-height: 1.1; letter-spacing: -0.015em; margin: 0; text-wrap: balance; }
h2 { font-family: var(--font-head); font-weight: 800; font-variation-settings: "SOFT" 100; font-size: 21px; margin: 0; text-wrap: balance; }
.lead { color: var(--ink-soft); margin: 8px 0 0; max-width: 34em; }
.small { font-size: 15px; color: var(--muted); margin: 0; }
.fields { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-size: 15px; font-weight: 700; margin: 0; }
.hint { font-size: 14px; color: var(--muted); }
.error { font-size: 15px; color: var(--bad); font-weight: 500; }
input[type=text], input[type=tel], input[type=time], input[type=date], input[type=number], select {
  width: 100%; font: inherit; font-size: 18px; color: var(--ink); background: var(--card);
  border: 1.5px solid var(--line); border-radius: 14px; padding: 13px 15px; min-height: 52px;
  -webkit-appearance: none; appearance: none;
}
select { background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
input:focus, select:focus { border-color: var(--ink-soft); outline: none; }
.field.bad input, .field.bad select { border-color: var(--bad); }
.field.unsure input { background: var(--check-bg); border-color: var(--check-line); }
.field.unsure .hint { color: var(--check-ink); font-weight: 500; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.split > * { min-width: 0; }
.group { display: flex; flex-direction: column; gap: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; padding: 0; border: 0; }

.options { display: flex; flex-direction: column; gap: 10px; }
label.option { position: relative; cursor: pointer; display: block; }
label.option input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
label.option span { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 18px; border-radius: 16px; background: var(--card); border: 2px solid var(--line); font-weight: 500; font-size: 17px; }
label.option span::after { content: ""; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); flex: none; box-sizing: border-box; }
label.option input:checked + span { border-color: var(--coral); background: #FFF8F6; }
label.option input:checked + span::after { border: 7px solid var(--coral); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
label.chip { position: relative; cursor: pointer; }
label.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
label.chip span { display: inline-block; padding: 11px 17px; border-radius: 999px; border: 2px solid var(--line); background: var(--card); font-weight: 500; font-size: 17px; }
label.chip input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }

/* the paper wall calendar: tapping a day draws a coral circle round it */
.cal { margin: 0; padding: 0 0 14px; background: var(--card); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.cal-top { display: flex; align-items: center; justify-content: space-between; background: var(--coral); color: #fff; padding: 9px 14px; }
.cal-title { font-family: var(--font-head); font-weight: 800; font-variation-settings: "SOFT" 100; font-size: 17px; letter-spacing: 0.02em; }
.hole { width: 12px; height: 12px; border-radius: 50%; background: var(--cream); box-shadow: inset 0 1px 2px rgba(74, 40, 20, 0.35); }
.cal-days { display: grid; grid-template-columns: repeat(7, 1fr); padding: 12px 6px 0; }
.day { position: relative; cursor: pointer; display: block; }
.day + .day { border-left: 1px dashed var(--line); }
.day input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.day-face { position: relative; display: grid; place-items: center; height: 58px; }
.dow { font-family: var(--font-head); font-weight: 800; font-variation-settings: "SOFT" 100; font-size: clamp(15px, 4.4vw, 19px); color: var(--ink-soft); transition: color .2s ease; }
.ring { position: absolute; inset: 3px 1px; width: calc(100% - 2px); height: calc(100% - 6px); overflow: visible; pointer-events: none; }
.ring path { fill: none; stroke: var(--coral); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .45s ease-out; }
.day input:checked + .day-face .ring path { stroke-dashoffset: 0; }
.day input:checked + .day-face .dow { color: var(--coral-dark); }
.day input:focus-visible + .day-face { outline: 3px solid var(--coral); outline-offset: -2px; border-radius: 12px; }
.day:hover .dow { color: var(--ink); }
.timeselect select { cursor: pointer; font-family: var(--font-head); font-weight: 800; font-variation-settings: "SOFT" 100; font-size: 22px; padding: 14px 52px 14px 18px; min-height: 60px; border-width: 2px; border-radius: 16px; background-position: calc(100% - 26px) 50%, calc(100% - 19px) 50%; background-size: 7px 7px; }
.reveal { display: flex; flex-direction: column; gap: 14px; padding: 16px; border: 2px dashed var(--line); border-radius: 18px; }
.reveal.plain { padding: 0; border: 0; }
input.code { font-family: var(--font-head); font-weight: 800; font-size: 30px; letter-spacing: 0.35em; text-align: center; padding-left: 0.35em; min-height: 64px; }
.codelinks { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.note { display: flex; gap: 12px; align-items: flex-start; background: var(--card); border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow); font-size: 16px; color: var(--ink-soft); }
.note > svg { width: 22px; height: 22px; flex: none; color: var(--coral); margin-top: 1px; }
.note strong { color: var(--ink); }
details.tz { display: inline; }
details.tz summary { display: inline; list-style: none; cursor: pointer; font-size: 15px; white-space: nowrap; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
details.tz summary::-webkit-details-marker { display: none; }
details.tz[open] summary { display: none; }
details.tz .field { margin-top: 12px; }
.banner { margin: 0; padding: 12px 16px; border-radius: 14px; background: var(--check-bg); color: var(--check-ink); font-size: 15px; font-weight: 500; }
.banner.bad { background: var(--coral-tint); color: var(--bad); }

/* lists, photos */
.card { background: var(--card); border-radius: 20px; box-shadow: var(--shadow); padding: 6px 16px; }
.item { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.item:first-child { border-top: 0; }
.item .text { min-width: 0; display: flex; flex-direction: column; gap: 2px; color: inherit; text-decoration: none; }
.item .title { font-weight: 700; }
.pill { font: inherit; font-size: 14px; font-weight: 700; padding: 6px 12px; border-radius: 99px; white-space: nowrap; border: 0; text-decoration: none; }
.pill.warn { background: var(--check-bg); color: var(--check-ink); }
.pill.ok { background: var(--coral-tint); color: var(--coral-dark); }
.addbox { display: flex; flex-direction: column; gap: 14px; padding: 16px; border: 2px dashed var(--line); border-radius: 18px; }
.addbox h3 { margin: 0; font-size: 16px; }
.status { margin: 0; text-align: center; color: var(--ink-soft); font-size: 15px; min-height: 1em; }
.status:empty { display: none; }
.photos { display: flex; gap: 10px; overflow-x: auto; }
.photos img { height: 160px; width: auto; border-radius: 12px; border: 1px solid var(--line); background: var(--card); }
details.more summary { list-style: none; }
details.more summary::-webkit-details-marker { display: none; }
details.more[open] summary { margin-bottom: 14px; }
.stale { padding: 14px; border-radius: 16px; background: var(--check-bg); }

/* done page: the rest, after signup */
.hub { display: flex; flex-direction: column; }
.hubrow { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 15px 0; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.hubrow:first-child { border-top: 0; }
.hubrow .text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hubrow .title { font-weight: 700; }
.state { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line); color: var(--muted); }
.state.done { background: var(--coral); border-color: var(--coral); color: #fff; }
.state svg { width: 15px; height: 15px; }
.next-ask { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; background: var(--card); border-radius: 22px; box-shadow: var(--shadow); padding: 22px 18px 18px; }
.next-ask .eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--coral-dark); margin: 4px 0 0; }
.next-ask p { margin: 0; color: var(--ink-soft); max-width: 30em; }
.next-ask .btn { margin-top: 8px; }
.next-ask .chips { justify-content: center; }
.next-ask h2 { display: inline-flex; align-items: center; gap: 8px; }
.center-form { width: 100%; align-items: center; gap: 12px; }
.who.sm { width: 56px; height: 56px; }
.badge { width: 22px; height: 22px; border-radius: 50%; background: var(--coral); color: #fff; display: inline-grid; place-items: center; flex: none; }
.badge svg { width: 13px; height: 13px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; width: 100%; border-radius: 999px; border: 2px solid transparent; cursor: pointer; font-family: var(--font-head); font-weight: 800; font-variation-settings: "SOFT" 100; font-size: 19px; padding: 15px 24px; transition: background .15s ease, transform .15s ease; position: relative; color: inherit; text-decoration: none; text-align: center; }
.btn:active { transform: translateY(1px); }
.btn-coral { background: var(--coral); color: #fff; }
.btn-coral:hover { background: var(--coral-dark); }
.btn-coral:disabled { background: var(--line); color: var(--muted); cursor: not-allowed; }
.btn-outline { background: var(--card); color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: #FFF6EA; }
.btn-outline input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.actions { display: flex; flex-direction: column; gap: 10px; }
.footer { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; background: linear-gradient(to bottom, rgba(254, 249, 237, 0), var(--cream) 26%); padding-top: 26px; padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.footer-inner { max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.footer-inner form { width: 100%; display: flex; justify-content: center; }
.skip { background: none; border: 0; font: inherit; font-size: 16px; font-weight: 500; color: var(--ink-soft); padding: 8px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* review */
.sum { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.sum:first-child { border-top: 0; }
.sum h3 { margin: 0; font-size: 15px; font-weight: 700; }
.sum p { margin: 0; grid-column: 1 / -1; color: var(--ink-soft); font-size: 15px; }
.sum .linkish { padding: 0; }
.tick { display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; font-size: 15px; color: var(--ink-soft); cursor: pointer; font-weight: 400; }
.tick input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--coral); }

/* The crew's images have white backgrounds (as the website's, `build_media.py`): multiply melts
   white into what's painted under it, so the row paints the page's cream itself. With nothing
   painted under it (only the page's own background), the white showed as boxes. */
.crew { display: flex; justify-content: center; align-items: flex-end; margin: 4px auto 0; max-width: 400px; background: var(--cream); }
.crew img { width: 22%; max-width: 100%; mix-blend-mode: multiply; margin: 0 -2.5%; }
.crew img.mid { width: 26%; }
.center { text-align: center; }

/* Google's address search, under the street field */
.suggest-wrap { position: relative; }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 7; margin: 0; padding: 6px 0; list-style: none; background: var(--card); border-radius: 14px; box-shadow: var(--shadow); border: 1.5px solid var(--line); }
.suggest li { padding: 11px 15px; cursor: pointer; font-size: 16px; }
.suggest li[aria-selected="true"], .suggest li:hover { background: #FFF6EA; }
.suggest .by { font-size: 12px; color: var(--muted); text-align: right; padding: 4px 15px 2px; cursor: default; }
.suggest .by:hover { background: none; }

/* the webcam, on a computer (app.js) */
dialog.camera { border: 0; border-radius: 18px; padding: 16px; width: min(560px, calc(100vw - 32px)); background: var(--cream); color: var(--ink); }
dialog.camera::backdrop { background: rgba(42, 20, 16, 0.55); }
dialog.camera video { width: 100%; border-radius: 12px; background: #000; display: block; }
dialog.camera .note { margin: 12px 0; display: block; box-shadow: none; padding: 0; background: none; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
