@font-face {
  font-family: Manrope;
  src: url("/assets/manrope-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
:root {
  --paper: #fafbf8;
  --surface: #fff;
  --ink: #252b22;
  --muted: #596155;
  --line: #dfe3da;
  --olive: #485c36;
  --pale: #e8eddf;
  --danger: #9c3025;
  font-family: Manrope, system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  line-height: 1.5;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
.button {
  min-height: 48px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 750;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
input,
textarea,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
}
textarea {
  min-height: 112px;
  resize: vertical;
}
a {
  color: inherit;
}
:focus-visible {
  outline: 3px solid #829862;
  outline-offset: 3px;
}
.primary {
  background: var(--olive);
  color: #fff;
}
.quiet {
  background: #fff;
  border-color: var(--line);
}
.danger {
  color: var(--danger);
  background: #fff6f4;
  border-color: #efc8c2;
}
.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 10;
  background: #fff;
  padding: 8px;
}
.skip:focus {
  left: 8px;
}
.brand {
  font-size: 22px;
  font-weight: 850;
  letter-spacing: -0.06em;
  text-decoration: none;
}
.mark {
  display: inline-flex;
  gap: 2px;
  margin-right: 7px;
}
.mark i {
  width: 10px;
  height: 15px;
  background: var(--olive);
  border-radius: 90% 10% 90% 10%;
  transform: rotate(-30deg);
}
.mark i + i {
  transform: rotate(30deg);
}
.landing {
  max-width: 1240px;
  margin: auto;
  padding: 22px 28px 64px;
}
.landing-nav,
.topline,
.section-title,
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.landing-nav nav,
.actions,
.inline,
.quick-actions,
.dialog-foot {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.landing-nav a {
  padding: 8px 10px;
  text-decoration: none;
}
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: center;
  min-height: 600px;
}
.eyebrow {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 750;
}
.hero h1 {
  font-size: clamp(42px, 5vw, 60px);
  line-height: 1;
  letter-spacing: -0.06em;
  margin: 15px 0;
}
.hero p {
  font-size: 19px;
  color: var(--muted);
  max-width: 530px;
}
.photo {
  margin: 0;
}
.photo img {
  display: block;
  width: 100%;
  height: 440px;
  object-fit: cover;
  border-radius: 26px;
}
.photo figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}
.promise {
  border-top: 1px solid var(--line);
  margin-top: 28px;
  padding: 42px 0;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 30px;
}
.promise h2 {
  margin: 0;
  font-size: 29px;
  line-height: 1.15;
}
.promise p {
  margin: 0;
  color: var(--muted);
}
.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.auth-card {
  width: min(100%, 460px);
  padding: 34px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
}
.auth-card h1 {
  font-size: 34px;
  line-height: 1.1;
  letter-spacing: -0.05em;
}
.form-row {
  margin: 15px 0;
}
.form-row label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
}
.helper,
.error,
.sub {
  color: var(--muted);
}
.error {
  color: var(--danger);
  font-weight: 650;
}
.shell {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 16px;
  background: #f5f7f1;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.sidebar nav {
  display: grid;
  gap: 4px;
  margin-top: 30px;
}
.nav-link {
  padding: 11px 13px;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 700;
  color: var(--muted);
}
.nav-link.active {
  background: var(--pale);
  color: var(--ink);
}
.side-bottom {
  margin-top: auto;
}
.main {
  max-width: 1120px;
  width: 100%;
  margin: auto;
  padding: 42px clamp(22px, 5vw, 68px);
}
.topline {
  align-items: flex-start;
}
.topline h1 {
  font-size: 36px;
  letter-spacing: -0.05em;
  margin: 4px 0;
}
.capture-label {
  background: var(--olive);
  color: #fff;
}
.quick-actions {
  margin: 24px 0;
}
.home-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 38px;
  margin-top: 30px;
}
.section-title {
  border-bottom: 1px solid var(--line);
  padding-bottom: 9px;
}
.section-title h2 {
  font-size: 18px;
  margin: 0;
}
.text-link {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--olive);
}
.entry {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}
.entry h3,
.memory-card h3 {
  font-size: 17px;
  margin: 0 0 4px;
}
.entry p,
.memory-card p {
  margin: 0;
  color: var(--muted);
  white-space: pre-wrap;
}
.entry small,
.memory-card small {
  color: var(--muted);
  display: block;
}
.entry-actions {
  display: flex;
  gap: 8px;
  align-items: start;
}
.icon-btn {
  min-height: 44px;
  min-width: 44px;
  padding: 8px;
  background: #fff;
  border-color: var(--line);
}
.tag {
  font-size: 12px;
  background: var(--pale);
  padding: 2px 8px;
  border-radius: 99px;
  font-weight: 750;
}
.tag.private {
  background: #eef0eb;
  color: #596155;
}
.toolbar {
  margin: 25px 0 12px;
}
.toolbar input {
  max-width: 420px;
}
.empty {
  padding: 36px 0;
  max-width: 500px;
}
.empty h2 {
  font-size: 27px;
  letter-spacing: -0.04em;
  margin: 0 0 8px;
}
.empty p {
  color: var(--muted);
}
.notice {
  margin: 20px 0;
  padding: 13px 15px;
  background: var(--pale);
  border-radius: 10px;
}
.memory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
}
.memory-card {
  display: grid;
  gap: 10px;
}
.memory-open {
  min-height: 0;
  padding: 0;
  background: none;
  border: 0;
  display: block;
  text-align: left;
}
.memory-open img,
.photo-missing,
.memory-detail-photo {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 14px;
}
.photo-missing {
  display: grid;
  place-items: center;
  background: var(--pale);
  color: var(--muted);
}
.memory-detail-photo {
  margin-bottom: 14px;
}
.settings-section {
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
  max-width: 720px;
}
.settings-section h2 {
  font-size: 21px;
}
.mobile-nav {
  display: none;
}
dialog {
  width: min(100% - 28px, 660px);
  border: 0;
  padding: 0;
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 18px 80px #0004;
}
dialog::backdrop {
  background: #26302570;
}
.dialog-inner {
  padding: 24px;
}
.dialog-head h2 {
  margin: 0;
  font-size: 26px;
}
.type-tabs {
  display: flex;
  gap: 6px;
  overflow: auto;
  margin-bottom: 18px;
}
.type-tabs button {
  min-height: 44px;
  white-space: nowrap;
  background: #f3f5f0;
}
.type-tabs button[aria-pressed="true"] {
  background: var(--pale);
}
.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}
.dialog-foot {
  justify-content: flex-end;
  margin-top: 20px;
}
.toast,
.offline-banner {
  position: fixed;
  z-index: 20;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 16px;
  border-radius: 10px;
  background: #263025;
  color: #fff;
  box-shadow: 0 5px 24px #0003;
}
.toast {
  bottom: 24px;
}
.error-toast {
  background: var(--danger);
}
.offline-banner {
  top: 12px;
  background: #754e1a;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
@media (max-width: 760px) {
  .landing {
    padding: 18px 20px 40px;
  }
  .landing-nav nav a:first-child {
    display: none;
  }
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 46px 0 30px;
    gap: 26px;
  }
  .hero h1 {
    font-size: 45px;
  }
  .photo {
    order: 2;
  }
  .photo img {
    height: 260px;
  }
  .promise {
    grid-template-columns: 1fr;
    gap: 12px;
    padding-top: 30px;
  }
  .shell {
    display: block;
    padding-bottom: 92px;
  }
  .sidebar {
    display: none;
  }
  .main {
    padding: 27px 20px;
  }
  .mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 82px;
    overflow-x: auto;
    background: #fffffff2;
    backdrop-filter: blur(10px);
    display: flex;
    z-index: 8;
    border-top: 1px solid var(--line);
  }
  .mobile-nav a {
    flex: 0 0 auto;
    padding: 18px 12px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
  }
  .mobile-nav a.active {
    color: var(--olive);
  }
  .home-grid,
  .two {
    grid-template-columns: 1fr;
  }
  .dialog-foot button {
    flex: 1;
  }
  .topline h1 {
    font-size: 31px;
  }
  .quick-actions {
    gap: 8px;
  }
  .quick-actions button {
    padding: 9px 11px;
  }
  .memory-grid {
    grid-template-columns: 1fr 1fr;
  }
  .entry-actions {
    gap: 4px;
  }
}
/* Landing story: content rather than floating decoration. */
.photo {
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
}
.photo img {
  height: 310px;
  border-radius: 13px;
}
.photo figcaption {
  padding: 14px 8px 6px;
}
.photo figcaption h2 {
  margin: 5px 0 3px;
  font-size: 21px;
  letter-spacing: -0.025em;
}
.photo figcaption p {
  font-size: 14px;
  margin: 0;
}
.photo figcaption .eyebrow {
  font-size: 11px;
}
.promise {
  grid-template-columns: 0.85fr 1.15fr;
  gap: 64px;
  padding-top: 48px;
}
.promise h2 {
  margin-top: 12px;
  max-width: 330px;
}
.walkthrough {
  list-style: none;
  padding: 0;
  margin: 0;
}
.walkthrough li {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 18px;
  padding: 0 0 24px;
}
.walkthrough li + li {
  border-top: 1px solid var(--line);
  padding-top: 24px;
}
.walkthrough h3 {
  margin: 0 0 5px;
  font-size: 18px;
}
.walkthrough p {
  font-size: 16px;
  margin: 0;
  max-width: 490px;
}
.step {
  color: var(--olive);
  font-size: 14px;
  font-weight: 750;
  padding-top: 3px;
}
.landing-footer {
  border-top: 1px solid var(--line);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.landing-footer p {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--muted);
}
.landing-footer nav {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 14px;
}
.landing-footer a,
.landing-footer button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
@media (max-width: 760px) {
  .hero {
    padding-top: 38px;
  }
  .hero h1 {
    font-size: clamp(36px, 10.8vw, 45px);
  }
  .photo img {
    height: 240px;
  }
  .promise {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .landing-footer {
    align-items: start;
    flex-direction: column;
  }
  .landing-footer nav {
    gap: 18px;
  }
}
.mobile-header {
  display: none;
}
.capture-label {
  white-space: nowrap;
  flex-shrink: 0;
}
.pair-status {
  display: flex;
  gap: 20px;
  align-items: center;
  margin: 16px 0 4px;
  font-size: 14px;
  color: var(--muted);
}
.pair-status button {
  min-height: 44px;
}
.home-recent {
  grid-column: 1;
  grid-row: 1;
}
.home-upcoming {
  grid-column: 2;
  grid-row: 1;
}
.home-recent .memory-open img {
  height: 290px;
  aspect-ratio: auto;
}
.memory-detail-photo {
  height: auto;
  max-height: 60vh;
  aspect-ratio: auto;
  object-fit: contain;
}
@media (max-width: 760px) {
  .mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px 0;
  }
  .mobile-header .brand {
    font-size: 20px;
  }
  .mobile-header .button {
    min-height: 44px;
    font-size: 14px;
    padding: 8px 13px;
  }
  .mobile-nav {
    height: 68px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    overflow: visible;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .mobile-nav a {
    padding: 19px 4px;
    text-align: center;
    border-radius: 0;
    font-size: 13px;
  }
  .shell {
    padding-bottom: 88px;
  }
  .main {
    padding-top: 22px;
  }
  .home-recent {
    grid-column: 1;
    grid-row: 2;
  }
  .home-upcoming {
    grid-column: 1;
    grid-row: 1;
  }
  .home-recent .memory-open img {
    height: 200px;
  }
  .home-grid {
    gap: 24px;
    margin-top: 24px;
  }
  .toast {
    bottom: calc(84px + env(safe-area-inset-bottom));
    max-width: calc(100vw - 32px);
    width: max-content;
  }
  .pair-status {
    margin-top: 8px;
  }
  .quick-actions {
    margin: 12px 0;
  }
  .entry {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .memory-grid {
    grid-template-columns: 1fr;
  }
}
/* Keep task pages aligned to the top, including short collections. */
.main { margin:0 auto; align-self:start; }
/* Capture retains visible actions while its fields scroll. */
.type-tabs { flex-wrap:wrap; overflow:visible; }
.dialog-inner { padding-bottom:0; }
.dialog-foot { position:sticky; bottom:0; z-index:2; background:var(--surface); padding:14px 0 18px; border-top:1px solid var(--line); }
dialog { max-height:calc(100dvh - 32px); overflow:auto; }
