/* Family Memories – Lucy Brewer Photography */
:root {
  --olive: #69663d;
  --olive-dark: #4f4d2d;
  --brown: #4d3d2c;
  --body: #5c4a38;
  --muted: #6b5a48;
  --beige: #efe5d9;
  --pink: #dca497;
  --tan: #d8b58f;
  --line: #e2d3c1;
  --field: #cdbba6;
  --dash: #b39c82;
  --white: #ffffff;
  --serif: 'Newsreader', Georgia, serif;
  --sans: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--beige); }
body { font-family: var(--sans); color: var(--brown); font-size: 16px; line-height: 1.5; -webkit-text-size-adjust: 100%; }
a { color: var(--olive); }
a:hover { color: var(--olive-dark); }
button, input, textarea { font: inherit; color: inherit; }

.screen { max-width: 480px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; padding: 28px 24px 32px; display: flex; flex-direction: column; gap: 20px; }
.screen.center { align-items: center; text-align: center; }
.logo { width: 150px; height: auto; display: block; }
.logo.small { width: 130px; }
.top { display: flex; justify-content: space-between; align-items: center; min-height: 44px; }
.back { background: none; border: none; color: var(--olive); font-size: 15px; padding: 10px 0; cursor: pointer; }
.step { font-size: 13px; color: var(--muted); }
h1 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 32px; line-height: 1.15; }
.lead { margin: 0; color: var(--body); }
.small { font-size: 14px; color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 8px; }

.card { background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.card .label { font-size: 13px; font-weight: 600; color: var(--olive); }
.card .question { font-family: var(--serif); font-size: 26px; line-height: 1.25; }
.chip { align-self: flex-start; font-size: 13px; color: var(--olive); background: var(--white); border: 1px solid var(--pink); border-radius: 999px; padding: 6px 12px; }

.btn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 56px; border-radius: 28px; border: none; background: var(--olive); color: var(--white); font-size: 17px; font-weight: 600; cursor: pointer; text-decoration: none; padding: 0 20px; }
.btn:hover { background: var(--olive-dark); color: var(--white); }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn.outline { background: transparent; color: var(--olive); border: 1.5px solid var(--olive); }
.link { display: flex; align-items: center; justify-content: center; min-height: 48px; background: none; border: none; color: var(--olive); font-size: 15px; cursor: pointer; }
.actions { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding-top: 8px; }

.year { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.month { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.dot { width: 34px; height: 34px; border-radius: 50%; background: var(--line); }
.dot.done { background: var(--olive); }
.dot.now { background: var(--white); border: 2px solid var(--olive); }
.privacy { margin-top: auto; display: flex; gap: 10px; align-items: center; font-size: 13px; line-height: 1.4; color: var(--muted); }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tile { position: relative; aspect-ratio: 1 / 1; border-radius: 14px; overflow: hidden; background: var(--tan); display: flex; align-items: center; justify-content: center; }
.tile:nth-child(even) { background: var(--pink); }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .remove { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border-radius: 50%; border: none; background: var(--white); display: flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; }
.tile.busy::after { content: ''; position: absolute; inset: 0; background: rgba(239, 229, 217, 0.55); }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid rgba(77, 61, 44, 0.25); border-top-color: var(--brown); animation: spin 0.9s linear infinite; position: relative; z-index: 1; }
@keyframes spin { to { transform: rotate(360deg); } }
.add { aspect-ratio: 1 / 1; border-radius: 14px; border: 1.5px dashed var(--dash); background: var(--white); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--olive); font-size: 14px; font-weight: 600; cursor: pointer; }
.add input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.photo-big { border-radius: 18px; overflow: hidden; background: var(--tan); min-height: 180px; max-height: 320px; display: flex; align-items: center; justify-content: center; }
.photo-big img { width: 100%; max-height: 320px; object-fit: contain; display: block; background: var(--white); }
label { font-size: 15px; font-weight: 600; line-height: 1.4; }
.field { width: 100%; min-height: 48px; border: 1px solid var(--field); border-radius: 12px; background: var(--white); padding: 12px 14px; font-size: 16px; }
textarea.field { min-height: 140px; resize: vertical; line-height: 1.5; }
.field:focus { outline: 2px solid var(--olive); outline-offset: 1px; }
.tip { display: flex; gap: 12px; align-items: flex-start; background: var(--white); border-radius: 14px; padding: 12px 14px; font-size: 14px; line-height: 1.45; }
.saved { font-size: 13px; color: var(--muted); min-height: 20px; }

.row { display: flex; gap: 14px; background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 12px; }
.thumb { flex: none; width: 76px; height: 76px; border-radius: 12px; overflow: hidden; background: var(--tan); display: flex; align-items: center; justify-content: center; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.row .text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.row .caption { font-weight: 600; font-size: 15px; }
.row .story { font-size: 14px; line-height: 1.4; color: var(--body); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.row .edit { align-self: flex-start; background: none; border: none; padding: 4px 0; color: var(--olive); font-weight: 600; font-size: 14px; cursor: pointer; }
.empty { color: var(--muted); font-style: italic; }

.tick { width: 88px; height: 88px; border-radius: 50%; background: var(--olive); display: flex; align-items: center; justify-content: center; margin-top: 80px; }
.notice { background: var(--white); border: 1px solid var(--pink); border-radius: 14px; padding: 12px 14px; font-size: 14px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); max-width: 90vw; background: var(--brown); color: var(--white); padding: 12px 18px; border-radius: 12px; font-size: 15px; z-index: 10; }
.loading { margin: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Option B: caption list, question, review strip */
.caprow { display: flex; gap: 12px; align-items: center; background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 10px; }
.caprow .text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.caplabel { font-size: 13px; font-weight: 400; color: var(--muted); }
.small-field { min-height: 42px; padding: 8px 12px; border-radius: 10px; }
.label-olive { font-size: 13px; font-weight: 600; color: var(--olive); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; }
.edit-link { flex: none; background: none; border: none; padding: 4px 0; color: var(--olive); font-weight: 600; font-size: 14px; cursor: pointer; }
.minigrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.mini { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mini-img { aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; background: var(--tan); display: flex; align-items: center; justify-content: center; }
.mini:nth-child(even) .mini-img { background: var(--pink); }
.mini-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mini-cap { font-size: 12px; line-height: 1.3; color: var(--body); overflow-wrap: anywhere; }
