:root {
  --cream: #fff7e5;
  --paper: #fffdf6;
  --wine: #69001e;
  --wine-dark: #3d0012;
  --red: #ff3b32;
  --yellow: #ffd83d;
  --yellow-soft: #fff0af;
  --muted: #9d7b78;
  --line: rgba(105, 0, 30, 0.18);
  --ink: #1b1711;
  --max: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--wine);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
.skip-link { position: fixed; left: 20px; top: -80px; z-index: 120; background: #fff; padding: 12px 18px; }
.skip-link:focus { top: 20px; }

.site-header {
  width: min(calc(100% - 40px), var(--max));
  height: 88px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 180px 1fr auto;
  align-items: center;
  gap: 32px;
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 10;
}
.brand img { width: 142px; height: auto; }
nav { display: flex; justify-content: center; gap: 34px; }
nav a, .header-cta { font-size: 14px; font-weight: 700; text-decoration: none; }
nav a { padding: 12px 0; position: relative; }
nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 5px; height: 2px; background: var(--red); transition: right .2s ease; }
nav a:hover::after, nav a:focus-visible::after { right: 0; }
.header-cta { border: 2px solid var(--wine); padding: 10px 17px; border-radius: 999px; transition: .2s ease; }
.header-cta:hover { background: var(--wine); color: var(--cream); transform: translateY(-2px); }

.hero {
  width: min(calc(100% - 40px), var(--max));
  min-height: 760px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.03fr .97fr;
  align-items: center;
  gap: clamp(40px, 7vw, 110px);
  padding: 74px 0 95px;
  overflow: hidden;
}
.eyebrow, .section-index { margin: 0 0 24px; font-size: 13px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow::before { content: ""; display: inline-block; width: 42px; height: 3px; background: var(--red); vertical-align: middle; margin-right: 14px; }
h1, h2, h3, p { text-wrap: pretty; }
.title-line { display: block; white-space: nowrap; }
h1 {
  margin: 0;
  font-family: "Songti SC", "STSong", serif;
  font-size: clamp(58px, 5.8vw, 82px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -.045em;
}
.hero-lede { max-width: 620px; margin: 34px 0 0; color: #6f4d49; font-size: 18px; line-height: 1.85; }
.hero-actions { display: flex; align-items: center; gap: 28px; margin-top: 38px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 26px; border-radius: 4px; font-weight: 800; text-decoration: none; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.button-primary { background: var(--red); color: white; box-shadow: 6px 7px 0 var(--wine); }
.button-primary:hover { transform: translate(-2px, -2px); box-shadow: 9px 10px 0 var(--wine); }
.text-link { font-weight: 750; text-underline-offset: 5px; }
.text-link span { color: var(--red); }
.microcopy { margin: 30px 0 0; color: var(--muted); font-size: 13px; letter-spacing: .05em; }

.hero-visual { min-height: 650px; position: relative; }
.phone-shot {
  margin: 0;
  position: absolute;
  width: min(290px, 50%);
  aspect-ratio: 1206 / 2622;
  overflow: hidden;
  border-radius: 36px;
  border: 3px solid var(--wine);
  background: var(--paper);
  box-shadow: 16px 19px 0 rgba(105, 0, 30, .1);
}
.phone-shot img { width: 100%; height: 100%; object-fit: cover; }
.phone-shot-back { top: 10px; left: 2%; transform: rotate(-5.5deg); }
.phone-shot-front { right: 1%; bottom: 20px; transform: rotate(5deg); z-index: 2; }
.scribble-label { position: absolute; top: 12px; right: 0; z-index: 4; background: var(--yellow); color: var(--wine); border: 2px solid var(--wine); padding: 11px 18px; font-weight: 900; transform: rotate(3deg); box-shadow: 5px 5px 0 var(--wine); }

.manifesto, .how, .screens, .principles, .download-section { width: min(calc(100% - 40px), var(--max)); margin: 0 auto; }
.manifesto { border-top: 1px solid var(--line); padding: 124px 0; display: grid; grid-template-columns: .6fr 1.25fr .85fr; gap: 48px; }
.section-index { color: var(--red); }
h2 { margin: 0; font-family: "Songti SC", "STSong", serif; font-size: clamp(48px, 5.2vw, 78px); line-height: 1.16; letter-spacing: -.035em; }
.manifesto-copy { align-self: end; color: #6f4d49; font-size: 17px; line-height: 1.9; }
.manifesto-copy p { margin: 0 0 20px; }

.how { padding: 112px 0 130px; }
.section-heading { display: grid; grid-template-columns: .55fr 1.45fr; gap: 40px; align-items: start; margin-bottom: 70px; }
.steps { list-style: none; margin: 0; padding: 0; border-top: 3px solid var(--wine); }
.step { display: grid; grid-template-columns: 130px 1fr 180px; gap: 34px; align-items: center; min-height: 178px; padding: 30px 10px; border-bottom: 1px solid var(--line); }
.step-number { font-family: "Songti SC", serif; font-size: 54px; font-weight: 900; color: var(--red); }
.step h3 { margin: 0 0 10px; font-size: 28px; }
.step p { max-width: 650px; margin: 0; color: #765652; line-height: 1.75; }
.step-caption { justify-self: end; border: 2px solid var(--wine); padding: 10px 16px; font-weight: 800; transform: rotate(-2deg); }
.step:nth-child(2) .step-caption { background: var(--yellow); transform: rotate(2deg); }

.checkin { background: var(--yellow); color: var(--wine); padding: 120px max(20px, calc((100vw - var(--max)) / 2)); display: grid; grid-template-columns: .85fr 1.15fr; gap: 100px; align-items: end; }
.checkin-copy > p:last-child { max-width: 500px; margin: 30px 0 0; line-height: 1.8; }
.dimension-list { border-top: 3px solid var(--wine); }
.dimension-list span { display: grid; grid-template-columns: 140px 1fr; align-items: baseline; padding: 20px 0; border-bottom: 1px solid rgba(105, 0, 30, .28); font-family: "Songti SC", serif; font-size: 31px; font-weight: 900; }
.dimension-list small { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif; font-size: 14px; font-weight: 650; color: rgba(105, 0, 30, .68); }

.screens { padding: 138px 0 170px; }
.screen-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; align-items: start; }
.screen-card { margin: 0; }
.screen-card-offset { margin-top: 100px; }
.screen-image-wrap { height: 610px; overflow: hidden; border: 2px solid var(--wine); border-radius: 28px; background: var(--paper); box-shadow: 10px 12px 0 var(--yellow); }
.screen-image-wrap img { width: 100%; height: 100%; object-fit: cover; object-position: center top; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.screen-image-wrap:hover img { transform: scale(1.025); }
.screen-image-wrap-focus img { object-position: center 10%; }
.screen-card figcaption { display: flex; justify-content: space-between; gap: 16px; padding: 20px 4px 0; font-size: 14px; }
.screen-card figcaption strong { font-size: 18px; }
.screen-card figcaption span { color: var(--muted); text-align: right; }

.money { background: var(--wine); color: var(--cream); padding: 130px max(20px, calc((100vw - var(--max)) / 2)) 140px; }
.money-heading { display: grid; grid-template-columns: .55fr 1.45fr; gap: 40px; }
.section-index-light { color: var(--yellow); }
.formula { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 24px; align-items: center; margin-top: 86px; padding: 34px 0; border-top: 1px solid rgba(255,247,229,.3); border-bottom: 1px solid rgba(255,247,229,.3); }
.formula div { display: flex; flex-direction: column; gap: 9px; }
.formula span { font-family: "Songti SC", serif; font-size: clamp(25px, 2.6vw, 38px); font-weight: 900; }
.formula small { color: rgba(255,247,229,.6); }
.formula b { color: var(--yellow); font-size: 44px; }
.money-note { max-width: 760px; margin: 38px 0 0 auto; color: rgba(255,247,229,.72); font-size: 17px; line-height: 1.85; }

.principles { padding: 130px 0 150px; }
.principle-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 3px solid var(--wine); }
.principle-grid article { min-height: 280px; padding: 36px 34px; border-right: 1px solid var(--line); }
.principle-grid article:last-child { border-right: 0; }
.principle-grid span { display: inline-block; background: var(--red); color: #fff; padding: 6px 11px; font-weight: 850; transform: rotate(-1deg); }
.principle-grid article:nth-child(2) span { background: var(--yellow); color: var(--wine); transform: rotate(1.5deg); }
.principle-grid p { margin: 68px 0 0; color: #72514d; line-height: 1.85; }

.download-section { display: grid; grid-template-columns: 190px 1fr; gap: clamp(42px, 7vw, 92px); align-items: center; margin-bottom: 80px; padding: 76px clamp(36px, 6vw, 82px); background: var(--paper); border: 3px solid var(--wine); box-shadow: 12px 14px 0 var(--yellow); scroll-margin-top: 28px; }
.download-icon img { width: 160px; border: 2px solid var(--wine); border-radius: 26%; box-shadow: 8px 9px 0 rgba(105, 0, 30, .12); }
.download-copy h2 { font-size: clamp(44px, 4.8vw, 68px); }
.download-copy > p:not(.section-index) { max-width: 640px; margin: 24px 0 30px; color: #70514d; line-height: 1.8; }
.platform-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.platform-action { min-width: 210px; min-height: 68px; display: inline-flex; align-items: center; justify-content: space-between; gap: 28px; padding: 0 20px; border: 2px solid var(--wine); border-radius: 10px; background: var(--wine); color: var(--cream); box-shadow: 4px 5px 0 var(--yellow); }
.platform-action span { font-size: 16px; font-weight: 850; }
.platform-action strong { color: var(--yellow); font-size: 12px; letter-spacing: .04em; }

footer { width: min(calc(100% - 40px), var(--max)); margin: 0 auto; min-height: 170px; display: grid; grid-template-columns: 160px 1fr auto; align-items: center; gap: 30px; border-top: 1px solid var(--line); }
footer img { width: 145px; }
footer p { margin: 0; font-size: 13px; color: var(--muted); }
.copyright { text-align: right; }

/* Download page */
.download-header > p { margin: 0; justify-self: center; color: var(--muted); font-size: 13px; letter-spacing: .04em; }
.download-main { overflow: hidden; }
.download-hero {
  width: min(calc(100% - 40px), var(--max));
  min-height: 650px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  align-items: center;
  gap: clamp(50px, 8vw, 130px);
  padding: 80px 0 110px;
}
.download-intro > p:last-child { max-width: 670px; margin: 34px 0 0; color: #6f4d49; font-size: 18px; line-height: 1.85; }
.download-app-mark { justify-self: center; display: flex; flex-direction: column; align-items: center; }
.download-app-mark img { width: min(270px, 70vw); border-radius: 26%; box-shadow: 18px 21px 0 var(--wine); border: 3px solid var(--wine); }
.download-app-mark span { margin-top: 34px; font-family: "Songti SC", "STSong", serif; font-size: 34px; font-weight: 900; }
.download-app-mark small { margin-top: 7px; color: var(--muted); font-weight: 650; }

.store-section { background: var(--wine); color: var(--cream); padding: 120px max(20px, calc((100vw - var(--max)) / 2)) 140px; }
.store-heading { display: grid; grid-template-columns: .55fr 1.45fr; gap: 40px; align-items: start; }
.store-heading .section-index { color: var(--yellow); }
.store-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; margin-top: 78px; }
.store-card { min-height: 500px; display: flex; flex-direction: column; justify-content: space-between; padding: 38px; border: 2px solid var(--cream); background: var(--paper); color: var(--wine); box-shadow: 10px 12px 0 var(--yellow); }
.store-card-android { background: var(--yellow); box-shadow: 10px 12px 0 var(--red); }
.store-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.platform-icon { width: 58px; height: 58px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--wine); color: white; font-size: 35px; font-weight: 900; }
.android-mark { font-family: "Arial Rounded MT Bold", sans-serif; font-size: 29px; }
.status-pill { display: inline-flex; padding: 8px 13px; border: 2px solid var(--wine); background: var(--yellow); font-size: 13px; font-weight: 850; transform: rotate(1.5deg); }
.status-pill-light { background: var(--cream); transform: rotate(-1deg); }
.platform-name { margin: 0 0 5px; color: var(--red); font-size: 13px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.store-card h3 { margin: 0; font-family: "Songti SC", "STSong", serif; font-size: 52px; }
.store-card div > p:last-child { max-width: 460px; margin: 20px 0 0; color: #70514d; line-height: 1.8; }
.store-button { min-height: 56px; display: flex; align-items: center; justify-content: center; padding: 0 20px; background: var(--wine); color: white; font-weight: 850; text-align: center; }
.store-button.is-disabled { opacity: .62; cursor: default; }

.device-note { width: min(calc(100% - 40px), var(--max)); margin: 0 auto; padding: 130px 0 150px; display: grid; grid-template-columns: 1.25fr .75fr; gap: 80px; align-items: end; }
.device-note > p { margin: 0 0 5px; color: #70514d; font-size: 17px; line-height: 1.9; }
.device-title-mobile { display: none; }

/* Family invitation */
.join-page { min-height: 100vh; }
.join-page [hidden] { display: none !important; }
.join-main { width: min(calc(100% - 40px), 720px); min-height: calc(100vh - 120px); margin: 0 auto; padding: 36px 0 70px; }
.join-brand { display: block; width: 145px; margin: 0 auto 34px; }
.join-card { position: relative; overflow: hidden; padding: 54px 58px 48px; border: 3px solid var(--wine); background: var(--paper); box-shadow: 12px 14px 0 var(--wine); text-align: center; }
.join-card::before { content: ""; position: absolute; width: 210px; height: 210px; top: -110px; right: -80px; border-radius: 50%; background: var(--yellow); }
.join-icon-wrap { position: relative; width: 112px; margin: 0 auto 28px; }
.join-icon-wrap img { border: 2px solid var(--wine); border-radius: 25%; box-shadow: 7px 8px 0 rgba(105,0,30,.14); }
.join-card .section-index { margin-bottom: 18px; }
.join-card h1 { font-size: clamp(48px, 8vw, 68px); line-height: 1.12; }
.join-role { margin: 22px 0 0; color: #70514d; font-weight: 750; }
.join-code-block { margin: 38px auto 30px; padding: 24px; border: 2px dashed var(--wine); background: var(--yellow-soft); }
.join-code-block span { display: block; color: var(--muted); font-size: 13px; font-weight: 800; letter-spacing: .12em; }
.join-code-block strong { display: block; margin: 8px 0 17px; font-size: 44px; letter-spacing: .16em; font-variant-numeric: tabular-nums; }
.join-code-block button { border: 0; border-bottom: 1px solid currentColor; padding: 3px 0; background: transparent; color: var(--wine); font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.join-open-app { width: 100%; }
.join-download-link { display: inline-block; margin-top: 23px; font-size: 14px; font-weight: 800; text-underline-offset: 5px; }
.join-tip, .join-error { max-width: 490px; margin: 30px auto 0; color: var(--muted); font-size: 13px; line-height: 1.75; }
.join-error { color: var(--red); font-weight: 750; }
.join-footer { width: min(calc(100% - 40px), 720px); min-height: 120px; grid-template-columns: 1fr auto; }

.reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .screen-image-wrap img, .button, nav a::after { transition: none; }
}

@media (max-width: 900px) {
  .site-header { grid-template-columns: 150px 1fr; }
  .site-header nav { display: none; }
  .header-cta { justify-self: end; }
  .hero { grid-template-columns: 1fr; padding-top: 68px; }
  .hero-visual { min-height: 650px; width: min(620px, 100%); margin: 0 auto; }
  .manifesto { grid-template-columns: 1fr; gap: 26px; }
  .manifesto-copy { max-width: 650px; }
  .section-heading, .money-heading { grid-template-columns: 1fr; }
  .step { grid-template-columns: 90px 1fr; }
  .step-caption { display: none; }
  .checkin { grid-template-columns: 1fr; gap: 58px; }
  .screen-gallery { gap: 18px; }
  .screen-image-wrap { height: 500px; border-radius: 20px; }
  .download-section { grid-template-columns: 150px 1fr; }
  .download-hero { grid-template-columns: 1fr; }
  .download-app-mark { margin-top: 20px; }
  .store-heading, .device-note { grid-template-columns: 1fr; }
  .device-note { gap: 42px; }
}

@media (max-width: 640px) {
  .site-header { width: calc(100% - 28px); height: 74px; grid-template-columns: 128px 1fr; }
  .brand img { width: 116px; }
  .header-cta { font-size: 12px; padding: 8px 12px; }
  .hero, .manifesto, .how, .screens, .principles, .download-section, footer { width: calc(100% - 28px); }
  .hero { min-height: auto; padding: 58px 0 70px; gap: 52px; }
  h1 { font-size: clamp(46px, 12.8vw, 56px); line-height: 1.12; }
  .hero-lede { font-size: 16px; line-height: 1.75; }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 20px; }
  .hero-visual { min-height: 500px; }
  .phone-shot { width: 55%; border-radius: 25px; box-shadow: 9px 11px 0 rgba(105,0,30,.1); }
  .phone-shot-back { left: -1%; }
  .phone-shot-front { right: -1%; bottom: 20px; }
  .scribble-label { font-size: 12px; padding: 8px 12px; }
  .manifesto, .how, .screens, .principles { padding: 88px 0; }
  h2 { font-size: clamp(38px, 10.5vw, 52px); line-height: 1.18; }
  .section-heading { margin-bottom: 48px; }
  .step { grid-template-columns: 58px 1fr; gap: 14px; min-height: 160px; }
  .step-number { font-size: 36px; }
  .step h3 { font-size: 24px; }
  .step p { font-size: 14px; }
  .checkin, .money { padding: 88px 20px; }
  .dimension-list span { grid-template-columns: 100px 1fr; font-size: 25px; }
  .dimension-list small { font-size: 12px; }
  .screen-gallery { grid-template-columns: 1fr; gap: 58px; }
  .screen-card-offset { margin-top: 0; }
  .screen-image-wrap { height: 610px; }
  .formula { grid-template-columns: 1fr; gap: 16px; }
  .formula div { padding: 12px 0; }
  .formula b { font-size: 25px; }
  .principle-grid { grid-template-columns: 1fr; }
  .principle-grid article { min-height: 230px; border-right: 0; border-bottom: 1px solid var(--line); padding-left: 10px; padding-right: 10px; }
  .principle-grid p { margin-top: 48px; }
  .download-section { grid-template-columns: 1fr; gap: 34px; padding: 44px 24px; box-shadow: 8px 9px 0 var(--yellow); }
  .download-icon img { width: 104px; }
  .download-copy h2 { font-size: clamp(42px, 11vw, 54px); }
  .platform-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .platform-action { min-width: 0; min-height: 66px; flex-direction: column; justify-content: center; gap: 4px; padding: 8px; box-shadow: 3px 4px 0 var(--yellow); }
  .platform-action span { font-size: 15px; }
  footer { grid-template-columns: 1fr; gap: 18px; padding: 45px 0; }
  .copyright { text-align: left; }
  .download-header > p { display: none; }
  .download-hero, .device-note { width: calc(100% - 28px); }
  .download-hero { min-height: auto; padding: 58px 0 88px; gap: 52px; }
  .download-intro > p:last-child { font-size: 16px; line-height: 1.75; }
  .download-app-mark img { width: min(230px, 68vw); box-shadow: 11px 13px 0 var(--wine); }
  .download-app-mark span { font-size: 30px; }
  .store-section { padding: 88px 20px 100px; }
  .store-grid { grid-template-columns: 1fr; gap: 28px; margin-top: 52px; }
  .store-card { min-height: 440px; padding: 28px 24px; box-shadow: 7px 8px 0 var(--yellow); }
  .store-card-android { box-shadow: 7px 8px 0 var(--red); }
  .store-card h3 { font-size: 43px; }
  .device-note { padding: 88px 0 100px; }
  .device-title-desktop { display: none; }
  .device-title-mobile { display: block; }
  .join-main { width: calc(100% - 28px); padding-top: 24px; }
  .join-brand { width: 124px; margin-bottom: 24px; }
  .join-card { padding: 38px 22px 36px; box-shadow: 8px 9px 0 var(--wine); }
  .join-card h1 { font-size: clamp(43px, 12.5vw, 54px); }
  .join-code-block { margin-top: 30px; padding: 21px 14px; }
  .join-code-block strong { font-size: 36px; letter-spacing: .12em; }
  .join-footer { width: calc(100% - 28px); grid-template-columns: 1fr; }
}
