:root {
  --page: #e7e8e3;
  --bg: #f8f7f2;
  --surface: #fffefa;
  --surface-muted: #f1f0ea;
  --ink: #1d2920;
  --ink-soft: #5e685f;
  --ink-faint: #8b928b;
  --line: rgba(52, 67, 55, 0.12);
  --green: #4a8751;
  --green-dark: #315c39;
  --green-wash: #eaf3e8;
  --coral: #c6745d;
  --coral-wash: #f8ebe5;
  --gold: #9c8151;
  --gold-wash: #f5efe1;
  --blue: #68889e;
  --blue-dark: #506e82;
  --blue-wash: #eaf1f5;
  --danger: #b55245;
  --shadow: 0 18px 58px rgba(44, 55, 45, 0.13);
  --radius: 8px;
  --bottom-nav-height: 70px;
}

body {
  background: var(--page);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.phone-app {
  background: var(--bg);
  border-color: rgba(45, 59, 48, 0.12);
  border-radius: 16px;
  overflow: clip;
  box-shadow: var(--shadow);
}

.app-header {
  height: 72px;
  padding: 11px 17px 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(248, 247, 242, 0.9);
  backdrop-filter: saturate(140%) blur(20px);
  -webkit-backdrop-filter: saturate(140%) blur(20px);
}

.app-content {
  inset: 72px 0 var(--bottom-nav-height);
}

.app-header h1 {
  margin-top: 3px;
  color: var(--green-dark);
  font-size: 22px;
  font-weight: 760;
}

.header-kicker,
.section-label {
  color: var(--ink-faint);
  font-weight: 620;
}

.app-view {
  padding: 18px 16px 32px;
}

.icon-button,
.small-icon-button {
  background: rgba(75, 96, 80, 0.07);
  color: var(--green-dark);
}

.avatar-button {
  background: #5f7568;
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.demo-mode-button {
  border-color: rgba(58, 77, 62, 0.12);
  background: rgba(255, 254, 250, 0.7);
  color: var(--green-dark);
}

.notification-button {
  background: transparent;
}

.notification-dot {
  background: var(--coral);
  border-color: var(--bg);
}

.demo-guide {
  min-height: 88px;
  margin: 0 0 18px;
  padding: 10px;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.demo-guide-portrait {
  width: 64px;
  height: 64px;
  border-radius: 7px;
  object-fit: cover;
}

.demo-guide-copy {
  min-width: 0;
}

.demo-guide-copy strong,
.demo-guide-copy small {
  display: block;
}

.demo-guide-copy strong {
  margin-top: 5px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.2;
}

.demo-guide-copy small {
  margin-top: 5px;
  color: var(--ink-soft);
  font-size: 10px;
}

.demo-guide button,
.account-switch-button,
.view-demo-command {
  min-height: 36px;
  border-radius: 7px;
  background: var(--green-wash);
  color: var(--green-dark);
}

.home-greeting {
  margin: 0 2px 14px;
}

.home-greeting p {
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
}

.story-prompt {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 5px 18px rgba(48, 63, 51, 0.05);
}

.story-photo-wrap {
  aspect-ratio: 16 / 8.7;
}

.story-photo {
  object-position: center 48%;
}

.story-date {
  border-radius: 6px;
  background: rgba(38, 52, 41, 0.78);
}

.story-prompt-copy h2 {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.42;
}

.record-entry {
  border-top-color: var(--line);
  background: #f0f5ed;
}

.record-orb,
.round-command,
.primary-command,
.export-button {
  background: var(--green);
  color: #fff;
  box-shadow: none;
}

.record-entry-arrow,
.text-command {
  color: var(--green-dark);
}

.home-section,
.family-section {
  margin-top: 24px;
}

.section-heading h2 {
  color: var(--ink);
  font-size: 16px;
  font-weight: 720;
}

.quick-actions {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.quick-action {
  position: relative;
  width: 100%;
  height: auto;
  min-height: 58px;
  padding: 9px 12px;
  border: 0;
  border-radius: 0;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 18px;
  justify-items: start;
  gap: 10px;
  background: transparent;
  text-align: left;
}

.quick-action + .quick-action {
  border-top: 1px solid var(--line);
}

.quick-action + .quick-action::before,
.quick-action::after {
  display: none;
}

.quick-action > span:last-child {
  min-width: 0;
  color: var(--ink);
  font-size: 12px;
}

.quick-action > svg {
  color: var(--ink-faint);
}

.quick-icon {
  width: 36px;
  height: 36px;
}

.recent-section {
  border: 0;
  background: transparent;
}

.recent-section .memory-row,
.memory-row {
  min-height: 94px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.recent-section .memory-row + .memory-row {
  margin-top: 9px;
  border-top: 1px solid var(--line);
}

.recent-section .memory-row + .memory-row::before {
  display: none;
}

.memory-row img {
  border-radius: 6px;
}

.memory-meta,
.evidence-line,
.source-status.verified {
  color: var(--green-dark);
}

.personal-greeting {
  padding: 10px 2px 20px;
  border-bottom: 0;
}

.personal-greeting h2 {
  color: var(--ink);
  font-size: 25px;
}

.personal-start-panel {
  min-height: 94px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.personal-start-icon,
.personal-empty > span {
  background: var(--green-wash);
  color: var(--green-dark);
}

.personal-starters {
  overflow: hidden;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.personal-starters button {
  min-height: 64px;
  padding: 9px 12px;
  color: var(--green-dark);
}

.personal-starters button:last-child {
  border-bottom: 0;
}

.view-demo-command {
  margin-top: 18px;
  border: 1px solid var(--line);
  background: transparent;
}

.personal-empty {
  min-height: 440px;
  padding: 72px 18px 30px;
}

.personal-empty-illustration {
  width: min(100%, 260px);
  max-height: 190px;
  margin: -38px auto 16px;
  object-fit: contain;
}

.personal-empty:has(.personal-empty-illustration) > span {
  display: none;
}

.bottom-nav {
  height: var(--bottom-nav-height);
  padding: 6px 8px max(8px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 254, 250, 0.92);
  backdrop-filter: saturate(150%) blur(20px);
  -webkit-backdrop-filter: saturate(150%) blur(20px);
}

.nav-button {
  color: var(--ink-faint);
}

.nav-button.is-active {
  color: var(--green-dark);
}

.nav-button:focus-visible {
  border-radius: 7px;
  outline: 0;
  background: var(--green-wash);
}

.nav-button b,
.count-badge {
  background: var(--coral);
}

.compact-intro h2,
.family-hero h2 {
  color: var(--ink);
}

.segmented-control,
.auth-mode-control {
  background: #edebe5;
}

.segment.is-active,
.auth-mode-control button.is-active {
  background: var(--surface);
  color: var(--green-dark);
  box-shadow: 0 1px 4px rgba(47, 61, 50, 0.1);
}

.memory-panel[data-memory-panel="timeline"] {
  margin-top: 18px;
}

.timeline-item {
  border-color: var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.timeline-dot {
  background: var(--green);
  box-shadow: 0 0 0 4px var(--green-wash);
}

.timeline-year span {
  color: var(--green-dark);
}

.people-summary,
.person-row,
.chapter-row,
.review-task,
.activity-row {
  border-color: var(--line);
  background: var(--surface);
}

.person-row:first-of-type,
.chapter-row:first-child {
  border-radius: var(--radius) var(--radius) 0 0;
}

.person-row:last-child,
.chapter-row:last-child {
  border-radius: 0 0 var(--radius) var(--radius);
}

.photo-cell {
  border-radius: var(--radius);
}

.book-cover {
  border-radius: var(--radius);
  background: #27372b;
}

.book-cover img {
  opacity: 0.76;
}

.book-cover::after {
  background: rgba(22, 34, 25, 0.48);
}

.book-progress {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.chapter-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.chapter-row {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}

.source-status.verified {
  background: var(--green-wash);
}

.source-status.pending {
  color: var(--gold);
  background: var(--gold-wash);
}

.family-hero {
  min-height: 116px;
  padding: 12px;
  grid-template-columns: 78px minmax(0, 1fr) 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.family-hero-illustration {
  width: 78px;
  height: 78px;
  border-radius: 7px;
  object-fit: cover;
}

.family-stack {
  display: none;
}

.review-task {
  border-radius: var(--radius);
}

.review-icon {
  background: var(--green-wash);
  color: var(--green-dark);
}

.review-icon.photo {
  background: var(--blue-wash);
  color: var(--blue-dark);
}

.audio-snippet,
.choice-button {
  border-color: var(--line);
  background: var(--surface-muted);
}

.choice-button.is-selected {
  border-color: var(--green);
  background: var(--green-wash);
  color: var(--green-dark);
}

.secondary-command {
  border-color: var(--line);
  background: var(--surface);
}

.flow-overlay {
  background: var(--bg);
  color: var(--ink);
}

.flow-header {
  min-height: 72px;
  padding: max(14px, env(safe-area-inset-top)) 16px 9px;
  border-bottom: 1px solid var(--line);
  background: rgba(248, 247, 242, 0.9);
  color: var(--ink);
  backdrop-filter: saturate(140%) blur(20px);
  -webkit-backdrop-filter: saturate(140%) blur(20px);
}

.icon-button.on-dark {
  background: rgba(75, 96, 80, 0.07);
  color: var(--green-dark);
}

.flow-header span {
  color: var(--ink-soft);
  opacity: 1;
}

.flow-header strong {
  color: var(--green-dark);
}

.interview-stage {
  justify-content: flex-start;
  padding: 28px 18px 20px;
}

.agent-mark {
  width: 54px;
  height: 54px;
  border: 1px solid rgba(74, 135, 81, 0.22);
  background: var(--green-wash);
  color: var(--green-dark);
}

.listening-label,
.listening-label[data-status="ready"] {
  color: var(--green-dark);
}

.listening-label[data-status="warning"] {
  color: var(--gold);
}

.listening-label[data-status="error"] {
  color: var(--danger);
}

.interview-stage h2 {
  max-width: 340px;
  margin: 16px auto 20px;
  color: var(--ink);
  font-size: 21px;
  line-height: 1.55;
}

.live-transcript {
  width: 100%;
  min-height: 132px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.8;
  box-shadow: 0 5px 18px rgba(48, 63, 51, 0.04);
}

.live-transcript.is-placeholder {
  color: var(--ink-faint);
}

.waveform {
  margin-top: 24px;
}

.waveform i {
  background: var(--green);
}

.interview-controls {
  min-height: 112px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.control-button {
  color: var(--ink-soft);
}

.stop-record-button {
  border-color: rgba(198, 116, 93, 0.24);
  background: var(--coral);
  color: #fff;
  box-shadow: 0 8px 22px rgba(198, 116, 93, 0.2);
}

.text-composer {
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(44, 55, 45, 0.12);
}

.send-text-button {
  background: var(--green);
  color: #fff;
}

.review-overlay {
  background: var(--bg);
}

.review-header,
.review-actions {
  border-color: var(--line);
  background: rgba(248, 247, 242, 0.92);
}

.model-status {
  background: var(--green-wash);
  color: var(--green-dark);
}

.review-check {
  background: var(--green);
}

.fact-list,
.next-thread {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.fact-list div {
  min-height: 52px;
  padding: 0 13px;
  border-bottom-color: var(--line);
}

.review-audio-button {
  background: var(--green-wash);
  color: var(--green-dark);
}

.next-thread {
  padding: 14px;
}

.sheet-backdrop {
  background: rgba(39, 45, 40, 0.28);
}

.bottom-sheet {
  border-radius: 12px 12px 0 0;
  background: var(--bg);
  box-shadow: 0 -12px 40px rgba(41, 51, 43, 0.13);
}

.sheet-handle {
  background: #b9bdb7;
}

.guest-account-panel {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  column-gap: 13px;
  padding: 14px 0 18px;
}

.guest-tree-illustration {
  width: 86px;
  height: 104px;
  grid-row: 1 / 3;
  border-radius: 7px;
  object-fit: cover;
}

.guest-account-panel p {
  align-self: end;
  color: var(--ink-soft);
  font-size: 11px;
}

.account-entry-actions {
  align-self: start;
  margin-top: 10px;
}

.member-account-panel {
  border-bottom-color: var(--line);
}

.member-avatar {
  background: #617568;
}

.account-logout-button {
  border-color: rgba(181, 82, 69, 0.18);
  background: var(--coral-wash);
  color: var(--danger);
}

.settings-list {
  overflow: hidden;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.setting-row {
  min-height: 62px;
  padding: 9px 12px;
  border-bottom-color: var(--line);
}

.setting-icon {
  background: var(--blue);
  color: #fff;
}

.ios-switch:checked {
  background: var(--green);
}

.range-control input[type="range"] {
  --range-fill: var(--green);
  --range-track: #d8ddd7;
}

.provider-line {
  color: var(--ink-soft);
}

.online-dot {
  background: var(--green);
}

.auth-sheet {
  inset: 0;
  max-height: none;
  padding: max(24px, env(safe-area-inset-top)) 18px max(22px, env(safe-area-inset-bottom));
  border-radius: 0;
}

.auth-sheet .sheet-handle {
  display: none;
}

.auth-tree-mark {
  width: 58px;
  height: 58px;
  margin: 28px auto 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green-wash);
  color: var(--green-dark);
}

.auth-sheet .sheet-heading {
  align-items: flex-start;
}

.auth-sheet .sheet-heading > div {
  flex: 1;
  text-align: center;
}

.auth-sheet .sheet-heading .close-sheet {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  left: 14px;
}

.auth-sheet .sheet-heading h2 {
  font-size: 24px;
}

.auth-mode-control {
  margin-top: 28px;
}

.auth-form {
  padding-top: 22px;
}

.auth-form input {
  height: 50px;
  border-color: var(--line);
  background: var(--surface);
}

.auth-form input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-wash);
}

.chapter-preview {
  border-color: var(--line);
  background: var(--surface);
}

.toast {
  background: rgba(37, 49, 40, 0.92);
}

@media (max-width: 600px) {
  .phone-app {
    border-radius: 0;
  }

  .app-header,
  .bottom-nav,
  .review-header,
  .review-actions {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }

  .auth-sheet {
    padding-left: max(18px, env(safe-area-inset-left));
    padding-right: max(18px, env(safe-area-inset-right));
  }
}

@media (max-width: 370px) {
  .demo-guide {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .demo-guide-portrait {
    width: 58px;
    height: 58px;
  }

  .demo-guide button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .guest-account-panel {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .guest-tree-illustration {
    width: 72px;
    height: 98px;
  }
}

/* Elder-readable component system: stronger contrast, larger type, clearer grouping. */
:root {
  --ink-soft: #465148;
  --ink-faint: #687269;
  --line: rgba(43, 58, 47, 0.16);
  --bottom-nav-height: 78px;
}

.header-kicker {
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 680;
}

.section-label {
  width: max-content;
  max-width: 100%;
  min-height: 25px;
  padding: 4px 8px;
  display: inline-flex;
  align-items: center;
  border-radius: 7px;
  background: var(--surface-muted);
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 720;
  line-height: 1.3;
}

.app-header h1 {
  font-size: 23px;
  font-weight: 780;
}

.demo-mode-button {
  min-height: 34px;
  padding-inline: 10px;
  font-size: 12px;
}

.demo-guide {
  min-height: 100px;
  padding: 12px;
  grid-template-columns: 70px minmax(0, 1fr) auto;
  gap: 12px;
}

.demo-guide-portrait {
  width: 70px;
  height: 70px;
}

.demo-guide-copy strong {
  margin-top: 6px;
  font-size: 18px;
  font-weight: 760;
}

.demo-guide-copy small {
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.4;
}

.demo-guide button,
.account-switch-button,
.view-demo-command {
  min-height: 44px;
  padding-inline: 12px;
  font-size: 13px;
  font-weight: 700;
}

.home-greeting {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.home-greeting p {
  font-size: 20px;
  font-weight: 780;
}

.home-greeting .source-note {
  min-height: 30px;
  padding: 5px 9px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(74, 135, 81, 0.18);
  border-radius: 7px;
  background: var(--green-wash);
  color: var(--green-dark);
  font-size: 12.5px;
  font-weight: 680;
}

.story-date {
  min-height: 30px;
  padding-inline: 10px;
  font-size: 12.5px;
}

.story-prompt-copy {
  padding: 17px 16px 15px;
}

.story-prompt-copy h2 {
  margin: 9px 0 11px;
  font-size: 22px;
  line-height: 1.42;
  font-weight: 780;
}

.story-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.story-facts span,
.memory-meta,
.timeline-copy > span {
  min-height: 29px;
  padding: 5px 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 7px;
  background: var(--blue-wash);
  color: var(--blue-dark);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.25;
}

.record-entry {
  min-height: 84px;
  padding-block: 13px;
}

.record-entry strong {
  font-size: 17px;
  font-weight: 740;
}

.record-entry span {
  margin-top: 5px;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.4;
}

.section-heading {
  min-height: 32px;
  margin-bottom: 12px;
}

.section-heading h2 {
  font-size: 18.5px;
  font-weight: 760;
}

.quick-action {
  min-height: 68px;
  padding: 10px 13px;
  grid-template-columns: 42px minmax(0, 1fr) 20px;
  gap: 11px;
  font-size: 15.5px;
  font-weight: 650;
}

.quick-action > span:last-child {
  font-size: 15.5px;
  line-height: 1.35;
}

.quick-icon {
  width: 40px;
  height: 40px;
}

.recent-section .memory-row,
.memory-row {
  min-height: 112px;
  padding: 12px;
  grid-template-columns: 78px minmax(0, 1fr) 20px;
  gap: 12px;
}

.memory-row img {
  width: 78px;
  height: 82px;
}

.memory-row-copy h3 {
  margin: 7px 0 5px;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 720;
  white-space: normal;
}

.memory-row-copy p {
  display: -webkit-box;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.5;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.bottom-nav {
  height: var(--bottom-nav-height);
  padding-top: 7px;
}

.nav-button {
  height: 64px;
  gap: 5px;
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 680;
}

.nav-button b {
  min-width: 19px;
  height: 19px;
  font-size: 12px;
}

.compact-intro h2,
.family-hero h2 {
  margin-top: 7px;
  font-size: 23px;
  font-weight: 780;
}

.segmented-control {
  height: 44px;
}

.segment {
  font-size: 14px;
  font-weight: 680;
}

.memory-panel[data-memory-panel="timeline"] {
  padding: 16px 15px 7px;
}

.timeline-year {
  min-height: 48px;
  gap: 13px;
}

.timeline-year span {
  font-size: 27px;
  font-weight: 760;
}

.timeline-year strong {
  font-size: 15.5px;
  line-height: 1.4;
}

.timeline-item {
  min-height: 140px;
  padding: 10px 0 22px 20px;
  grid-template-columns: minmax(0, 1fr) 88px;
  gap: 13px;
}

.timeline-copy h3 {
  margin: 8px 0 7px;
  font-size: 17px;
  line-height: 1.38;
  font-weight: 740;
}

.timeline-copy p {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.65;
}

.timeline-item > img {
  width: 88px;
  height: 106px;
}

.evidence-line {
  width: max-content;
  max-width: 100%;
  min-height: 30px;
  padding: 5px 8px;
  flex-wrap: wrap;
  border-radius: 7px;
  background: var(--green-wash);
  color: var(--green-dark);
  font-size: 12px;
  line-height: 1.35;
}

.people-summary {
  min-height: 104px;
  padding: 17px;
}

.people-count {
  font-size: 44px;
}

.people-summary strong {
  font-size: 17px;
}

.people-summary p {
  margin-top: 7px;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.45;
}

.person-row {
  min-height: 82px;
  padding: 11px 13px;
  grid-template-columns: 48px minmax(0, 1fr) 20px;
}

.person-avatar {
  width: 46px;
  height: 46px;
  font-size: 15px;
}

.person-row strong {
  font-size: 16px;
  font-weight: 720;
}

.person-row small {
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.4;
}

.photo-cell span {
  left: 10px;
  right: 10px;
  bottom: 10px;
  max-width: none;
  min-height: 32px;
  padding: 7px 9px;
  display: flex;
  align-items: center;
  font-size: 13px;
  font-weight: 680;
  line-height: 1.35;
}

.book-cover-copy span {
  font-size: 12.5px;
  font-weight: 650;
  opacity: 0.96;
}

.book-cover-copy h2 {
  margin: 9px 0 7px;
  font-size: 28px;
  line-height: 1.25;
}

.book-cover-copy p {
  font-size: 14px;
  line-height: 1.45;
  opacity: 0.96;
}

.book-progress {
  min-height: 92px;
}

.book-progress strong {
  font-size: 23px;
  font-weight: 760;
}

.book-progress span {
  margin-top: 5px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 620;
}

.chapter-row {
  min-height: 82px;
  padding: 13px 12px;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 10px;
}

.chapter-index {
  font-size: 18px;
  font-weight: 700;
}

.chapter-copy strong {
  font-size: 16px;
  line-height: 1.35;
  font-weight: 720;
}

.chapter-copy small {
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 12.5px;
}

.source-status {
  min-height: 30px;
  padding-inline: 8px;
  font-size: 12.5px;
  font-weight: 700;
}

.export-button,
.primary-command,
.secondary-command,
.choice-button {
  min-height: 50px;
  font-size: 15px;
}

.family-hero {
  min-height: 130px;
  padding: 14px;
  grid-template-columns: 86px minmax(0, 1fr) 42px;
}

.family-hero-illustration {
  width: 86px;
  height: 86px;
}

.family-hero h2 {
  font-size: 20px;
}

.review-task {
  padding: 16px;
}

.review-task-top {
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
}

.review-icon {
  width: 42px;
  height: 42px;
}

.review-task-top span {
  width: max-content;
  max-width: 100%;
  min-height: 25px;
  padding: 4px 7px;
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  background: var(--surface-muted);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 680;
}

.review-task-top h3 {
  margin-top: 7px;
  font-size: 16px;
  line-height: 1.4;
}

.choice-button {
  font-size: 15px;
  font-weight: 720;
}

.person-evidence {
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 13px;
}

.person-evidence img {
  width: 86px;
  height: 66px;
}

.activity-row {
  min-height: 78px;
  padding: 8px 12px;
  grid-template-columns: 42px minmax(0, 1fr) auto;
}

.activity-avatar {
  width: 40px;
  height: 40px;
  font-size: 13px;
}

.activity-row strong {
  font-size: 14.5px;
  line-height: 1.35;
}

.activity-row p {
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 12.5px;
}

.activity-row small {
  padding: 4px 6px;
  border-radius: 6px;
  background: var(--surface-muted);
  color: var(--ink-soft);
  font-size: 12px;
}

.count-badge {
  min-width: 28px;
  height: 28px;
  font-size: 12.5px;
}

.personal-start-panel strong,
.personal-starters strong {
  font-size: 16px;
}

.personal-start-panel span,
.personal-starters small,
.personal-empty p {
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.55;
}

.flow-header span,
.listening-label,
.control-button,
.live-transcript {
  font-size: 14px;
}

.interview-stage h2 {
  font-size: 23px;
  font-weight: 740;
}

.review-header > span:nth-child(2) {
  font-size: 16px;
}

.model-status,
.next-thread span {
  font-size: 12px;
}

.review-content > p,
.chapter-preview {
  font-size: 16px;
}

.fact-list span,
.fact-list strong,
.review-audio-button,
.next-thread p {
  font-size: 14px;
}

.sheet-heading h2 {
  font-size: 23px;
  line-height: 1.3;
}

.guest-account-panel p {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.65;
}

.member-account-panel strong,
.setting-row strong {
  font-size: 15px;
}

.member-account-panel small,
.setting-row small,
.provider-line,
.auth-form label > span {
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.45;
}

.setting-row {
  min-height: 72px;
}

.range-setting {
  min-height: 112px;
}

.range-limits,
.source-footer,
.source-footer button {
  color: var(--ink-soft);
  font-size: 12px;
}

.toast {
  min-height: 48px;
  font-size: 14px;
}

.phone-app.is-large-type .demo-guide {
  grid-template-columns: 88px minmax(0, 1fr);
}

.phone-app.is-large-type .demo-guide-portrait {
  width: 88px;
  height: 88px;
}

.phone-app.is-large-type .demo-guide button {
  width: 100%;
  grid-column: 1 / -1;
}

.phone-app.is-large-type .home-greeting {
  display: block;
}

.phone-app.is-large-type .source-note {
  width: max-content;
  max-width: 100%;
  margin-top: 10px;
  white-space: normal;
}

.phone-app.is-large-type .chapter-row {
  grid-template-columns: 38px minmax(0, 1fr);
}

.phone-app.is-large-type .source-status {
  width: max-content;
  max-width: 100%;
  grid-column: 2;
  white-space: normal;
}

.phone-app.is-large-type .family-hero {
  position: relative;
  grid-template-columns: 86px minmax(0, 1fr);
  padding-right: 58px;
}

.phone-app.is-large-type .family-hero > .icon-button {
  position: absolute;
  top: 14px;
  right: 14px;
}

.phone-app.is-large-type .activity-row {
  grid-template-columns: 46px minmax(0, 1fr);
  padding-block: 12px;
}

.phone-app.is-large-type .activity-row small {
  width: max-content;
  grid-column: 2;
}

.phone-app.is-extra-large-type .story-facts {
  display: grid;
  grid-template-columns: 1fr;
}

.phone-app.is-extra-large-type .story-facts span {
  width: max-content;
  max-width: 100%;
}

.phone-app.is-extra-large-type .timeline-item {
  grid-template-columns: 1fr;
}

.phone-app.is-extra-large-type .timeline-item > img {
  width: min(100%, 220px);
  height: auto;
  aspect-ratio: 4 / 3;
}

.phone-app.is-extra-large-type .person-row {
  grid-template-columns: 52px minmax(0, 1fr);
}

.phone-app.is-extra-large-type .person-row > svg {
  display: none;
}

.phone-app.is-extra-large-type .person-evidence {
  grid-template-columns: 1fr;
}

.phone-app.is-extra-large-type .person-evidence img {
  width: min(100%, 220px);
  height: auto;
  aspect-ratio: 4 / 3;
}

@media (max-width: 370px) {
  .demo-guide {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .demo-guide-portrait {
    width: 64px;
    height: 64px;
  }

  .story-prompt-copy h2 {
    font-size: 20px;
  }

  .timeline-item {
    grid-template-columns: minmax(0, 1fr) 76px;
  }

  .timeline-item > img {
    width: 76px;
    height: 96px;
  }

  .source-status {
    max-width: 74px;
    white-space: normal;
    text-align: center;
  }
}

/* Header identity and stable icon geometry. */
.header-brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-brand-mark {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(49, 92, 57, 0.12);
  border-radius: 50%;
  background: var(--green-wash);
  color: var(--green-dark);
  box-shadow:
    inset 0 0 0 3px rgba(255, 254, 250, 0.68),
    0 3px 10px rgba(49, 92, 57, 0.08);
}

.header-brand-copy {
  min-width: 0;
  padding-top: 1px;
}

.header-brand .header-kicker {
  color: #5c6d60;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.header-brand h1 {
  overflow: hidden;
  margin-top: 4px;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0;
}

.app-header {
  gap: 8px;
}

.header-actions {
  flex: 0 0 auto;
}

.app-header svg,
.personal-start-panel svg,
.personal-starters svg {
  display: block;
  flex: 0 0 auto;
}

.personal-start-panel > .personal-start-icon {
  display: grid;
  place-items: center;
  line-height: 0;
  border: 1px solid rgba(49, 92, 57, 0.1);
  background: #edf4e9;
  box-shadow: inset 0 0 0 3px rgba(255, 254, 250, 0.72);
}

.personal-start-panel > .personal-start-icon > svg {
  display: block;
  margin: 0;
  transform: none;
}

@media (max-width: 370px) {
  .header-brand {
    gap: 8px;
  }

  .header-brand-mark {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .header-brand-mark svg {
    width: 20px;
    height: 20px;
  }

  .app-header .demo-mode-button {
    width: 34px;
    padding: 0;
    justify-content: center;
  }

  .app-header .demo-mode-button span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

/* Personal memory timeline, conservative cleanup, and version history. */
.personal-timeline {
  min-height: 100%;
}

.personal-timeline-heading {
  padding: 6px 2px 18px;
}

.personal-timeline-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.personal-timeline-entry {
  width: 100%;
  min-height: 128px;
  padding: 15px 13px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.personal-timeline-entry:last-child {
  border-bottom: 0;
}

.personal-timeline-entry:active {
  background: var(--surface-muted);
}

.personal-timeline-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green-wash);
  color: var(--green-dark);
}

.personal-timeline-copy {
  min-width: 0;
}

.personal-timeline-copy > * {
  display: block;
}

.personal-timeline-copy > small:first-child {
  color: var(--blue-dark);
  font-size: 12.5px;
  font-weight: 700;
}

.personal-timeline-copy > strong {
  margin-top: 6px;
  font-size: 17px;
  line-height: 1.4;
}

.personal-timeline-copy > span {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 7px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.personal-timeline-copy .personal-timeline-version {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 12px;
}

.personal-timeline-entry > svg {
  color: var(--green-dark);
}

.review-cleanup-note,
.memory-detail-source {
  min-height: 66px;
  margin-top: 18px;
  padding: 10px 11px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(74, 135, 81, 0.16);
  border-radius: var(--radius);
  background: var(--green-wash);
}

.review-cleanup-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface);
  color: var(--green-dark);
}

.review-cleanup-note > span:nth-child(2),
.memory-detail-source > span {
  min-width: 0;
}

.review-cleanup-note strong,
.review-cleanup-note small,
.memory-detail-source strong,
.memory-detail-source small {
  display: block;
}

.review-cleanup-note strong,
.memory-detail-source strong {
  font-size: 14px;
}

.review-cleanup-note small,
.memory-detail-source small {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.4;
}

.review-cleanup-note button,
.memory-detail-source button,
.version-row button {
  min-width: 66px;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid rgba(49, 92, 57, 0.16);
  border-radius: 7px;
  background: var(--surface);
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 700;
}

.memory-detail-content {
  padding-top: 22px;
}

.memory-detail-source {
  grid-template-columns: minmax(0, 1fr) auto;
  margin-top: 20px;
  background: var(--blue-wash);
  border-color: rgba(80, 110, 130, 0.14);
}

.memory-detail-facts {
  margin-top: 14px;
}

.version-section {
  margin-top: 24px;
}

.version-heading {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--green-dark);
}

.version-heading strong,
.version-heading small {
  display: block;
}

.version-heading strong {
  font-size: 16px;
}

.version-heading small {
  margin-top: 5px;
  color: var(--ink-soft);
  font-size: 12px;
}

.version-list {
  border-bottom: 1px solid var(--line);
}

.version-row {
  min-height: 116px;
  padding: 14px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.version-row:last-child {
  border-bottom: 0;
}

.version-row > span {
  min-width: 0;
}

.version-row strong,
.version-row small {
  display: block;
}

.version-row strong {
  font-size: 14px;
}

.version-row small {
  margin-top: 5px;
  color: var(--ink-soft);
  font-size: 12px;
}

.version-row p {
  display: -webkit-box;
  overflow: hidden;
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.version-row button:disabled {
  border-color: transparent;
  background: var(--surface-muted);
  color: var(--ink-soft);
}

.phone-app.is-large-type .review-cleanup-note,
.phone-app.is-large-type .memory-detail-source {
  grid-template-columns: minmax(0, 1fr);
}

.phone-app.is-large-type .review-cleanup-mark {
  display: none;
}

.phone-app.is-large-type .review-cleanup-note button,
.phone-app.is-large-type .memory-detail-source button {
  width: 100%;
}

.phone-app.is-extra-large-type .personal-timeline-entry {
  grid-template-columns: 44px minmax(0, 1fr);
}

.phone-app.is-extra-large-type .personal-timeline-entry > svg {
  display: none;
}

.phone-app.is-extra-large-type .version-row {
  grid-template-columns: minmax(0, 1fr);
}

.phone-app.is-extra-large-type .version-row button {
  width: 100%;
}

/* Editable personal memories share the detail view's typography and spacing. */
.memory-edit-form {
  padding-top: 22px;
}

.memory-edit-form label {
  min-width: 0;
  margin-bottom: 20px;
  display: block;
}

.memory-edit-form label > span {
  margin-bottom: 8px;
  display: block;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
}

.memory-edit-form input,
.memory-edit-form textarea {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: 0;
}

.memory-edit-form textarea {
  min-height: 240px;
  resize: vertical;
}

.memory-edit-form input:focus,
.memory-edit-form textarea:focus {
  border-color: var(--green);
  outline: 2px solid var(--green-wash);
  outline-offset: 2px;
}

.memory-edit-form [aria-invalid="true"] {
  border-color: var(--danger);
}

.memory-edit-form input:disabled,
.memory-edit-form textarea:disabled {
  opacity: 0.7;
}

.memory-edit-feedback {
  margin-top: 4px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.memory-edit-feedback p {
  margin: 0 0 12px;
  color: var(--danger);
  font-size: 14px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.memory-detail-actions {
  flex: 0 0 auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.memory-detail-actions button,
.memory-edit-feedback button {
  width: 100%;
  min-width: 0;
  height: auto;
  min-height: 52px;
  padding: 12px 9px;
  line-height: 1.4;
}

.memory-detail-actions button > span,
.memory-edit-feedback button > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.memory-detail-actions button > svg,
.memory-edit-feedback button > svg {
  flex: 0 0 auto;
}

.memory-detail-overlay button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.memory-detail-overlay .review-header {
  flex: 0 0 auto;
  grid-template-columns: 40px minmax(0, 1fr) auto;
}

.memory-detail-overlay .model-status {
  height: auto;
  min-height: 28px;
  padding-block: 5px;
  line-height: 1.35;
}

.memory-detail-content h2,
.memory-detail-content > p,
.memory-detail-content .fact-list strong,
.personal-timeline-copy > *,
.version-row > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.memory-detail-content > p {
  white-space: pre-wrap;
}

.memory-detail-content .fact-list div {
  padding-block: 12px;
  align-items: flex-start;
}

.memory-detail-content .fact-list div > span {
  flex: 0 0 auto;
}

.memory-detail-content .fact-list strong {
  text-align: right;
}

.version-row .version-facts {
  color: var(--blue-dark);
  line-height: 1.5;
}

.phone-app.is-large-type .memory-detail-actions {
  grid-template-columns: minmax(0, 1fr);
}

.phone-app.is-extra-large-type .memory-detail-overlay .review-header {
  grid-template-columns: 40px minmax(0, 1fr);
}

.phone-app.is-extra-large-type .memory-detail-overlay .model-status {
  grid-column: 2;
  justify-self: start;
}
