/* 3gratitudes, Notebook style. Tokens come from the design canvas. */

@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(/fonts/newsreader-latin-standard-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(/fonts/newsreader-latin-ext-standard-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-display: swap;
  font-weight: 200 800;
  src: url(/fonts/newsreader-latin-standard-italic.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-display: swap;
  font-weight: 200 800;
  src: url(/fonts/newsreader-latin-ext-standard-italic.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/inter-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/inter-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --paper: #faf6ef;
  --card: #fffdf9;
  --sand: #f2ebdf;
  --ink: #2a2522;
  --ink-soft: #4a423c;
  --muted: #6f645b;
  --line: #e6dccd;
  --field: #cbbfae;
  --marigold: #e0a43a;
  --number: #8f610e;
  --link: #2f4a6d;
  --link-hover: #1d3150;
  --danger: #9b2c2c;
  --serif: "Newsreader", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.5 var(--sans); }
a { color: var(--link); }
a:hover { color: var(--link-hover); }
img { max-width: 100%; }
h1, h2 { font-family: var(--serif); font-weight: 400; margin: 0; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.stack { display: flex; flex-direction: column; gap: var(--gap, 16px); }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .inner { max-width: 1200px; margin: 0 auto; padding: 8px 12px 8px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; min-height: 44px; color: var(--ink); text-decoration: none; }
/* Public pages on wider screens: a larger logo, lined up with the home page's content. */
@media (min-width: 760px) {
  .site-header.public .inner { max-width: 1160px; padding: 10px 20px; }
  .site-header.public .brand svg { width: auto; height: 56px; }
}
.nav { display: flex; align-items: center; gap: 4px; }
.icon-button { width: 44px; height: 44px; border: none; background: none; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; cursor: pointer; }
.icon-button:hover { background: var(--sand); color: var(--ink); }
.back-link { height: 44px; display: inline-flex; align-items: center; gap: 6px; padding: 0 8px; font-size: 15px; text-decoration: none; }

.page { max-width: 640px; margin: 0 auto; padding: 16px 20px 64px; }
.page-wide { max-width: 1200px; margin: 0 auto; padding: 24px 20px 64px; }

/* Buttons and fields */
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border: none; border-radius: 10px; background: var(--ink); color: var(--paper); font: 600 15px/1 var(--sans); text-decoration: none; cursor: pointer; }
.button:hover { background: #000; color: var(--paper); }
.button.block { display: flex; width: 100%; }
.button.outline { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.button.outline:hover { background: var(--sand); }
.button.danger { background: var(--danger); color: #fff; }
.link-button { border: none; background: none; padding: 10px 0; color: var(--link); font: inherit; text-decoration: underline; cursor: pointer; }
.link-button.danger, a.danger { color: var(--danger); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label { font-size: 14px; font-weight: 600; }
.input, select.input { height: 50px; padding: 0 14px; border: 1px solid var(--field); border-radius: 10px; background: var(--card); color: var(--ink); font: 16px var(--sans); width: 100%; }
textarea.input { height: auto; padding: 12px 14px; font: 19px/1.45 var(--serif); resize: vertical; }
.input:focus, .button:focus-visible, a:focus-visible, .icon-button:focus-visible, summary:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.error { color: var(--danger); font-size: 15px; }
.toast { position: fixed; z-index: 20; left: 50%; bottom: 24px; transform: translateX(-50%); padding: 10px 18px; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 14px; box-shadow: 0 8px 24px rgba(42, 37, 34, 0.25); animation: toast 4s ease forwards; pointer-events: none; }
@keyframes toast { 0%, 80% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }
.segmented { display: flex; gap: 4px; padding: 4px; border: none; border-radius: 10px; background: var(--sand); margin: 0; }
.segmented label { flex: 1; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 8px; font-size: 14px; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segmented label:has(input:checked) { background: var(--ink); color: var(--paper); font-weight: 600; }
.segmented label:has(input:focus-visible) { outline: 2px solid var(--link); outline-offset: 2px; }
.row-fields { display: flex; gap: 12px; }
.row-fields .field { flex: 1; min-width: 0; }
.days { border: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.days legend { font-size: 14px; font-weight: 600; padding: 0 0 8px; }
.chips { display: flex; justify-content: space-between; gap: 4px; }
.chips label { flex: 1; max-width: 44px; aspect-ratio: 1; min-height: 38px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--field); border-radius: 22px; font-size: 14px; color: var(--muted); cursor: pointer; }
.chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chips label:has(input:checked) { background: var(--sand); color: var(--ink); border-color: var(--ink); }
.chips label:has(input:disabled) { cursor: default; opacity: 0.7; }
.paused { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; border-radius: 10px; background: var(--sand); font-size: 14px; }
.paused .link-button { padding: 4px 0; }
.banner { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--marigold); font-size: 15px; line-height: 1.45; }
.banner strong { font-size: 16px; }
.banner .actions { display: flex; align-items: center; gap: 16px; margin-top: 6px; }
.banner .actions .link-button { padding: 0; }
.button.small { min-height: 40px; padding: 0 16px; font-size: 14px; }
.row-actions { display: flex; align-items: center; gap: 12px; }
.row-actions .link-button { padding: 6px 0; font-size: 14px; }
.add-address { display: flex; gap: 8px; }
.add-address .button { flex: none; min-height: 50px; }
.search-box { display: flex; gap: 8px; }
.search-box .button { flex: none; min-height: 50px; }
mark { background: #f6dca6; color: inherit; border-radius: 2px; padding: 0 1px; }
.calendar-head { display: flex; align-items: center; justify-content: space-between; }
.calendar-head h1 { font-size: 30px; }
.calendar-head .icon-button { font-size: 28px; text-decoration: none; }
.calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; width: 100%; }
.calendar .weekday { text-align: center; font-size: 12px; color: var(--muted); padding-bottom: 4px; }
.calendar .cell { aspect-ratio: 1; min-width: 0; min-height: 0; overflow: hidden; display: flex; align-items: flex-start; justify-content: flex-start; padding: 6px; border-radius: 8px; font-size: 13px; color: var(--muted); background: var(--card); border: 1px solid var(--line); text-decoration: none; }
.calendar .cell.today { border-color: var(--ink); color: var(--ink); }
.calendar a.cell.blank:not(.today):hover { border-color: var(--field); color: var(--ink); }
.calendar .cell.written { background: var(--marigold); border-color: var(--marigold); color: var(--ink); font-weight: 600; }
.calendar .cell.photo { background-size: cover; background-position: center; }
.calendar .cell.photo span { background: rgba(250, 246, 239, 0.9); border-radius: 4px; padding: 0 4px; }
/* Mini calendar beside the timeline (Plus), wide screens only */
.mini-calendar { display: none; }
@media (min-width: 960px) {
  .mini-calendar { display: flex; flex-direction: column; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px 16px; }
}
.mini-head { display: flex; align-items: center; justify-content: space-between; }
.mini-title { font: italic 20px var(--serif); color: var(--ink); text-decoration: none; }
.mini-title:hover { color: var(--ink); text-decoration: underline; }
.mini-head .icon-button { font-size: 24px; text-decoration: none; }
.mini-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.mini-grid .weekday { text-align: center; font-size: 11px; color: var(--muted); }
.mini-grid > span:not(.weekday), .mini-grid > a { aspect-ratio: 1; display: grid; place-items: center; border-radius: 7px; font-size: 12px; color: var(--muted); text-decoration: none; }
.mini-grid > .level-0, .mini-grid > .blank { background: var(--sand); }
.mini-grid > .later { color: var(--field); }
.mini-grid > .today { box-shadow: inset 0 0 0 2px var(--ink); color: var(--ink); font-weight: 600; }
.mini-grid > a:hover { box-shadow: inset 0 0 0 2px var(--ink-soft); }
.mini-grid > a.blank:not(.today):hover { box-shadow: inset 0 0 0 1px var(--field); color: var(--ink); }
.level-1 { background: #f3d9a6; color: var(--ink) !important; }
.level-2 { background: #e9be6c; color: var(--ink) !important; }
.level-3 { background: var(--marigold); color: var(--ink) !important; font-weight: 600; }
.mini-foot { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--muted); }
.mini-key { display: flex; align-items: center; gap: 3px; }
.mini-key i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.mini-key .level-0 { background: var(--sand); }

.year-links { display: flex; flex-wrap: wrap; gap: 8px; }
.plus-page h1 { font-size: 40px; line-height: 1.08; letter-spacing: -0.015em; }
.plans { border: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.plans legend { font-size: 14px; font-weight: 600; padding: 0 0 10px; }
.plans label { display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--field); border-radius: 12px; background: var(--card); cursor: pointer; }
.plans label:has(input:checked) { border: 2px solid var(--ink); padding: 15px; }
.plans input { width: 20px; height: 20px; margin: 0; accent-color: var(--ink); }
.plan-text { flex: 1; display: flex; flex-direction: column; gap: 2px; font-size: 16px; }
.plan-text small { font-size: 13px; color: var(--muted); }
.button:disabled { opacity: 0.45; cursor: default; }
/* While a form sends: a ring in place of the label (or beside "Uploading…"). */
.busy { position: relative; pointer-events: none; cursor: progress; }
.busy:not(.with-text) { color: transparent !important; }
.busy::after { content: ""; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--busy, var(--paper)); border-right-color: transparent; animation: spin 0.7s linear infinite; box-sizing: border-box; }
.busy:not(.with-text)::after { position: absolute; inset: 0; margin: auto; }
.busy.with-text::after { --busy: currentColor; display: inline-block; margin-left: 10px; vertical-align: middle; }
.busy:not(.button), .button.outline.busy { --busy: var(--ink); }
.button.danger.busy { --busy: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe { 50% { opacity: 0.3; } }
@media (prefers-reduced-motion: reduce) { .busy::after { animation: breathe 1.4s ease-in-out infinite; } }
.compare { width: 100%; border-collapse: collapse; font-size: 15px; }
.compare th, .compare td { text-align: left; padding: 12px 8px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare th[scope="row"] { font-weight: 400; }
.compare thead th { border-bottom: 1px solid var(--ink); font-weight: 600; }
.compare td { width: 96px; }
.compare .plus-col { background: var(--sand); padding-left: 12px; }
.compare thead .plus-col { border-radius: 8px 8px 0 0; }
.compare .yes { color: var(--number); font-weight: 600; font-size: 17px; }
.compare .no { color: var(--field); }

/* Year book: sheets on screen, A5 pages in print. Photos are always whole. */
.book-bar { max-width: 720px; margin: 0 auto; padding: 0 0 12px; }
.book-bar p { padding: 0 20px; }
.book { display: flex; flex-direction: column; align-items: center; gap: 28px; padding: 12px 16px 48px; background: #e9e2d6; }
.sheet { width: 100%; max-width: 148mm; min-height: 210mm; box-sizing: border-box; padding: 14mm 12mm; background: var(--paper); box-shadow: 0 10px 28px rgba(42, 37, 34, 0.18); display: flex; flex-direction: column; gap: 16px; }
.sheet img { width: 100%; height: 100%; object-fit: cover; display: block; }
.book .kicker { font: 500 11px var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--number); }
.cover { align-items: center; text-align: center; gap: 18px; padding-top: 16mm; }
.cover .kicker { color: var(--muted); }
.cover-photo { flex: 1; width: 100%; min-height: 0; display: flex; align-items: center; justify-content: center; }
.polaroid-frame { box-sizing: content-box; max-width: 78%; max-height: 105mm; padding: 8px 8px 26px; background: #fffdf9; box-shadow: 0 1px 0 var(--line), 0 10px 28px rgba(42, 37, 34, 0.1); transform: rotate(-1.5deg); }
.cover-year { font: 72px/1 var(--serif); letter-spacing: -0.02em; }
.cover-name { font: italic 22px/1.2 var(--serif); color: var(--ink-soft); }
.cover-foot { font-size: 12px; color: var(--muted); }
.opener h2 { font: 56px/1 var(--serif); letter-spacing: -0.01em; }
.opener-count { font-size: 13px; color: var(--muted); }
.opener-photo { flex: 1; min-height: 60mm; display: flex; align-items: center; justify-content: center; }
.opener-photo > div { max-width: 100%; max-height: 100%; height: 100%; }
.opener blockquote { margin: 0; font: italic 18px/1.4 var(--serif); color: var(--ink-soft); }
.running-head { display: flex; justify-content: space-between; font: 10px var(--sans); letter-spacing: 0.12em; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.flow { min-height: 0; }
.book-day { break-inside: avoid; display: flex; flex-direction: column; gap: 8px; }
.book-day + .book-day { border-top: 1px solid var(--line); padding-top: 12px; }
.book-day.side { flex-direction: row; gap: 14px; align-items: flex-start; }
.side-photo { width: 30mm; flex: none; }
.book-date { display: flex; align-items: baseline; gap: 8px; }
.book-date .num { font: 30px/1 var(--serif); color: var(--number); }
.book-date .wd { font: italic 15px var(--serif); color: var(--ink-soft); }
.book-photos { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.book-photos > div { width: 100%; }
.book-photos .photo-row .cell { border-radius: 0; }
.book-items { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 3px; font: 14px/1.4 var(--serif); }
.book-items li::marker { color: var(--number); font-style: italic; }
.book-items li p + p { margin-top: 6px; }
.end { gap: 20px; }
.end h2 { font: 40px/1.05 var(--serif); }
.end-numbers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; font-size: 11px; color: var(--muted); }
.end-numbers span { display: block; font: 34px/1 var(--serif); color: var(--number); margin-bottom: 4px; }
.end-list { border-top: 1px solid var(--line); padding-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.end-list h3 { font: italic 17px var(--serif); }
.end-list p { font-size: 13px; line-height: 1.6; color: var(--ink-soft); }
.end-foot { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 6px; font: italic 15px var(--serif); color: var(--ink-soft); }
.end-foot .kicker { color: var(--muted); }
@media print {
  @page { size: A5; margin: 12mm 12mm 14mm; @bottom-center { content: counter(page); font: 9pt Georgia, serif; color: #6f645b; } }
  @page cover { margin: 0; @bottom-center { content: none; } }
  body { background: #fff; }
  .book-bar { display: none; }
  .book { display: block; padding: 0; background: none; }
  .sheet { max-width: none; width: auto; min-height: 0; height: 184mm; padding: 0; background: none; box-shadow: none; break-after: page; }
  .cover { background: var(--paper); }
  .cover { page: cover; height: 210mm; padding: 16mm 14mm 14mm; }
  .flow { display: block; height: auto; }
  .flow > * + * { margin-top: 14px; }
  .book-day { break-inside: avoid; }
  .sheet, .sheet * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; font-weight: 600; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--ink); }
.check > span { display: flex; flex-direction: column; gap: 2px; }
.check .small { font-weight: 400; }
.notice { padding: 14px 16px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); font-size: 15px; }
.badge { font-size: 12px; font-weight: 500; padding: 2px 8px; border-radius: 10px; background: var(--marigold); color: var(--ink); text-decoration: none; }

/* Sign-in */
.auth { max-width: 460px; margin: 0 auto; padding: 32px 20px 64px; display: flex; flex-direction: column; gap: 28px; }
.auth h1 { font-size: 38px; line-height: 1.1; }
.auth .lead { font-size: 17px; line-height: 1.55; color: var(--ink-soft); }
.tonight-note { padding: 18px; border-radius: 12px; background: var(--sand); }
.tonight-note .kicker { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px; }
.tonight-note .text { font: 19px/1.35 var(--serif); }
.center { text-align: center; align-items: center; }

/* Timeline */
.timeline { display: flex; flex-wrap: wrap; gap: 32px 48px; align-items: flex-start; }
.timeline aside { flex: 1 1 300px; display: flex; flex-direction: column; gap: 28px; }
.timeline main { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; }
.greeting h1 { font-size: 34px; letter-spacing: -0.01em; line-height: 1.15; }
.greeting p { margin-top: 4px; font-size: 14px; color: var(--muted); }
.tonight { padding: 20px; border-radius: 14px; background: var(--marigold); display: flex; flex-direction: column; gap: 12px; }
.tonight .kicker { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; }
.tonight .prompt { font: 24px/1.25 var(--serif); }
.tonight .hint { font-size: 13px; }
.done-today { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; font-size: 15px; font-weight: 600; }
.done-today a { font-weight: 400; font-size: 14px; color: var(--ink); }
.address-box { display: flex; align-items: center; gap: 8px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 6px 6px 6px 14px; }
.address-box span { flex: 1; min-width: 0; font-size: 15px; font-weight: 500; }
.address-box button { height: 44px; padding: 0 16px; border: 1px solid var(--ink); border-radius: 8px; background: var(--card); color: var(--ink); font: 600 14px var(--sans); cursor: pointer; }
.on-this-day { display: flex; gap: 16px; align-items: center; color: inherit; text-decoration: none; }
.polaroid { width: 84px; height: 96px; flex: none; background: #d9cdb9; padding: 6px 6px 16px; box-shadow: 0 2px 6px rgba(42, 37, 34, 0.15); transform: rotate(-3deg); }
.polaroid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.on-this-day .when { font: italic 15px var(--serif); color: var(--muted); }
.on-this-day .what { font: 19px/1.3 var(--serif); }
.month { font: italic 18px var(--serif); color: var(--muted); padding: 24px 0 10px; border-bottom: 1px solid var(--line); }
.timeline main > section:first-child .month { padding-top: 0; }
.timeline main > section + section .month { padding-top: 40px; }
.entries { display: flex; flex-direction: column; }
.empty { padding: 32px 0; font: 19px/1.45 var(--serif); color: var(--ink-soft); }

.entry { padding: 24px 0; display: flex; flex-direction: column; gap: 14px; border-bottom: 1px solid var(--line); }
.entry:last-child { border-bottom: none; }
.entry-head { display: flex; justify-content: space-between; align-items: center; }
.entry-date { font: italic 16px var(--serif); color: var(--muted); text-decoration: none; }
.items { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; font: 21px/1.35 var(--serif); }
.items li { display: flex; gap: 12px; }
.items .num { color: var(--number); font-style: italic; flex: none; min-width: 12px; }
.items .text { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.items .text p { white-space: pre-line; }
.items .later { display: flex; align-items: center; gap: 10px; margin: 4px 0 -2px; font: italic 14px var(--serif); color: var(--muted); }
.items .later::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.items.long { font-size: 19px; line-height: 1.45; gap: 14px; }
.read-more { font: 600 14px var(--sans); padding: 4px 0; }
/* Whole photos: one keeps its own shape, centred, a tall one capped in height. */
.photo-frame a { display: block; text-align: center; }
.photo { width: 100%; height: auto; object-fit: cover; border-radius: 6px; display: block; background: var(--sand); }
/* Several in a row at one height, each as wide as its shape (see photos.tsx). */
.photo-row { display: flex; gap: 4px; }
.photo-row .cell { position: relative; min-width: 0; overflow: hidden; border-radius: 6px; background: var(--sand); }
.photo-row img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-row .more { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(42, 37, 34, 0.45); color: #fff; font: 600 20px/1 var(--sans); }
.photo-rows { display: flex; flex-direction: column; gap: 4px; }

/* The ··· menu: a dropdown, a bottom sheet on phones */
.menu { position: relative; }
.menu summary { list-style: none; width: 44px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 6px; color: var(--muted); font-size: 18px; letter-spacing: 1px; cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { background: var(--sand); color: var(--ink); }
.menu-list { position: absolute; z-index: 10; top: 40px; right: 0; width: 250px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 34px rgba(42, 37, 34, 0.18); padding: 6px; display: flex; flex-direction: column; }
.menu-list a, .menu-list button { height: 44px; display: flex; align-items: center; gap: 12px; padding: 0 12px; border: none; border-radius: 8px; background: none; color: var(--ink); text-decoration: none; font: 15px var(--sans); text-align: left; cursor: pointer; width: 100%; }
.menu-list a:hover, .menu-list button:hover { background: var(--sand); }
.menu-list .danger { color: var(--danger); }
.menu-list hr { border: none; height: 1px; background: var(--line); margin: 6px 4px; }
.menu-title { display: none; }
.nav-menu summary { width: 44px; height: 44px; border-radius: 22px; color: var(--ink); }
.nav-menu .menu-list { top: 48px; width: 240px; }
.nav-menu[open] summary { background: var(--sand); }
.nav-menu form { display: contents; }
@media (max-width: 640px) {
  .menu[open]::before { content: ""; position: fixed; inset: 0; background: rgba(42, 37, 34, 0.45); z-index: 9; }
  .menu-list { position: fixed; top: auto; left: 0; right: 0; bottom: 0; width: auto; border-radius: 18px 18px 0 0; padding: 10px 14px 22px; box-shadow: none; }
  .menu-list a, .menu-list button { height: 48px; border-radius: 0; border-top: 1px solid var(--line); font-size: 16px; padding: 0 8px; }
  .menu-title { display: block; font: 18px var(--serif); padding: 4px 8px 10px; }
  .menu-list hr { display: none; }
  .nav-menu .menu-list { top: auto; width: auto; }
}

/* Desktop timeline: entries as cards in a grid */
@media (min-width: 960px) {
  .greeting h1 { font-size: 40px; }
  .page-wide { padding-top: 40px; }
  .entries.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; padding-top: 16px; align-items: start; }
  .entries.grid .entry { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 22px; }
}

/* One entry */
.entry-page h1 { font-size: 36px; line-height: 1.1; }
.entry-page .items { font-size: 20px; line-height: 1.5; gap: 24px; }
.entry-page .items .num { font-size: 24px; line-height: 1.25; }
.entry-page .items .text { gap: 12px; }
.photo-full { display: block; text-align: center; }
.photo-full img { width: 100%; height: auto; border-radius: 6px; display: block; background: var(--sand); }
.day-nav { margin-top: 24px; padding: 16px 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; font-size: 15px; }
.day-nav a { padding: 12px 0; }

/* Write and edit */
.editor-bar { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.editor-bar .title { font: italic 18px var(--serif); text-align: center; }
.editor-bar a, .editor-bar button { min-width: 64px; height: 44px; display: flex; align-items: center; padding: 0 8px; font: 15px var(--sans); border: none; background: none; color: var(--link); cursor: pointer; }
.editor-bar button { justify-content: flex-end; font-weight: 600; }
.nudge { padding: 16px 18px; border-radius: 12px; background: var(--marigold); }
.nudge .kicker { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; }
.nudge .text { font: 21px/1.3 var(--serif); }
.gratitude { display: flex; gap: 12px; align-items: flex-start; }
.gratitude label { font: italic 26px var(--serif); color: var(--number); width: 18px; padding-top: 10px; flex: none; }
.gratitude textarea { flex: 1; min-width: 0; }
.photo-edit { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.photo-edit .tile { position: relative; }
.photo-edit .tile img { width: 100%; height: 100px; object-fit: cover; display: block; border-radius: 6px; }
.photo-edit .tile label { position: absolute; top: 4px; right: 4px; height: 32px; padding: 0 10px; border-radius: 16px; background: rgba(42, 37, 34, 0.82); color: var(--paper); font-size: 13px; display: flex; align-items: center; gap: 6px; cursor: pointer; }
.photo-edit .tile input:checked + img { opacity: 0.35; }
input[type="file"].input { height: auto; padding: 10px; font-size: 15px; color: var(--muted); border-style: dashed; cursor: pointer; }
input[type="file"].input::file-selector-button { height: 40px; margin-right: 12px; padding: 0 16px; border: 1px solid var(--ink); border-radius: 8px; background: var(--card); color: var(--ink); font: 600 14px var(--sans); cursor: pointer; }
.date-picker { border: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.date-picker legend { font-size: 14px; font-weight: 600; padding: 0 0 8px; }
.date-choices { display: flex; gap: 8px; }
.date-choices label { flex: 1; min-height: 60px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 1px solid var(--field); border-radius: 10px; background: var(--card); font-size: 15px; font-weight: 600; cursor: pointer; }
.date-choices small { font-size: 13px; font-weight: 400; color: var(--muted); }
.date-choices input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.date-choices label:has(input:checked) { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.date-choices label:has(input:checked) small { color: var(--paper); opacity: 0.8; }
.date-choices label:has(input:focus-visible) { outline: 2px solid var(--link); outline-offset: 2px; }
.date-other { display: none; }
.date-picker:has(input[value="other"]:checked) .date-other { display: block; }
input[type="date"].input { font: 17px var(--serif); }

/* Settings */
.settings h1 { font-size: 38px; margin-bottom: 6px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.card h2 { font-size: 24px; }
.card.plan { background: var(--marigold); border: none; }
.card p { font-size: 15px; line-height: 1.55; color: var(--ink-soft); }
.card.plan p { color: var(--ink); }
.done-card h1 { font-size: 34px; line-height: 1.1; }
.done-card p { font-size: 17px; }
.unlocked { list-style: none; margin: 0; padding: 0; }
.unlocked li { display: flex; flex-direction: column; gap: 2px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.unlocked a { font-weight: 600; }
.row { display: flex; align-items: center; justify-content: space-between; min-height: 48px; border-bottom: 1px solid var(--line); font-size: 15px; gap: 12px; }
.toggle { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; min-height: 44px; font-size: 15px; }
.toggle input { width: 22px; height: 22px; accent-color: var(--ink); margin: 0; flex: none; }
.toggle .hint { display: block; font-size: 13px; line-height: 1.45; color: var(--muted); margin-top: 3px; }
.two-col { display: flex; gap: 12px; }
.two-col > * { flex: 1; min-width: 0; }

/* Confirm (delete) */
.confirm { max-width: 460px; margin: 48px auto; padding: 24px 22px 20px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; display: flex; flex-direction: column; gap: 12px; }
.confirm h1 { font-size: 26px; }
.confirm p { font-size: 15px; line-height: 1.55; color: var(--ink-soft); }

/* Admin */
.admin { overflow-wrap: anywhere; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.tile strong { font: 500 32px var(--serif); }
.tile span { font-size: 14px; color: var(--muted); }
.table-scroll { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th, .admin-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
.admin-table thead th { font-weight: 600; color: var(--muted); }
.admin-table tbody th { font-weight: 500; }
.admin-table small { color: var(--muted); }
.admin-table select.input { height: 40px; width: auto; font-size: 14px; }
.admin-table thead a { color: inherit; text-decoration: none; }
.admin-table thead a:hover, .admin-table thead a.sorted { color: var(--ink); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filters select.input { height: 40px; width: auto; font-size: 14px; }
.pager { display: flex; justify-content: space-between; align-items: center; }
.button.danger-text { color: var(--danger); border-color: var(--danger); }
.badge.danger { background: var(--danger); color: #fff; margin-left: 6px; }
.admin-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.row-wrap { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* Insights */
.year-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.year-tabs a { padding: 6px 14px; border: 1px solid var(--field); border-radius: 999px; font-size: 14px; color: var(--muted); text-decoration: none; }
.year-tabs a.on { background: var(--sand); color: var(--ink); border-color: var(--ink); }
.ranking { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ranking li { display: grid; grid-template-columns: minmax(80px, 30%) 1fr auto; align-items: center; gap: 12px; }
.ranking a { color: var(--ink); text-decoration: none; font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.ranking .bar { height: 8px; border-radius: 4px; background: linear-gradient(to right, var(--ink) var(--share), var(--sand) var(--share)); }
.old-site { background: var(--sand); border-radius: 14px; padding: 20px; display: flex; gap: 14px; align-items: flex-start; color: var(--soft, #574e47); font-size: 15px; line-height: 1.5; }
.old-site svg { flex: none; color: var(--number, #8f610e); }
.old-site strong { color: var(--ink); font-size: 16px; }
.gift-note { margin: 0; padding: 16px 18px; border-radius: 10px; background: var(--marigold); font: 20px/1.35 var(--serif); }

/* Public pages: header nav, footer, home, guide, legal */
.public-nav { display: flex; align-items: center; gap: 16px 24px; font-size: 15px; }
.public-nav a { color: var(--ink); text-decoration: none; padding: 10px 0; }
.public-nav a:hover { text-decoration: underline; }
.public-nav a.nav-start { background: var(--ink); color: var(--paper); border-radius: 8px; padding: 9px 14px; font-weight: 600; }
.public-nav a.nav-start:hover { text-decoration: none; background: #000; }
.wide-only { display: none; }
@media (min-width: 760px) { .wide-only { display: inline; } }
.site-footer { border-top: 1px solid var(--line); margin-top: 24px; }
.site-footer .inner { max-width: 1200px; margin: 0 auto; padding: 24px 20px 40px; display: flex; flex-direction: column; gap: 10px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 14px; }

.signup { display: flex; flex-wrap: wrap; gap: 10px; max-width: 520px; }
.signup .input { flex: 1 1 240px; height: 54px; }
.signup .button { flex: 1 1 auto; min-height: 54px; font-size: 16px; padding: 0 26px; }
.signup .cf-turnstile { flex-basis: 100%; }

.home .hero { max-width: 1160px; margin: 0 auto; padding: 32px 20px 48px; display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.home .hero-text { flex: 1 1 420px; display: flex; flex-direction: column; gap: 20px; }
.home h1 { font-size: clamp(42px, 7vw, 76px); line-height: 1.02; letter-spacing: -0.02em; }
.home .lead { font-size: clamp(17px, 2vw, 20px); line-height: 1.55; color: var(--ink-soft); max-width: 480px; margin: 0; }
.home .hero-card { flex: 1 1 360px; display: flex; flex-direction: column; align-items: center; }
/* The example entry lies on the photo's lower edge. */
.hero-photo { width: 100%; height: auto; border-radius: 14px; display: block; }
.home .hero-card .paper-card { width: 88%; margin-top: -64px; position: relative; }
.home .moments { max-width: 1160px; margin: 0 auto; padding: 48px 20px 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.moment, .guide-photo { width: 100%; height: auto; border-radius: 14px; display: block; }
.paper-card { width: 100%; max-width: 460px; background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 22px 22px 26px; box-shadow: 0 1px 0 var(--line), 0 10px 32px rgba(42, 37, 34, 0.07); transform: rotate(-1.2deg); display: flex; flex-direction: column; gap: 14px; }
.paper-card.large { padding: 30px; }
.paper-head { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }
.paper-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; font: 21px/1.35 var(--serif); }
.paper-card.large .paper-items { font-size: clamp(21px, 2.4vw, 26px); }
.paper-items li { display: flex; gap: 12px; }
.paper-items .num { color: var(--number); font-style: italic; }
.home .how { background: var(--sand); }
.home .how .inner { max-width: 1160px; margin: 0 auto; padding: 48px 20px 56px; display: flex; flex-direction: column; gap: 28px; }
.home .how h2 { font-size: 32px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px 48px; }
.steps li { display: flex; flex-direction: column; gap: 6px; }
.steps strong { font-size: 18px; }
.steps span:last-child { color: var(--ink-soft); line-height: 1.6; }
.step-num { font: italic 40px/1 var(--serif); color: var(--number); }
.home .quote { max-width: 860px; margin: 0 auto; padding: 56px 20px; text-align: center; display: flex; flex-direction: column; gap: 14px; }
.home .quote blockquote { margin: 0; }
.home .quote p:first-child { margin: 0; font: italic clamp(25px, 3.4vw, 38px)/1.3 var(--serif); }
.free-card { max-width: 1120px; margin: 0 auto 48px; margin-inline: max(20px, calc((100% - 1120px) / 2)); padding: 24px; border-radius: 14px; background: var(--marigold); display: flex; flex-direction: column; gap: 8px; }
.free-title { font: 28px var(--serif); }
.free-card p { margin: 0; line-height: 1.55; }
.free-card a { color: var(--ink); font-weight: 600; padding: 6px 0; align-self: flex-start; }

.guide { max-width: 1160px; margin: 0 auto; padding: 24px 20px 48px; display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.guide-main { flex: 1 1 560px; max-width: 700px; display: flex; flex-direction: column; gap: 32px; }
.guide-main h1 { font-size: clamp(34px, 5vw, 48px); line-height: 1.08; letter-spacing: -0.015em; }
.guide-main h2 { font-size: 28px; margin-bottom: 12px; }
.guide-main p { margin: 0 0 14px; font-size: 17px; line-height: 1.65; }
.crumbs a { color: var(--muted); }
.short-answer { background: var(--card); border: 1px solid var(--line); border-left: none; border-radius: 12px; padding: 20px 22px; }
.short-answer .kicker { display: block; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--number); margin-bottom: 6px; }
.short-answer p { margin: 0; font: 20px/1.5 var(--serif); }
.steps-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; font-size: 17px; }
.steps-list li { display: flex; gap: 14px; align-items: baseline; }
.steps-list span { font: italic 24px/1 var(--serif); color: var(--number); min-width: 28px; }
.prompt-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.prompt-chips li { padding: 8px 14px; border-radius: 999px; background: var(--sand); font-size: 15px; }
.faq { display: flex; flex-direction: column; }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 17px; min-height: 28px; }
.faq details p { margin: 10px 0 0; }
.sources { line-height: 1.6; }
.guide-aside { flex: 1 1 300px; max-width: 420px; display: flex; flex-direction: column; gap: 32px; position: sticky; top: 24px; }
.try-card { background: var(--marigold); border-radius: 14px; padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.try-card h2 { font-size: 26px; }
.try-card p { margin: 0; line-height: 1.55; }
.try-card .input { background: var(--card); }

.legal h1 { font-size: 40px; margin-bottom: 4px; }
.legal h2 { font-size: 24px; margin: 28px 0 8px; }
.legal p, .legal li { font-size: 16px; line-height: 1.65; }
.legal ul { padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.legal .lead { font-size: 18px; }

/* Photo viewer (viewer.js) */
[data-photo] { display: block; cursor: zoom-in; }
.viewer { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: none; background: transparent; display: none; place-items: center; overflow: hidden; }
.viewer[open] { display: grid; }
.viewer::backdrop { background: rgba(20, 17, 15, 0.94); backdrop-filter: blur(6px); animation: viewer-fade 0.2s ease-out; }
.viewer:focus { outline: none; }
.viewer-old { pointer-events: none; }
.viewer img { grid-area: 1 / 1; max-width: min(100vw - 32px, 1400px); max-height: calc(100vh - 96px); width: auto; height: auto; border-radius: 6px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4); cursor: default; }
.viewer button { position: fixed; border: none; background: rgba(255, 255, 255, 0.12); color: #fff; width: 48px; height: 48px; padding: 0; border-radius: 50%; cursor: pointer; display: grid; place-items: center; }
.viewer button svg { display: block; }
.viewer button:focus { outline: none; }
.viewer button:focus-visible { outline: 2px solid rgba(255, 255, 255, 0.7); outline-offset: 2px; }
.viewer button:hover { background: rgba(255, 255, 255, 0.22); }
.viewer button[hidden] { display: none; }
.viewer-close { top: 16px; right: 16px; }
.viewer-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.viewer-next { right: 16px; top: 50%; transform: translateY(-50%); }
.viewer-count { position: fixed; bottom: 20px; left: 0; right: 0; text-align: center; color: rgba(255, 255, 255, 0.75); font: 500 14px var(--sans); }
@media (max-width: 600px) { .viewer-prev, .viewer-next { top: auto; bottom: 8px; transform: none; } }
.viewer-open { overflow: hidden; }
@keyframes viewer-fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .viewer::backdrop { animation: none; } }
