:root {
  color-scheme: light;
  --canvas: #f3f2ef;
  --surface: #fffefb;
  --ink: #303b35;
  --forest: #41584b;
  --muted: #59665d;
  --line: #dce2d9;
  --paper: #f7f1e6;
  --rust: #90502f;
  --sans: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  --serif: "Songti SC", "SimSun", "Noto Serif CJK SC", serif;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--canvas);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 0; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { line-height: 1.28; }
p, li { line-height: 1.75; }
a { color: inherit; }
button, input { font: inherit; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible { outline: 2px solid var(--forest); outline-offset: 4px; }
img, video { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.wrap {
  width: min(100% - 2 * max(20px, env(safe-area-inset-left), env(safe-area-inset-right)), 1180px);
  margin-inline: auto;
}
.skip, .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip:focus { top: 8px; left: 8px; z-index: 10; width: auto; height: auto; padding: 12px; background: white; clip-path: none; }
.site-header { border-bottom: 1px solid var(--line); background: #faf9f5; padding-top: env(safe-area-inset-top); }
.header-inner, .header-inner nav, .actions, .footer-inner, .footer-inner nav { display: flex; align-items: center; }
.header-inner { min-height: 72px; justify-content: space-between; gap: 14px; }
.header-inner nav { gap: clamp(10px, 3vw, 36px); }
.header-inner nav > a:not(.button) { padding-block: 10px; }
.header-inner nav a, .site-footer a, .brand { text-decoration: none; }
.header-inner nav a:hover, .site-footer a:hover, [aria-current="page"] { text-decoration: underline; text-underline-offset: 5px; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-mark { display: grid; place-items: center; width: 40px; aspect-ratio: 1; border: 1px solid #6f8575; border-radius: 14px; color: var(--forest); background: #e7ede4; font: 700 24px var(--serif); }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 17px; letter-spacing: .08em; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 11px; letter-spacing: .15em; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 17px; border: 1px solid var(--forest); border-radius: 10px;
  background: var(--forest); color: white; font-weight: 600; line-height: 1.4; text-decoration: none; cursor: pointer;
}
.button:hover { background: #34493d; }
.button.small { min-height: 42px; font-size: 14px; }
.button.outline { background: transparent; color: var(--forest); }
.button.outline:hover { background: #e8ede7; }
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 75px); align-items: center; padding-block: clamp(34px, 6vw, 86px); }
.hero h1 { font-family: var(--serif); font-size: clamp(29px, 4vw, 54px); letter-spacing: .025em; line-height: 1.3; }
.hero-copy p { max-width: 29em; margin-block: 19px 25px; color: var(--muted); }
.actions { gap: 14px 20px; flex-wrap: wrap; }
.text-link { padding-block: 10px; text-underline-offset: 4px; color: var(--forest); }
.hero-image { border-radius: 20px; overflow: hidden; background: #ddd4c3; }
.hero-image img { width: 100%; height: auto; aspect-ratio: 4/3; object-fit: cover; object-position: center; }
.content-section { padding-block: 12px 35px; }
.section-heading, .page-intro { margin-bottom: 25px; }
.section-heading h2, .bottom-callout h2, .faq h2 { font-family: var(--serif); font-size: clamp(24px, 3vw, 34px); }
.section-heading p, .page-intro p, .bottom-callout p { color: var(--muted); margin-top: 7px; }
.memory-grid, .plan-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.memory-card {
  min-width: 0; display: flex; flex-direction: column; align-items: flex-start;
  min-height: 225px; padding: clamp(16px, 2vw, 25px); border: 1px solid var(--line);
  border-radius: 17px; background: var(--surface); text-decoration: none;
}
.memory-card:hover { border-color: #829685; box-shadow: 0 4px 16px #42584912; }
.memory-card.book { background: var(--paper); border-color: #e5dac8; }
.memory-card.world { background: #ebf0e8; }
.memory-card.letters { background: #fdfbf4; }
.card-top { display: flex; width: 100%; justify-content: space-between; align-items: center; margin-bottom: 10px; color: var(--muted); font-size: 13px; }
.card-icon { font-size: 21px; color: var(--forest); }
.memory-card h3 { margin-bottom: 8px; font-family: var(--serif); font-size: 23px; }
.memory-card p { font-size: 14px; color: var(--muted); }
.book-note { margin-top: 9px; color: var(--rust); font-size: 13px; line-height: 1.6; }
.card-arrow { align-self: flex-end; margin-top: auto; padding-top: 12px; color: var(--forest); }
.bottom-callout { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: clamp(19px, 3vw, 35px); margin-block: 9px 44px; border-radius: 17px; background: #e8ede7; }
.site-footer { border-top: 1px solid var(--line); background: #faf9f5; padding: 23px 0 max(23px, env(safe-area-inset-bottom)); }
.footer-inner { justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-inner small { display: block; margin-top: 6px; color: var(--muted); }
.footer-inner nav { gap: 10px 20px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.pricing-main { padding-block: clamp(28px, 5vw, 65px); }
.page-intro h1 { font: 700 clamp(31px, 5vw, 50px)/1.2 var(--serif); }
.plan { display: flex; flex-direction: column; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 17px; }
.plan.featured { background: #edf1e9; border-color: #9caf9d; }
.plan h2 { font-size: 20px; margin-bottom: 14px; }
.price { font-size: 31px; font-weight: 700; line-height: 1.25; }
.price small { color: var(--muted); font-size: 13px; font-weight: 400; white-space: nowrap; }
.plan ul { margin: 15px 0 20px; padding-left: 1.2em; color: var(--muted); font-size: 14px; }
.plan > .button { margin-top: auto; }
.cycles { display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 0 0 12px; border: 0; min-width: 0; }
.cycles label { display: flex; gap: 4px; align-items: center; padding: 5px; font-size: 13px; min-height: 34px; cursor: pointer; }
.cycles input { margin: 0; accent-color: var(--forest); }
.faq { max-width: 760px; margin-top: 42px; }
.faq h2 { margin-bottom: 14px; }
.faq details { padding-block: 13px; border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { margin: 10px 0 0 1.1em; color: var(--muted); }
.space-main { padding-block: clamp(25px, 4vw, 52px); }
.space-top { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.space-top h1 { margin-top: 10px; font: 700 clamp(27px, 4vw, 43px)/1.2 var(--serif); }
.space-panel, .form-card { padding: clamp(17px, 4vw, 34px); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.space-panel { margin-block: 20px; }
.space-panel h2, .space-panel h3 { margin-bottom: 8px; }
.space-panel video { max-height: min(68vh, 650px); background: #252e28; border-radius: 12px; margin-block: 12px; }
.space-panel ul { padding-left: 1.25em; }
.moment { padding-block: 15px; border-bottom: 1px solid var(--line); }
.moment p { white-space: pre-wrap; overflow-wrap: anywhere; }
.moment img { max-height: 420px; border-radius: 9px; margin-top: 8px; object-fit: contain; }
.form-card { max-width: 500px; margin-inline: auto; }
.form-card h1 { font-family: var(--serif); margin-bottom: 12px; }
.form-card > p { color: var(--muted); margin-bottom: 17px; }
.form-card form { display: grid; gap: 12px; }
.form-card label { display: grid; gap: 5px; }
.form-card input:not([type="checkbox"]) { width: 100%; padding: 10px; min-height: 44px; border: 1px solid #98a69a; border-radius: 8px; background: white; color: var(--ink); }
.form-card .consent { display: flex; flex-wrap: wrap; align-items: baseline; }
.form-card output { min-height: 1.5em; color: #883b26; }
.archive-links { display: flex; gap: 12px 22px; align-items: center; flex-wrap: wrap; }
@media (max-width: 930px) {
  .memory-grid, .plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .header-inner { min-height: 61px; }
  .header-inner nav { font-size: 13px; }
  .header-inner nav a[href="/#memories"] { display: none; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 22px; padding-block: 30px; }
  .hero h1 { font-size: clamp(27px, 8vw, 42px); }
  .hero-copy p { margin-block: 12px 16px; font-size: 15px; }
  .hero-image img { aspect-ratio: 16/10; }
  .bottom-callout { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 480px) {
  .plan-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 345px) {
  .memory-grid { grid-template-columns: minmax(0, 1fr); }
  .header-inner nav a[href="/pricing.html"] { display: none; }
}
@media (orientation: landscape) and (max-height: 510px) and (min-width: 641px) {
  .header-inner { min-height: 55px; }
  .hero { padding-block: 18px; gap: 22px; }
  .hero h1 { font-size: clamp(26px, 4.3vw, 39px); }
  .hero-copy p { margin-block: 10px 14px; font-size: 14px; }
  .hero-image img { aspect-ratio: 16/9; }
}
@media (prefers-reduced-motion: no-preference) {
  .memory-card { transition: border-color 140ms ease, box-shadow 140ms ease; }
}
.space-main > [role="status"], #load-more, #content-more { margin-block: 13px; }
#archive-list .memory-card { min-height: 105px; }
#archive-description, #content-result { overflow-wrap: anywhere; }
#saved-video { max-width: 100%; min-height: 40px; margin: 0 8px; }
.space-panel .button { margin-top: 12px; }
.form-card textarea { width: 100%; resize: vertical; min-height: 9em; padding: 12px; font: inherit; border: 1px solid #98a69a; border-radius: 8px; background: var(--surface); color: var(--ink); }
.archive-thumb { width: 54px; aspect-ratio: 1; object-fit: cover; border-radius: 50%; margin-bottom: 8px; }
