:root {
  --page: #d8d3ca;
  --paper: #f3efe6;
  --paper-deep: #e6ded0;
  --source-paper: #eee7da;
  --ink: #1b1a18;
  --muted: #6d685f;
  --line: rgba(27, 26, 24, .14);
  --line-strong: rgba(27, 26, 24, .28);
  --coral: #c66452;
  --coral-soft: #ead2c9;
  --record: #a9362f;
  --record-soft: rgba(169, 54, 47, .16);
  --sage: #63705f;
  --sage-soft: #dfe5dc;
  --ochre: #9a6c31;
  --ochre-soft: #eee0c8;
  --stone: #817a70;
  --stone-soft: #e5e0d8;
  --focus: #496a73;
  --white: #fffdf8;
  --shadow: 0 24px 80px rgba(38, 36, 28, .16);
  --control-radius: 10px;
  --control-height-compact: 34px;
  --control-height-standard: 40px;
  --control-height-primary: 44px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--page);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--page); }
body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, .9), transparent 32%),
    radial-gradient(circle at 82% 86%, rgba(198, 100, 82, .13), transparent 33%),
    var(--page);
}

button, input, textarea { font: inherit; }
button { border-radius: var(--control-radius); color: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid rgba(73, 106, 115, .42);
  outline-offset: 3px;
}

.ambient {
  position: fixed;
  border-radius: 999px;
  filter: blur(10px);
  pointer-events: none;
  opacity: .5;
}
.ambient-one { width: 220px; height: 220px; background: #c8a397; top: -110px; right: 4vw; opacity: .34; }
.ambient-two { width: 180px; height: 180px; background: #aeb6a9; bottom: -90px; left: 6vw; opacity: .36; }

.app-shell {
  position: relative;
  width: min(100%, 430px);
  min-height: min(900px, 100vh);
  margin: 0 auto;
  overflow: hidden;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  padding: max(18px, env(safe-area-inset-top)) 22px 14px;
  background: linear-gradient(var(--paper) 72%, rgba(241, 239, 232, 0));
}

.wordmark {
  display: flex;
  align-items: baseline;
  gap: 9px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.wordmark span { font-size: 1.1rem; font-weight: 900; letter-spacing: -.05em; }
.wordmark small { font-size: .66rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

.portfolio-back {
  color: var(--muted);
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-decoration: none;
  text-transform: uppercase;
}

.portfolio-back:hover,
.portfolio-back:focus-visible { color: var(--ink); }

.view { display: none; min-height: calc(100vh - 150px); padding: 8px 22px 120px; }
.view.is-active { display: block; animation: view-in .28s ease-out; }
@keyframes view-in { from { opacity: 0; transform: translateY(7px); } }

.eyebrow {
  margin: 0;
  font-size: .69rem;
  font-weight: 850;
  letter-spacing: .12em;
  color: var(--muted);
}

.capture-hero { text-align: center; padding: 38px 0 32px; }
.capture-hero h1, .section-intro h1 {
  margin: 8px 0 14px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 13vw, 4.2rem);
  font-weight: 400;
  line-height: .87;
  letter-spacing: -.075em;
}
.capture-hero h1 em, .section-intro h1 em, .review-card h2 em { color: var(--coral); font-weight: 400; }
.hero-copy { margin: 0 auto 27px; color: var(--muted); font-size: .88rem; line-height: 1.5; }

.record-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  margin: 0 auto;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
  box-shadow: 0 12px 28px rgba(27, 26, 24, .18);
  cursor: pointer;
  transition: transform .2s ease, background .2s ease;
}
.record-button:hover { transform: scale(1.035); }
.record-button:active { transform: scale(.97); }
.record-button svg { width: 31px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.record-pulse { position: absolute; inset: -7px; border: 1px solid rgba(27, 26, 24, .24); border-radius: inherit; }
.record-button.is-recording { background: var(--record); box-shadow: 0 12px 28px rgba(169, 54, 47, .28); }
.record-button.is-recording .record-pulse { animation: pulse 1.25s infinite; border-color: rgba(169, 54, 47, .42); }
@keyframes pulse { 70% { transform: scale(1.18); opacity: 0; } 100% { opacity: 0; } }
.record-label { margin: 14px 0 0; font-size: .76rem; font-weight: 700; }
.timer { min-height: 1em; margin: 4px 0 0; color: var(--muted); font-variant-numeric: tabular-nums; font-size: .71rem; font-weight: 800; }
.record-button.is-recording ~ .timer { color: var(--record); }
.type-link { min-height: var(--control-height-standard); margin-top: 10px; padding: 8px 16px; border: 1px solid var(--line-strong); border-radius: var(--control-radius); background: rgba(255,255,255,.22); color: var(--ink); font-size: .68rem; font-weight: 780; cursor: pointer; }
.type-link:hover { background: var(--white); }

.demo-data-note {
  position: fixed;
  top: max(96px, calc(50vh - 330px));
  left: calc(50% + 235px);
  z-index: 20;
  width: min(260px, calc(50vw - 255px));
}
.demo-data-panel {
  padding: 15px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--page);
  box-shadow: none;
}
.demo-data-note .eyebrow { color: var(--muted); }
.demo-data-panel > p:not(.eyebrow) { margin: 5px 0 0; color: var(--muted); font-size: .68rem; line-height: 1.42; }
.demo-data-note button { min-height: var(--control-height-compact); padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: var(--control-radius); background: var(--page); font-size: .67rem; font-weight: 800; cursor: pointer; }
.demo-data-panel #resetDemoData { margin-top: 12px; }
.demo-data-note button:hover { border-color: var(--ink); }
.demo-data-toggle { display: none; }

.recall-card {
  padding: 20px;
  border-radius: 22px;
  background: var(--ink);
  color: var(--white);
  box-shadow: inset 0 3px 0 var(--coral);
}
.recall-heading { display: flex; justify-content: space-between; align-items: center; }
.recall-heading .eyebrow { color: #e49b8c; }
.recall-heading > span { font-size: .66rem; color: rgba(255,255,255,.62); }
.recall-card h3 { margin: 18px 0 12px; font-family: Georgia, serif; font-size: 1.7rem; font-weight: 400; }
.recall-card ul { list-style: none; margin: 0; padding: 0; }
.recall-card li { display: grid; grid-template-columns: 52px 1fr; gap: 10px; padding: 11px 0; border-top: 1px solid rgba(255,255,255,.13); }
.recall-card li p { margin: 0; font-size: .77rem; line-height: 1.35; }
.owner { align-self: start; display: inline-flex; width: max-content; min-height: 24px; align-items: center; justify-content: center; padding: 5px 9px; border-radius: var(--control-radius); font-size: .65rem; font-weight: 850; line-height: 1; text-transform: uppercase; }
.owner.you { border: 1px solid rgba(27,26,24,.16); background: var(--paper-deep); color: var(--ink); }
.recall-card .owner.you { border-color: transparent; background: var(--paper); }
.owner.them { background: rgba(255,255,255,.14); color: var(--white); }
.recall-card .owner.them { border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.28); color: #fff; }
.memory-card .owner.them, .preview-row .owner.them { background: var(--ink); color: var(--white); }
.owner.unassigned { background: var(--ochre-soft); color: #5d421f; }
.text-button { display: inline-flex; min-height: var(--control-height-standard); align-items: center; margin-top: 7px; padding: 7px 0; border: 0; background: none; color: var(--white); font-size: .72rem; font-weight: 800; cursor: pointer; }

.section-intro { padding: 26px 0 28px; }
.section-intro h1 { font-size: 3.55rem; }

.space-switch {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  margin-bottom: 12px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, .34);
}
.space-option { min-height: var(--control-height-compact); padding: 7px 9px; border: 0; border-radius: var(--control-radius); background: transparent; color: var(--muted); font-size: .66rem; font-weight: 800; cursor: pointer; }
.space-option.is-active { background: var(--white); color: var(--ink); box-shadow: 0 4px 14px rgba(16, 17, 15, .07); }

.search-box {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .55);
}
.search-box svg { width: 20px; fill: none; stroke: var(--muted); stroke-width: 1.6; stroke-linecap: round; }
.search-box input { width: 100%; border: 0; outline: 0; background: none; font-size: .82rem; }
.search-box kbd { padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); font-family: inherit; font-size: .61rem; }

.filter-row { display: flex; gap: 7px; padding: 14px 0 18px; overflow-x: auto; scrollbar-width: none; }
.filter-chip { min-width: 56px; min-height: var(--control-height-compact); padding: 6px 14px; border: 1px solid var(--line); border-radius: var(--control-radius); background: transparent; font-size: .68rem; font-weight: 750; line-height: 1; cursor: pointer; }
.filter-chip.is-active { background: var(--ink); color: var(--white); border-color: var(--ink); }

.trail-context { display: flex; min-height: var(--control-height-compact); align-items: center; justify-content: space-between; gap: 10px; margin: -7px 0 16px; padding: 7px 10px 7px 13px; border: 1px solid var(--line); border-radius: var(--control-radius); background: var(--source-paper); color: var(--muted); font-size: .7rem; font-weight: 700; }
.trail-context[hidden] { display: none; }
.trail-context strong { color: var(--ink); }
.trail-context button { min-height: 28px; padding: 5px 10px; border: 1px solid var(--line); border-radius: var(--control-radius); background: var(--white); color: var(--ink); font-size: .67rem; font-weight: 800; cursor: pointer; }

.memory-results { display: grid; gap: 12px; }
.memory-card { padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.46); }
.memory-card header { display: flex; justify-content: space-between; gap: 12px; }
.memory-card h2 { margin: 4px 0 0; font-family: Georgia, serif; font-size: 1.45rem; font-weight: 400; }
.memory-person { display: flex; align-items: baseline; gap: 5px; margin: 7px 0 0; color: var(--ink); font-size: .66rem; }
.memory-person-kicker { color: var(--muted); font-size: .64rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.memory-person-name { color: var(--coral); font-weight: 700; }
.memory-person.is-missing { color: var(--muted); }
.memory-person.is-missing .memory-person-kicker { color: var(--muted); }
.memory-person.is-missing .memory-person-name { color: inherit; }
.memory-badges { display: flex; flex: 0 0 auto; align-items: center; gap: 5px; }
.memory-space { display: inline-flex; min-height: 24px; align-items: center; justify-content: center; padding: 5px 10px; border-radius: var(--control-radius); background: rgba(16,17,15,.07); color: var(--muted); font-size: .64rem; font-weight: 850; line-height: 1; text-transform: uppercase; }
.memory-space.is-personal { background: var(--coral-soft); color: #6f3f35; }
.memory-status { display: inline-flex; min-width: max-content; min-height: 24px; align-items: center; justify-content: center; padding: 5px 10px; border-radius: var(--control-radius); background: var(--ink); color: var(--white); font-size: .65rem; font-weight: 900; line-height: 1; text-transform: uppercase; white-space: nowrap; }
.memory-status[data-lifecycle="done"] { background: var(--sage-soft); color: #3e4b3b; }
.memory-status[data-lifecycle="changed"] { background: var(--ochre-soft); color: #62471f; }
.memory-status[data-lifecycle="no_longer_relevant"], .memory-status[data-lifecycle="closed"] { background: var(--stone-soft); color: #5f5a52; }
.memory-status[data-lifecycle="processing"] { background: var(--paper-deep); color: var(--muted); }
.memory-status[data-lifecycle="archived"] { background: var(--stone-soft); color: #5f5a52; }
.memory-status.is-complete { box-shadow: inset 0 0 0 1px rgba(27,26,24,.05); }
.memory-summary { margin: 15px 0; font-size: .8rem; line-height: 1.45; }
.memory-state { display: inline-flex; align-items: center; gap: 6px; margin: -4px 0 14px; padding: 6px 9px; border-radius: var(--control-radius); background: #e8dfd3; color: #5f5548; font-size: .67rem; font-weight: 800; }
.memory-state[hidden] { display: none; }
.commitment-list { display: grid; gap: 7px; }
.commitment-row { position: relative; display: grid; grid-template-columns: 20px 50px 1fr auto; align-items: start; gap: 8px; padding: 10px 0 0; border-top: 1px solid var(--line); }
.commitment-row p { margin: 1px 0 0; font-size: .76rem; line-height: 1.38; }
.commitment-row small { display: block; margin-top: 4px; color: var(--muted); font-size: .70rem; font-weight: 750; }
.commitment-toggle { width: 18px; height: 18px; margin-top: 1px; border: 1.5px solid var(--muted); border-radius: 50%; background: transparent; cursor: pointer; }
.commitment-toggle.is-done { border-color: var(--sage); background: var(--sage); box-shadow: inset 0 0 0 4px var(--paper); }
.commitment-row[data-lifecycle="changed"] .commitment-toggle { border-color: var(--ochre); background: var(--ochre-soft); }
.commitment-row[data-lifecycle="no_longer_relevant"] .commitment-toggle { border-color: var(--stone); background: var(--stone-soft); }
.commitment-status { min-height: 24px; padding: 5px 10px; border: 0; border-radius: var(--control-radius); background: rgba(16,17,15,.06); color: var(--muted); font-size: .64rem; font-weight: 850; line-height: 1; cursor: pointer; }
.commitment-status[data-lifecycle="active"] { background: var(--ink); color: var(--white); }
.commitment-status[data-lifecycle="done"] { background: var(--sage-soft); color: #3e4b3b; }
.commitment-status[data-lifecycle="changed"] { background: var(--ochre-soft); color: #62471f; }
.commitment-status[data-lifecycle="no_longer_relevant"] { background: var(--stone-soft); color: #5f5a52; }
.commitment-status-options { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 5px; padding: 3px 0 8px; }
.commitment-status-options[hidden] { display: none; }
.commitment-status-options button { min-height: var(--control-height-compact); padding: 6px 11px; border: 1px solid var(--line); border-radius: var(--control-radius); background: var(--paper); font-size: .62rem; font-weight: 750; cursor: pointer; }
.commitment-status-options [data-set-commitment-status="done"] { border-color: rgba(99,112,95,.32); background: var(--sage-soft); }
.commitment-status-options [data-set-commitment-status="changed"] { border-color: rgba(154,108,49,.3); background: var(--ochre-soft); }
.commitment-status-options [data-set-commitment-status="no_longer_relevant"] { background: var(--stone-soft); }
.calendar-export-actions { display: grid; grid-template-columns: 1.35fr .65fr; gap: 7px; margin-top: 13px; }
.reminder-action, .calendar-download-action { width: 100%; min-height: var(--control-height-standard); padding: 7px 12px; border-radius: var(--control-radius); font-size: .7rem; font-weight: 800; cursor: pointer; }
.reminder-action { border: 1px solid var(--ink); background: transparent; color: var(--ink); }
.reminder-action:hover { background: var(--ink); color: var(--white); }
.calendar-download-action { border: 1px solid var(--line); background: transparent; color: var(--muted); }
.calendar-download-action:hover { border-color: var(--line-strong); color: var(--ink); }
.memory-card details { margin-top: 14px; padding: 11px 12px; border: 1px solid rgba(27,26,24,.12); border-radius: 12px; background: var(--source-paper); box-shadow: inset 0 1px 0 rgba(255,255,255,.55); }
.memory-card summary { color: var(--ink); font-size: .69rem; font-weight: 780; cursor: pointer; list-style-position: inside; }
.memory-card summary::before { content: "SOURCE"; display: inline-block; margin-right: 8px; color: var(--coral); font-size: .64rem; font-weight: 900; letter-spacing: .12em; vertical-align: 1px; }
.memory-card blockquote { margin: 11px 0 0; padding: 13px 12px 12px; border-top: 1px solid rgba(27,26,24,.13); background: repeating-linear-gradient(0deg, transparent 0, transparent 22px, rgba(27,26,24,.045) 22px, rgba(27,26,24,.045) 23px); color: #3d3934; font-family: Georgia, serif; font-size: .78rem; line-height: 1.52; }
.memory-audio { margin-top: 10px; }
.memory-audio[hidden] { display: none; }
.memory-audio audio { width: 100%; height: 34px; }
.memory-actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 11px; padding-top: 10px; border-top: 1px solid var(--line); }
.memory-actions button { min-width: 64px; min-height: var(--control-height-compact); padding: 6px 14px; border: 1px solid transparent; border-radius: var(--control-radius); background: transparent; color: var(--muted); font-size: .70rem; font-weight: 800; cursor: pointer; }
.memory-actions .memory-edit { border-color: var(--line); color: var(--ink); }
.memory-actions .memory-archive { border-color: var(--line); }
.memory-actions .memory-restore { border-color: var(--line); color: var(--ink); }
.memory-actions .memory-delete { margin-left: auto; color: #766e65; font-weight: 700; }
.memory-actions button:hover { color: var(--ink); }
.delete-confirmation { margin-top: 9px; padding: 11px; border-radius: 11px; background: var(--stone-soft); }
.delete-confirmation[hidden] { display: none; }
.delete-confirmation p { margin: 0; font-family: Georgia, serif; font-size: .72rem; }
.delete-confirmation div { display: flex; gap: 6px; margin-top: 9px; }
.delete-confirmation button { min-height: var(--control-height-compact); padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--control-radius); background: transparent; font-size: .70rem; font-weight: 800; cursor: pointer; }
.delete-confirmation .confirm-delete { border-color: var(--ink); background: var(--ink); color: var(--white); }
.processing-receipt { padding: 13px; border-radius: 12px; background: var(--paper); color: var(--muted); font-size: .68rem; line-height: 1.4; }
.empty-state { padding: 38px 18px; border: 1px dashed var(--line); border-radius: 18px; text-align: center; color: var(--muted); font-size: .78rem; }

.people-list { display: grid; gap: 8px; }
.person-row { width: 100%; display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 12px; padding: 14px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }
.person-row:hover h3 { color: var(--coral); }
.person-avatar { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--ink); color: var(--white); font-size: .72rem; font-weight: 900; }
.person-row h3 { margin: 0 0 3px; font-family: Georgia, serif; font-size: 1.05rem; font-weight: 400; }
.person-row p { margin: 0; color: var(--muted); font-size: .67rem; }
.promise-count { min-width: max-content; height: 27px; display: grid; place-items: center; padding: 0 9px; border-radius: 999px; background: var(--coral-soft); color: #6f3f35; font-size: .66rem; font-weight: 900; white-space: nowrap; }

.bottom-nav {
  position: absolute;
  bottom: 0;
  z-index: 12;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
  padding: 10px 16px max(12px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(241, 239, 232, .94);
  backdrop-filter: blur(16px);
}
.nav-item { display: grid; place-items: center; gap: 3px; padding: 6px; border: 0; background: none; color: var(--muted); font-size: .67rem; font-weight: 750; cursor: pointer; }
.nav-item svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.nav-item.is-active { color: var(--ink); }
.nav-item.is-active svg { stroke-width: 2.2; }

.review-sheet { position: fixed; inset: 0; z-index: 50; display: none; align-items: end; justify-content: center; }
.review-sheet.is-open { display: flex; }
.sheet-backdrop { position: absolute; inset: 0; border: 0; background: rgba(16, 17, 15, .48); backdrop-filter: blur(8px); }
.review-card {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 24px), 406px);
  margin-bottom: max(12px, env(safe-area-inset-bottom));
  padding: 18px;
  border-radius: 24px;
  background: rgba(252, 251, 246, .97);
  box-shadow: var(--shadow);
  animation: sheet-in .3s cubic-bezier(.2,.8,.2,1);
}
@keyframes sheet-in { from { transform: translateY(30px); opacity: 0; } }
.review-actions { display: grid; grid-template-columns: 1.5fr 1fr; gap: 8px; }
.primary-action, .secondary-action { min-height: var(--control-height-primary); padding: 9px 14px; border-radius: var(--control-radius); font-size: .72rem; font-weight: 850; cursor: pointer; }
.primary-action { border: 1px solid var(--ink); background: var(--ink); color: var(--white); }
.secondary-action { border: 1px solid var(--line); background: transparent; }

.review-card { max-height: calc(100vh - 20px); overflow-y: auto; padding: 12px 18px 18px; }
.review-handle { width: 38px; height: 4px; margin: 0 auto 22px; border-radius: 99px; background: var(--line); }
.review-card h2 { margin: 7px 0 19px; font-family: Georgia, serif; font-size: 2rem; line-height: .98; font-weight: 400; letter-spacing: -.04em; }
.transcript-field { display: grid; gap: 7px; }
.transcript-field > span { color: var(--muted); font-size: .66rem; font-weight: 800; }
.transcript-field textarea { resize: vertical; width: 100%; min-height: 88px; padding: 11px; border: 1px solid var(--line); border-radius: 12px; outline: none; background: rgba(255,255,255,.65); font-size: .76rem; line-height: 1.4; }
.contact-context { margin-top: 14px; padding: 14px 0 15px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.contact-options { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; overflow: visible; }
.contact-options button { flex: 0 0 auto; min-height: var(--control-height-compact); padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--control-radius); background: transparent; color: var(--muted); font-size: .66rem; font-weight: 780; cursor: pointer; }
.contact-options button.is-selected { border-color: var(--ink); background: var(--ink); color: var(--white); }
.custom-contact { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 9px; margin-top: 9px; }
.custom-contact[hidden] { display: none; }
.custom-contact span { color: var(--muted); font-size: .66rem; font-weight: 800; }
.custom-contact input { min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--white); font-size: .68rem; }
.memory-title-field { display: grid; gap: 7px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.memory-title-field > span { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; color: var(--ink); font-size: .66rem; font-weight: 850; }
.memory-title-field small { color: var(--muted); font-size: .64rem; font-weight: 650; }
.memory-title-field input { width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.58); font-size: .72rem; }
.analysis-state { display: none; align-items: center; gap: 5px; padding: 18px 0; }
.analysis-state.is-active { display: flex; }
.analysis-state span { width: 6px; height: 6px; border-radius: 50%; background: var(--coral); animation: think 1s infinite alternate; }
.analysis-state span:nth-child(2) { animation-delay: .2s; }
.analysis-state span:nth-child(3) { animation-delay: .4s; }
.analysis-state p { margin: 0 0 0 5px; color: var(--muted); font-size: .65rem; }
@keyframes think { to { opacity: .25; transform: translateY(-3px); } }
.promise-preview { display: grid; gap: 8px; margin: 13px 0 18px; }
.preview-row { display: grid; grid-template-columns: 54px 1fr; gap: 9px; padding: 11px; border-radius: 12px; background: var(--paper); }
.preview-row p { margin: 0; font-size: .75rem; line-height: 1.4; }
.preview-row small { display: block; margin-top: 4px; color: var(--muted); font-size: .66rem; font-weight: 750; }
.capture-state { margin: 0 0 18px; padding-top: 15px; border-top: 1px solid var(--line); }
.capture-state-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.capture-state-heading span { font-size: .69rem; font-weight: 850; }
.capture-state-heading small { color: var(--muted); font-size: .64rem; }
.state-options { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.state-options button { min-height: var(--control-height-compact); padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--control-radius); background: transparent; color: var(--muted); font-size: .66rem; font-weight: 750; cursor: pointer; }
.state-options button.is-selected { border-color: var(--ink); background: var(--ink); color: var(--white); }
.custom-state { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 9px; margin-top: 9px; }
.custom-state[hidden] { display: none; }
.custom-state span { color: var(--muted); font-size: .66rem; font-weight: 800; }
.custom-state input { min-width: 0; padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.58); color: var(--ink); font-size: .69rem; }
.review-later { margin-top: 12px; padding: 12px; border-radius: 12px; background: var(--ochre-soft); }
.review-later[hidden] { display: none; }
.review-later > p { margin: 0 0 9px; color: #62471f; font-family: Georgia, serif; font-size: .78rem; }
.review-delay-options { display: flex; flex-wrap: wrap; gap: 6px; }
.review-delay-options button { min-height: var(--control-height-compact); padding: 6px 12px; border: 1px solid rgba(98,71,31,.25); border-radius: var(--control-radius); background: rgba(255,255,255,.35); color: #62471f; font-size: .66rem; font-weight: 800; cursor: pointer; }
.review-delay-options button.is-selected { border-color: #62471f; background: #62471f; color: var(--white); }
.memory-review-action { width: 100%; min-height: var(--control-height-standard); margin-top: 10px; padding: 7px 14px; border: 0; border-radius: var(--control-radius); background: var(--ochre-soft); color: #62471f; font-size: .72rem; font-weight: 850; cursor: pointer; }
.smart-close-suggestion { margin-top: 11px; padding: 12px; border: 1px solid rgba(99,112,95,.32); border-radius: 12px; background: var(--sage-soft); }
.smart-close-suggestion p { margin: 0; color: #3e4b3b; font-size: .7rem; line-height: 1.4; }
.smart-close-suggestion div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.smart-close-suggestion button { min-height: var(--control-height-compact); padding: 6px 12px; border: 1px solid rgba(62,75,59,.25); border-radius: var(--control-radius); background: transparent; color: #3e4b3b; font-size: .70rem; font-weight: 800; line-height: 1.1; cursor: pointer; }
.calendar-prompt { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid rgba(99,112,95,.32); border-radius: 12px; background: var(--sage-soft); }
.calendar-prompt strong, .calendar-prompt small { display: block; color: #3e4b3b; }
.calendar-prompt strong { font-family: Georgia, serif; font-size: .84rem; font-weight: 400; }
.calendar-prompt small { margin-top: 3px; font-size: .65rem; font-weight: 750; }
.calendar-prompt-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.calendar-prompt button { min-height: var(--control-height-compact); padding: 6px 12px; border: 1px solid rgba(62,75,59,.28); border-radius: var(--control-radius); background: transparent; color: #3e4b3b; font-size: .66rem; font-weight: 850; cursor: pointer; }
.calendar-prompt [data-calendar-id] { border-color: #3e4b3b; background: #3e4b3b; color: var(--white); }
.deadline-followup { margin-top: 11px; padding: 12px; border-radius: 12px; background: #f4eee5; }
.deadline-followup > p { margin: 0 0 9px; font-family: Georgia, serif; font-size: .76rem; }
.deadline-followup > div { display: flex; flex-wrap: wrap; gap: 6px; }
.deadline-followup button { min-height: var(--control-height-compact); padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--control-radius); background: rgba(255,255,255,.42); color: var(--ink); font-size: .7rem; font-weight: 700; cursor: pointer; }
.deadline-followup input { width: 100%; margin-top: 9px; padding: 8px; border: 1px solid var(--line); border-radius: 9px; background: var(--white); }
.deadline-followup input[hidden] { display: none; }

.toast { position: fixed; left: 50%; bottom: 90px; z-index: 80; transform: translate(-50%, 20px); padding: 10px 14px; border-radius: 999px; background: var(--ink); color: white; font-size: .72rem; font-weight: 800; opacity: 0; pointer-events: none; transition: .25s ease; }
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }

@media (min-width: 650px) {
  body { padding: 28px 0; }
  .app-shell { min-height: min(860px, calc(100vh - 56px)); border-radius: 32px; }
  .bottom-nav { border-radius: 0 0 32px 32px; }
  .view { min-height: 680px; }
}

@media (max-width: 900px) {
  .demo-data-note { top: auto; right: 12px; bottom: 82px; left: auto; width: auto; }
  .demo-data-toggle { display: block; box-shadow: none; }
  .demo-data-panel { position: absolute; right: 0; bottom: calc(100% + 8px); display: none; width: min(280px, calc(100vw - 24px)); }
  .demo-data-note.is-open .demo-data-panel { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
