:root {
  color-scheme: dark;
  --bg: #101714;
  --surface: #1b261e;
  --text: #eeeee4;
  --muted: #b8bfb3;
  --accent: #c6d7ae;
  --line: #44533f;
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Avenir Next", Avenir, "Segoe UI", sans-serif;
}
* {
  box-sizing: border-box;
}
html {
  scroll-padding-block: 24px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
[hidden] {
  display: none !important;
}
.wrap {
  width: min(760px, calc(100% - 40px));
  margin-inline: auto;
  padding-inline: env(safe-area-inset-left) env(safe-area-inset-right);
}
h1,
h2,
h3,
p,
figure {
  margin: 0;
}
h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.025em;
}
h1 {
  font-size: clamp(2.6rem, 7vw, 4rem);
  margin: 22px 0;
}
h2 {
  font-size: clamp(1.7rem, 4vw, 2rem);
  margin-bottom: 15px;
}
h3 {
  font-size: 1.25rem;
  margin-block: 20px 10px;
}
em {
  color: var(--accent);
}
p {
  color: var(--muted);
}
a {
  color: inherit;
  text-underline-offset: 5px;
}
button,
input,
textarea {
  font: inherit;
  font-size: 16px;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
button,
a,
input,
textarea,
summary {
  -webkit-tap-highlight-color: transparent;
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
  image-orientation: from-image;
}
.app-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding-top: max(16px, env(safe-area-inset-top));
  padding-bottom: 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
  letter-spacing: 0.23em;
  text-decoration: none;
}
.brand span {
  color: var(--accent);
  font-size: 32px;
  margin-left: 4px;
}
.home-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: 13px;
}
.mode-notice {
  border-left: 2px solid var(--accent);
  padding: 12px 16px;
  background: var(--surface);
  margin-bottom: 30px;
}
.mode-notice strong {
  font-size: 14px;
  font-weight: 600;
}
.mode-notice p {
  font-size: 13px;
  margin-top: 6px;
}
.mode-notice #mode-extra {
  font-size: 12px;
}
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.12em;
}
.intro {
  max-width: 51ch;
  font-size: 17px;
}
.ghost,
.text-button,
.primary {
  min-height: 48px;
  padding: 10px 15px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  line-height: 1.5;
}
.ghost:hover:not(:disabled),
.text-button:hover {
  background: #283527;
}
.section-head .ghost {
  font-size: 13px;
  flex-shrink: 0;
}
.primary {
  background: var(--accent);
  color: #192117;
  border-color: var(--accent);
  font-weight: 600;
  min-height: 54px;
  width: 100%;
}
.primary:hover:not(:disabled) {
  background: #d5e4bf;
}
.text-button {
  border-color: transparent;
  text-decoration: underline;
  text-underline-offset: 5px;
}
.capture-surface {
  width: 100%;
  margin: 28px 0 22px;
  min-height: 245px;
  padding: 25px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid #6e805f;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
}
.capture-ring {
  display: grid;
  place-items: center;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 50%;
  width: 64px;
  height: 64px;
  font-size: 36px;
  line-height: 1;
}
.capture-label {
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1.2;
}
.capture-sub {
  font-size: 14px;
  color: var(--muted);
  max-width: 34ch;
}
.loc-toggle {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 48px;
  cursor: pointer;
  font-size: 14px;
}
.loc-toggle input {
  width: 22px;
  height: 22px;
  flex: none;
  accent-color: var(--accent);
}
.fine-print {
  font-size: 12px;
  line-height: 1.7;
  margin-top: 9px;
}
.capture-foot .fine-print + .fine-print {
  margin-top: 14px;
}
.saving-photo {
  max-width: 460px;
  max-height: 45svh;
  width: 100%;
  object-fit: contain;
  margin: 25px auto;
}
.moment-photo {
  margin: 25px 0 15px;
}
.moment-photo img {
  max-height: 420px;
  width: 100%;
  object-fit: contain;
  background: var(--surface);
  border-radius: 7px;
}
.moment-photo figcaption {
  font-size: 12px;
  color: var(--muted);
  margin-top: 9px;
}
.status {
  font-size: 14px;
  margin-top: 14px;
  min-height: 1px;
}
.status:empty {
  margin: 0;
}
.status.error {
  color: #ffc4b8;
}
.status.success {
  color: #c6e8bb;
}
#retry-photo {
  margin-top: 14px;
}
.voice-section,
.memory-form,
.analysis {
  border-top: 1px solid var(--line);
  margin-top: 32px;
  padding-top: 26px;
}
.voice-section > .eyebrow {
  margin-bottom: 13px;
}
.voice-section > p:not(.eyebrow):not(.fine-print):not(.status) {
  font-size: 15px;
}
.voice-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 17px;
}
.voice-actions button {
  flex: 1 1 160px;
  font-size: 14px;
}
.stop-button {
  border-color: #d59e8a;
  color: #ffc4b8;
}
audio {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin-top: 17px;
}
.memory-form {
  display: grid;
  gap: 12px;
}
.memory-form h2 {
  margin-bottom: 8px;
}
.memory-form label {
  font-size: 14px;
  color: var(--text);
  margin-top: 8px;
}
.memory-form label span {
  color: var(--muted);
}
.memory-form .fine-print {
  margin-top: -5px;
}
.memory-form input,
.memory-form textarea {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid #7a896d;
  border-radius: 7px;
  padding: 13px 15px;
  resize: vertical;
  scroll-margin-block: 25px;
}
.memory-form textarea {
  min-height: 145px;
}
.memory-form input::placeholder,
.memory-form textarea::placeholder {
  color: #afbba5;
  opacity: 1;
}
.memory-form .primary {
  margin-top: 8px;
}
.analysis {
  font-size: 14px;
}
summary {
  min-height: 48px;
  cursor: pointer;
  align-content: center;
}
.analysis > p {
  margin-block: 12px;
}
.analysis ul {
  padding-left: 20px;
  color: var(--muted);
}
.analysis li + li {
  margin-top: 9px;
}
.confirm-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.confirm-row button {
  flex: 1 1 80px;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  padding: 8px;
}
.confirm-row [aria-pressed="true"] {
  background: var(--accent);
  color: var(--bg);
}
.timeline {
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 25px;
}
.timeline > li {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}
.timeline img {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
}
.timeline-body {
  padding: 22px;
  min-width: 0;
}
.t-when {
  font-size: 12px;
  color: var(--muted);
}
.t-feelings {
  font-family: var(--serif);
  font-size: 24px;
  color: var(--text);
  margin-top: 14px;
}
.t-note {
  margin-top: 13px;
  white-space: pre-wrap;
  color: var(--text);
}
.timeline-body button {
  margin-top: 16px;
  font-size: 14px;
}
.empty {
  padding: 36px 0;
}
.app-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: space-between;
  align-items: center;
  margin-top: 50px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
  padding-bottom: max(28px, env(safe-area-inset-bottom));
  font-size: 12px;
  color: var(--muted);
}
.app-footer a {
  min-height: 44px;
  display: flex;
  align-items: center;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 400px) {
  .section-head {
    gap: 10px;
  }
  .section-head > .eyebrow {
    max-width: 15ch;
  }
  .capture-surface {
    padding: 22px 16px;
  }
  .capture-label {
    font-size: 24px;
  }
  .timeline-body {
    padding: 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
