/* Toffee & Bao website. Colours mirror the app's src/theme/colors.ts. */

@font-face { font-family: 'Gaegu'; font-weight: 400; font-style: normal; font-display: swap; src: url('/assets/fonts/gaegu-400.woff2') format('woff2'); }
@font-face { font-family: 'Gaegu'; font-weight: 700; font-style: normal; font-display: swap; src: url('/assets/fonts/gaegu-700.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 400 800; font-style: normal; font-display: swap; src: url('/assets/fonts/nunito.woff2') format('woff2'); }

:root {
  --paper: #FFF6EC;
  --card: #FFFDF8;
  --ink: #3B2A20;
  --muted: #7A5B47;
  --rose: #E07A9A;
  --rose-deep: #C2416D;
  --rose-tint: #FDE4EC;
  --blush: #F4A6B8;
  --wine: #8A3A55;
  --butter: #FBE3A1;
  --mint: #9BD3A8;
  --mint-tint: #BFE6CA;
  --sky: #BFD8F2;
  --lilac: #ECE8FA;
  --leaf: #3E7A4A;
  --toffee: #D9A27A;
  --toffee-light: #F3D9C2;
  --panda: #2B2B2B;
  --night: #2D2A4A;
  --gold: #F6C445;
  --flame: #F6A24B;
  --hand: 'Gaegu', 'Comic Sans MS', cursive;
  --sans: 'Nunito', ui-rounded, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --shadow: 5px 5px 0 var(--ink);
  --shadow-lg: 8px 8px 0 var(--ink);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: var(--rose-deep); }
a:hover { color: var(--wine); }
img, svg { max-width: 100%; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--rose-deep); outline-offset: 3px; border-radius: 12px; }
[id] { scroll-margin-top: 90px; }
.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; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 50; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 12px; font-weight: 800; text-decoration: none; }
.skip:focus { top: 12px; color: var(--paper); }

/* ---------- layout ---------- */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.section { padding: 112px 0; position: relative; }
.section.tight { padding-top: 24px; }
.center { text-align: center; }
.dots { background-image: radial-gradient(rgba(59, 42, 32, .09) 1.2px, transparent 1.2px); background-size: 22px 22px; }

/* ---------- type ---------- */
.hand { font-family: var(--hand); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--hand); font-weight: 700; font-size: 20px; padding: 6px 16px; border: 2px dashed var(--ink); border-radius: 999px; background: var(--card); }
.eyebrow svg { width: 18px; height: 16px; }
.h1 { font-family: var(--hand); font-weight: 700; font-size: 96px; line-height: .95; letter-spacing: -1px; margin: 22px 0; }
.h2 { font-family: var(--hand); font-weight: 700; font-size: 64px; line-height: 1; margin: 16px 0; }
.h3 { font-family: var(--hand); font-weight: 700; font-size: 34px; line-height: 1.05; margin: 0 0 8px; }
.lead { font-size: 21px; line-height: 1.6; color: var(--muted); margin: 0; max-width: 560px; }
.body { font-size: 17px; line-height: 1.65; color: var(--muted); margin: 0; }
.center .lead { margin: 0 auto; }
.squiggle { position: relative; white-space: nowrap; color: var(--rose-deep); }
.squiggle svg { position: absolute; left: -2%; bottom: -14px; width: 104%; height: 22px; overflow: visible; }
.squiggle path { stroke-dasharray: 320; stroke-dashoffset: 320; animation: draw 1.4s .5s cubic-bezier(.6, 0, .2, 1) forwards; }
.hint { font-size: 14px; font-weight: 700; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.hint svg { width: 16px; height: 16px; }
.touch-only { display: none; }
@media (pointer: coarse) { .touch-only { display: inline-flex; } .mouse-only { display: none; } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 26px; border: 2.5px solid var(--ink); border-radius: 999px; font-family: var(--sans); font-weight: 800; font-size: 17px; text-decoration: none; cursor: pointer; box-shadow: 4px 4px 0 var(--ink); transition: transform .15s ease, box-shadow .15s ease, background .2s ease; -webkit-tap-highlight-color: transparent; user-select: none; }
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn-ink { background: var(--ink); color: var(--paper); box-shadow: 4px 4px 0 var(--rose); }
.btn-ink:hover { color: var(--paper); box-shadow: 6px 6px 0 var(--rose); }
.btn-ink:active { box-shadow: 1px 1px 0 var(--rose); }
.btn-rose { background: var(--rose-deep); color: #fff; }
.btn-rose:hover { color: #fff; }
.btn-ghost { background: var(--card); color: var(--ink); }
.btn-ghost:hover { color: var(--ink); }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: 15px; box-shadow: 3px 3px 0 var(--ink); }
.btn small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; opacity: .8; line-height: 1; }
.btn .two { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; line-height: 1; }
.btn svg { flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.btn[disabled] { opacity: .6; cursor: default; transform: none; }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 30; background: rgba(255, 246, 236, .86); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 2px dashed rgba(59, 42, 32, .18); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 76px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--hand); font-weight: 700; font-size: 30px; }
.logo:hover { color: var(--ink); }
.logo svg { width: 58px; height: 40px; overflow: visible; }
.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links a { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 16px; }
.nav-links a:hover { color: var(--rose-deep); }
.nav-right { display: flex; align-items: center; gap: 12px; }
.menu-btn { display: none; width: 46px; height: 46px; border-radius: 14px; border: 2.5px solid var(--ink); background: var(--card); cursor: pointer; align-items: center; justify-content: center; box-shadow: 3px 3px 0 var(--ink); }
.menu-btn span { display: block; width: 18px; height: 2.5px; background: var(--ink); border-radius: 2px; position: relative; transition: transform .2s ease, background .2s ease; }
.menu-btn span::before, .menu-btn span::after { content: ''; position: absolute; left: 0; width: 18px; height: 2.5px; background: var(--ink); border-radius: 2px; transition: transform .2s ease; }
.menu-btn span::before { top: -6px; }
.menu-btn span::after { top: 6px; }
.nav.open .menu-btn span { background: transparent; }
.nav.open .menu-btn span::before { transform: translateY(6px) rotate(45deg); }
.nav.open .menu-btn span::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero { padding: 64px 0 40px; overflow-x: clip; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.hero-art { position: relative; }
.hero-art > svg { width: 100%; height: auto; display: block; overflow: visible; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--card); border: 2px solid var(--ink); font-weight: 700; font-size: 14px; }
.chip svg { width: 20px; height: 20px; }
.char-hit { position: absolute; width: 27%; height: 36%; top: 46%; transform: translateX(-50%); border: 0; background: transparent; border-radius: 40%; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.char-hit.bao { left: 36%; }
.char-hit.tof { left: 64%; }

/* ---------- marquee ---------- */
.marquee { background: var(--ink); color: var(--paper); border-top: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink); overflow: hidden; transform: rotate(-1.4deg); margin: 40px -20px 0; }
.marquee-track { display: flex; width: max-content; animation: marquee 34s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item { display: flex; align-items: center; gap: 22px; padding: 18px 22px; font-family: var(--hand); font-weight: 700; font-size: 30px; white-space: nowrap; }
.marquee-item svg { width: 22px; height: 22px; }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin-top: 64px; position: relative; }
.step { background: var(--card); border: 2.5px solid var(--ink); border-radius: 28px; padding: 30px; box-shadow: var(--shadow); position: relative; transition: transform .25s ease, box-shadow .25s ease; }
.step:hover { transform: translate(-3px, -3px) rotate(-.6deg); box-shadow: var(--shadow-lg); }
.step-num { position: absolute; top: -22px; left: 26px; width: 44px; height: 44px; border-radius: 50%; background: var(--butter); border: 2.5px solid var(--ink); display: flex; align-items: center; justify-content: center; font-family: var(--hand); font-weight: 700; font-size: 26px; }
.step svg.icon { width: 64px; height: 64px; margin: 10px 0 16px; overflow: visible; }
.code-boxes { display: flex; gap: 6px; margin: 10px 0 16px; height: 64px; align-items: center; }
.code-boxes span { width: 34px; height: 44px; border: 2px dashed var(--ink); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-family: var(--hand); font-weight: 700; font-size: 26px; background: var(--paper); }
.code-boxes span.typed { border-style: solid; background: var(--rose-tint); animation: popOnce .35s ease; }

/* ---------- feature rows ---------- */
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 72px; align-items: center; padding: 56px 0; }
.feature.flip .feature-copy { order: 2; }
.feature-tag { display: inline-flex; align-items: center; gap: 8px; font-family: var(--hand); font-weight: 700; font-size: 22px; color: var(--rose-deep); }
.feature-tag svg { width: 28px; height: 28px; }
.feature ul { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.feature li { display: flex; gap: 12px; align-items: flex-start; font-size: 17px; line-height: 1.5; }
.feature li svg { flex: none; width: 22px; height: 22px; margin-top: 2px; }
.art-card { border: 2.5px solid var(--ink); border-radius: 36px; box-shadow: var(--shadow-lg); overflow: hidden; position: relative; }
.art-stage { position: relative; }
.art-card svg.art { display: block; width: 100%; height: auto; }
.art-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 0 28px 26px; }
.art-foot p { margin: 0; font-family: var(--hand); font-size: 22px; font-weight: 700; min-height: 1.2em; }
.art-foot.dark p { color: var(--paper); }
.bg-rose { background: var(--rose-tint); }
.bg-lilac { background: var(--lilac); }
.bg-butter { background: #FFF0C9; }
.bg-night { background: var(--night); color: var(--paper); }
.bg-mint { background: #DDF2E2; }
.bg-sky { background: #DDEBF9; }
.bg-card { background: var(--card); }

/* mood chips */
.mood-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 28px 14px; }
.mood-chip { appearance: none; cursor: pointer; border: 2px solid var(--ink); background: var(--card); border-radius: 999px; padding: 8px 14px; font-weight: 800; font-size: 14px; min-height: 40px; transition: transform .15s ease, background .15s ease; }
.mood-chip:hover { transform: translateY(-2px); }
.mood-chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* ---------- bento ---------- */
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 24px; margin-top: 56px; }
.tile { border: 2.5px solid var(--ink); border-radius: 30px; box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; position: relative; transition: transform .25s ease, box-shadow .25s ease; }
.tile:hover { transform: translate(-3px, -3px); box-shadow: var(--shadow-lg); }
.tile svg.art { display: block; width: 100%; height: auto; }
.tile-copy { padding: 4px 26px 26px; margin-top: auto; }
.tile-copy .btn { margin-top: 16px; }
.span-4 { grid-column: span 4; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }

/* heartbeat tap target */
.beat-hit { position: absolute; left: 50%; top: 4%; width: 26%; aspect-ratio: 1; transform: translateX(-50%); border: 0; border-radius: 50%; background: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent; }

/* stickers grid */
.sticker-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 22px 22px 8px; }
.sticker { appearance: none; border: 0; background: transparent; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; position: relative; }
.sticker svg { width: 100%; height: auto; display: block; overflow: visible; }
.sticker:focus-visible { outline-offset: -2px; border-radius: 50%; }

/* daily question */
.qa { padding: 22px 22px 6px; display: grid; gap: 12px; }
.q-card { background: var(--card); border: 2.5px solid var(--ink); border-radius: 20px; padding: 14px 16px; box-shadow: 4px 4px 0 var(--ink); }
.q-card small { display: block; font-weight: 800; font-size: 12px; color: var(--muted); letter-spacing: .3px; }
.q-card p { margin: 4px 0 0; font-family: var(--hand); font-weight: 700; font-size: 22px; line-height: 1.1; }
.bubble-row { display: flex; align-items: flex-end; gap: 8px; }
.bubble-row.them { flex-direction: row-reverse; }
.bubble-row svg.head { flex: none; width: 46px; height: 46px; overflow: visible; }
.bubble { background: var(--card); border: 2.5px solid var(--ink); border-radius: 20px 20px 20px 6px; padding: 10px 14px; font-weight: 700; font-size: 15px; line-height: 1.35; min-height: 44px; display: flex; align-items: center; gap: 6px; }
.them .bubble { border-radius: 20px 20px 6px 20px; background: var(--rose-tint); }
.bubble .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); animation: typingDot 1.2s ease-in-out infinite; }
.bubble .dot:nth-child(2) { animation-delay: .15s; }
.bubble .dot:nth-child(3) { animation-delay: .3s; }
.bubble.locked { color: var(--muted); font-style: italic; }
.bubble.locked svg { width: 18px; height: 18px; }
.bubble.in { animation: popOnce .4s ease; }

/* widget */
.widget-hit { position: absolute; inset: 0 0 auto 0; height: 62%; border: 0; background: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.wface { opacity: 0; transition: opacity .35s ease; }
.wface.on { opacity: 1; }

/* ---------- privacy band ---------- */
.promise { background: var(--night); color: var(--paper); border-radius: 48px; padding: 80px 72px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; position: relative; overflow: hidden; }
.promise .lead, .promise .body { color: #D9D3EE; }
.promise .eyebrow { background: transparent; color: var(--paper); border-color: var(--lilac); }
.promise-list { display: grid; gap: 18px; margin-top: 30px; }
.promise-item { display: flex; gap: 16px; align-items: flex-start; }
.promise-item .ic { flex: none; width: 46px; height: 46px; border-radius: 14px; background: rgba(255, 255, 255, .08); border: 1.5px solid rgba(255, 255, 255, .22); display: flex; align-items: center; justify-content: center; }
.promise-item .ic svg { width: 26px; height: 26px; }
.promise-item b { display: block; font-size: 18px; margin-bottom: 2px; color: var(--paper); }
.promise svg.art { width: 100%; height: auto; display: block; overflow: visible; }

/* ---------- pricing ---------- */
.pricing { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 28px; margin-top: 56px; align-items: stretch; }
.plan-card { background: var(--card); border: 2.5px solid var(--ink); border-radius: 32px; padding: 36px; box-shadow: var(--shadow); position: relative; }
.plan-card.plus { background: var(--rose-tint); box-shadow: var(--shadow-lg); }
.plan-card h3 { font-family: var(--hand); font-size: 40px; margin: 0; }
.plan-price { font-family: var(--hand); font-weight: 700; font-size: 26px; margin: 4px 0 20px; }
.price-big { font-family: var(--hand); font-weight: 700; font-size: 56px; line-height: 1; display: inline-block; }
.price-big.bump { animation: popOnce .35s ease; }
.price-sub { font-weight: 700; color: var(--muted); font-size: 15px; margin: 6px 0 18px; min-height: 1.4em; }
.save { display: inline-block; margin-left: 8px; padding: 3px 10px; border-radius: 999px; background: var(--mint-tint); border: 1.5px solid var(--ink); font-size: 13px; font-weight: 800; color: var(--ink); vertical-align: middle; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.ticks li { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; line-height: 1.45; }
.ticks li svg { flex: none; width: 22px; height: 22px; margin-top: 1px; }
.ticks li b { font-weight: 800; }
.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 6px 0 22px; }
.plan-opt { appearance: none; cursor: pointer; background: var(--card); color: var(--ink); border: 2px solid var(--ink); border-radius: 18px; padding: 12px 6px; text-align: center; min-height: 76px; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.plan-opt:hover { transform: translateY(-2px); }
.plan-opt b { display: block; font-family: var(--hand); font-size: 24px; line-height: 1; }
.plan-opt span { display: block; font-size: 13px; font-weight: 800; color: var(--muted); margin-top: 6px; }
.plan-opt[aria-pressed="true"] { background: var(--ink); color: var(--paper); box-shadow: 4px 4px 0 var(--rose); }
.plan-opt[aria-pressed="true"] span { color: var(--butter); }
.crown { position: absolute; top: -34px; right: 30px; width: 74px; height: 64px; overflow: visible; }
.fine { font-size: 13px; color: var(--muted); line-height: 1.5; margin: 18px 0 0; }

/* ---------- faq ---------- */
.faq { max-width: 820px; margin: 48px auto 0; display: grid; gap: 14px; }
.faq details { background: var(--card); border: 2.5px solid var(--ink); border-radius: 22px; padding: 0 26px; box-shadow: 4px 4px 0 var(--ink); transition: background .2s ease; }
.faq details[open] { background: #FFFBF3; }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; font-weight: 800; font-size: 18px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { flex: none; width: 26px; height: 26px; transition: transform .25s ease; }
.faq details[open] summary svg { transform: rotate(45deg); }
.faq details p { margin: 0 0 22px; font-size: 16px; line-height: 1.65; color: var(--muted); }

/* ---------- final cta ---------- */
.cta { background: var(--rose-tint); border: 2.5px solid var(--ink); border-radius: 48px; box-shadow: var(--shadow-lg); padding: 120px 40px 72px; text-align: center; position: relative; margin-top: 90px; }
.cta .lead { margin: 0 auto; }
.cta-peek { position: absolute; top: -78px; left: 50%; transform: translateX(-50%); width: 320px; height: 110px; overflow: visible; }

/* ---------- footer ---------- */
.footer { padding: 72px 0 104px; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; align-items: flex-start; border-top: 2px dashed rgba(59, 42, 32, .25); padding-top: 40px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 26px; }
.footer-links a { color: var(--ink); font-weight: 700; text-decoration: none; }
.footer-links a:hover { color: var(--rose-deep); }
.copy { color: var(--muted); font-size: 14px; margin-top: 10px; }

/* ---------- legal pages ---------- */
.legal { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 64px; padding: 24px 0 96px; }
.toc { position: sticky; top: 100px; align-self: start; background: var(--card); border: 2px solid var(--ink); border-radius: 22px; padding: 22px; box-shadow: 4px 4px 0 var(--ink); }
.toc b { font-family: var(--hand); font-size: 22px; display: block; margin-bottom: 10px; }
.toc a { display: block; padding: 7px 0 7px 12px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 15px; border-left: 3px solid transparent; transition: border-color .2s ease, color .2s ease; }
.toc a:hover { color: var(--rose-deep); }
.toc a.current { border-left-color: var(--rose); color: var(--rose-deep); }
.prose { max-width: 720px; }
.prose h2 { font-family: var(--hand); font-size: 38px; margin: 48px 0 10px; line-height: 1.05; }
.prose h3 { font-size: 19px; margin: 26px 0 6px; }
.prose p, .prose li { font-size: 17px; line-height: 1.75; color: #4E3B2F; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 6px 0; }
.tldr { background: var(--butter); border: 2.5px solid var(--ink); border-radius: 26px; padding: 26px 30px; box-shadow: var(--shadow); margin: 8px 0 12px; }
.tldr > b { font-family: var(--hand); font-size: 26px; }
.tldr ul { margin: 10px 0 0; }
.legal-hero { padding: 64px 0 40px; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: center; }
.legal-hero .h1 { font-size: 76px; }
.legal-hero svg { width: 100%; height: auto; overflow: visible; }
.updated { display: inline-block; margin-top: 8px; font-weight: 700; color: var(--muted); }
.tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.tab { padding: 10px 18px; border-radius: 999px; border: 2px solid var(--ink); background: var(--card); font-weight: 800; text-decoration: none; color: var(--ink); font-size: 15px; }
.tab[aria-current="page"] { background: var(--ink); color: var(--paper); }
.tab:hover { color: var(--rose-deep); }
.tab[aria-current="page"]:hover { color: var(--paper); }
.steps-list { counter-reset: s; list-style: none; padding: 0 !important; display: grid; gap: 14px; }
.steps-list li { counter-increment: s; display: flex; gap: 14px; align-items: flex-start; background: var(--card); border: 2px solid var(--ink); border-radius: 18px; padding: 14px 18px; margin: 0; }
.steps-list li::before { content: counter(s); flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--butter); border: 2px solid var(--ink); display: flex; align-items: center; justify-content: center; font-family: var(--hand); font-weight: 700; font-size: 20px; }
.mail-card { background: var(--rose-tint); border: 2.5px solid var(--ink); border-radius: 22px; padding: 22px 24px; box-shadow: var(--shadow); margin: 18px 0; }
.mail-card .btn { margin-top: 12px; }
table.data { width: 100%; border-collapse: separate; border-spacing: 0; border: 2px solid var(--ink); border-radius: 18px; overflow: hidden; margin: 14px 0; font-size: 15px; }
table.data th, table.data td { text-align: left; padding: 12px 14px; border-bottom: 1.5px dashed rgba(59, 42, 32, .25); vertical-align: top; line-height: 1.5; }
table.data th { background: var(--butter); font-weight: 800; }
table.data tr:last-child td { border-bottom: 0; }

/* ---------- 404 ---------- */
.lost { min-height: 78vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 16px 80px; }
.lost svg { width: 380px; max-width: 100%; height: auto; overflow: visible; }

/* ---------- music button: the app's login song ---------- */
.music { position: fixed; right: 18px; bottom: 18px; z-index: 40; display: flex; align-items: center; gap: 10px; pointer-events: none; }
.music[hidden] { display: none; }
.music-btn { pointer-events: auto; position: relative; width: 64px; height: 64px; padding: 4px; border-radius: 50%; border: 2.5px solid var(--ink); background: var(--card); box-shadow: 4px 4px 0 var(--ink); cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; -webkit-tap-highlight-color: transparent; }
.music-btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.music-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.music-btn svg { width: 100%; height: 100%; display: block; }
.music.playing .music-btn { background: var(--rose-tint); box-shadow: 4px 4px 0 var(--rose-deep); }
.music.playing .music-btn svg { animation: spin 3.2s linear infinite; }
.music.waiting .music-btn { animation: pulse 1.6s ease-in-out infinite; }
.music-bubble { font-family: var(--hand); font-weight: 700; font-size: 19px; background: var(--card); border: 2px solid var(--ink); border-radius: 16px 16px 4px 16px; padding: 5px 12px; box-shadow: 3px 3px 0 var(--ink); white-space: nowrap; animation: bob 2.6s ease-in-out infinite; transition: opacity .4s ease, transform .4s ease; }
.music-bubble::before { content: '\266A\00a0'; color: var(--rose-deep); }
.music.used .music-bubble, .music.quiet .music-bubble { opacity: 0; transform: translateX(10px); animation: none; }
.music-notes { position: absolute; right: 18px; bottom: 54px; width: 30px; height: 60px; }
.music-notes i { position: absolute; bottom: 0; left: 0; font-style: normal; font-size: 20px; font-weight: 700; color: var(--rose-deep); opacity: 0; }
.music.playing .music-notes i { animation: note 2.4s ease-out infinite; }
.music.playing .music-notes i:nth-child(2) { left: 12px; animation-delay: .8s; color: var(--ink); }
.music.playing .music-notes i:nth-child(3) { left: -6px; animation-delay: 1.6s; }
@keyframes note { 0% { transform: translateY(0) rotate(0deg) scale(.6); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(-52px) rotate(18deg) scale(1.1); opacity: 0; } }
@media (max-width: 820px) {
  .music { right: 12px; bottom: 12px; }
  .music-btn { width: 54px; height: 54px; }
  .music-bubble { font-size: 17px; }
}

/* ---------- invite page (/i/<code>) ---------- */
.invite { max-width: 640px; margin: 0 auto; padding: 24px 16px 120px; text-align: center; }
.invite-art { width: 100%; max-width: 380px; height: auto; overflow: visible; display: block; margin: 0 auto 8px; }
.invite .lead { margin: 0 auto; }
.invite-code { display: flex; justify-content: center; gap: 8px; margin: 26px 0 8px; }
.invite-code span { width: 50px; height: 62px; border: 2.5px dashed var(--ink); border-radius: 14px; display: flex; align-items: center; justify-content: center; font-family: var(--hand); font-weight: 700; font-size: 38px; background: var(--card); }
.invite-code span.typed { border-style: solid; background: var(--rose-tint); box-shadow: 3px 3px 0 var(--ink); animation: popOnce .35s ease; }
.invite-actions { justify-content: center; margin-top: 22px; }
.invite .hint { justify-content: center; margin-top: 16px; }
.invite-steps { text-align: left; margin: 32px auto 0 !important; max-width: 480px; }
.invite-steps li { font-size: 16px; line-height: 1.5; }
.invite .fine { margin-top: 18px; }
.invite-broken, .broken .invite-ok { display: none; }
.broken .invite-broken { display: block; }
.android-only { display: none !important; }
.is-android .android-only { display: inline-flex !important; }
.is-android .not-android { display: none; }
.env-flap { transform-box: fill-box; transform-origin: 50% 0; animation: flapOpen .7s .3s ease-out both; }
.env-heart { animation: heartOut .9s .9s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes flapOpen { from { transform: scaleY(.05); } to { transform: scaleY(-1); } }
@keyframes heartOut { from { transform: translateY(50px) scale(.5); } to { transform: none; } }
@media (max-width: 420px) { .invite-code span { width: 44px; height: 56px; font-size: 34px; } .invite-code { gap: 6px; } }

/* ---------- reveal on scroll (only when JS runs) ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .8s cubic-bezier(.2, .8, .2, 1); }
.js .reveal.seen { opacity: 1; transform: none; }
.js .reveal.r-1 { transition-delay: .08s; }
.js .reveal.r-2 { transition-delay: .16s; }
.js .reveal.r-3 { transition-delay: .24s; }
/* off-screen art stops animating, saving battery */
.js .anim:not(.in) * { animation-play-state: paused !important; }

/* =================================================================
   SVG motion
   ================================================================= */
.fb { transform-box: fill-box; transform-origin: center; }
.bob { animation: bob 3.2s ease-in-out infinite; }
.bob-slow { animation: bob 4.6s ease-in-out infinite; }
.blink { transform-box: fill-box; transform-origin: center; animation: blink 4.8s infinite; }
.look { transition: transform .25s ease-out; }
.wave { animation: wave 1.6s ease-in-out infinite; }
.sway { animation: sway 2.8s ease-in-out infinite; }
.twinkle { transform-box: fill-box; transform-origin: center; animation: twinkle 2.6s ease-in-out infinite; }
.spin-slow { transform-box: fill-box; transform-origin: center; animation: spin 60s linear infinite; }
.spin-mid { transform-box: fill-box; transform-origin: center; animation: spin 18s linear infinite; }
.pulse { transform-box: fill-box; transform-origin: center; animation: pulse 1.2s ease-in-out infinite; }
.ripple { transform-box: fill-box; transform-origin: center; animation: ripple 2.4s ease-out infinite; }
.rise { transform-box: fill-box; transform-origin: center; animation: rise 3.6s ease-out infinite; opacity: 0; }
.float { animation: float 5s ease-in-out infinite; }
.notif { animation: notif 7s ease-in-out infinite; }
.flicker { transform-box: fill-box; transform-origin: 50% 100%; animation: flicker 1.1s ease-in-out infinite; }
.swing { transform-box: fill-box; transform-origin: 50% 0; animation: swing 5s ease-in-out infinite; }
.zzz { animation: zzz 3.4s ease-out infinite; opacity: 0; }
.travel { animation: travel 2.6s ease-in-out infinite; opacity: 0; }
.typing { transform-box: fill-box; transform-origin: center; animation: typing 1.2s ease-in-out infinite; }
.pop { transform-box: fill-box; transform-origin: center; animation: pop 4s ease-in-out infinite; }
.glow { transform-box: fill-box; transform-origin: center; animation: glow 4s ease-in-out infinite; }
.shadow { transform-box: fill-box; transform-origin: center; animation: shadow 3.2s ease-in-out infinite; }
.blinkdot { animation: blinkdot 1s steps(1) infinite; }
.lift { animation: lift 5.4s ease-in-out infinite; }
.tear { transform-box: fill-box; transform-origin: 50% 0; animation: tear 2.8s ease-in infinite; }
.buzz { animation: buzz .6s ease-in-out infinite; }
.march { animation: march 1.6s linear infinite; }
.sway-p { transform-box: fill-box; transform-origin: 50% 0; animation: swing 6s ease-in-out infinite; }

/* one-shot effects, replayed from JS */
.jump { transform-box: fill-box; transform-origin: 50% 100%; animation: jump .6s cubic-bezier(.3, 1.6, .5, 1); }
.pop-once { transform-box: fill-box; transform-origin: center; animation: popOnce .45s ease; }
.beat { transform-box: fill-box; transform-origin: center; animation: beatBig .5s ease; }
.fly { transform-box: fill-box; transform-origin: center; animation: fly 1.3s cubic-bezier(.3, .7, .4, 1) forwards; }
.spray { transform-box: fill-box; transform-origin: center; animation: spray .9s ease-out forwards; }
.flip { transform-box: fill-box; transform-origin: center; animation: flipY .5s ease; }
.shake-go { transform-box: fill-box; transform-origin: 50% 90%; animation: shakeGo .9s ease-in-out; }

/* svg text */
.svg-b { font-family: var(--hand); font-weight: 700; font-size: 20px; fill: var(--ink); }
.svg-s { font-family: var(--sans); font-weight: 700; font-size: 12.5px; fill: var(--muted); }
.svg-w { font-family: var(--hand); font-weight: 700; font-size: 24px; fill: #fff; }

/* staggers (negative = already mid-loop on load) */
.d1 { animation-delay: -.5s; } .d2 { animation-delay: -1s; } .d3 { animation-delay: -1.5s; } .d4 { animation-delay: -2s; }
.d5 { animation-delay: -2.5s; } .d6 { animation-delay: -3s; } .d7 { animation-delay: -3.5s; } .d8 { animation-delay: -4s; }
.q2 { animation-delay: .15s; } .q3 { animation-delay: .3s; }
.r1 { --dx: -36px; --r: -16deg; } .r2 { --dx: -14px; --r: -6deg; } .r3 { --dx: 10px; --r: 8deg; } .r4 { --dx: 34px; --r: 18deg; } .r5 { --dx: 0px; --r: 0deg; }
.hx1 { --hx: 107px; }

/* ---------- hug ---------- */
.hug-hit { position: absolute; left: 50%; top: 50%; width: 26%; aspect-ratio: 1; transform: translate(-50%, -50%); border: 0; border-radius: 50%; background: transparent; cursor: pointer; touch-action: none; -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.hug-face { transform-box: fill-box; transform-origin: center; transition: transform .2s ease; }
.holding .hug-face { transform: scale(.92); }
.hug-ring { transition: stroke-dashoffset .1s linear, opacity .2s ease; opacity: 0; }
.holding .hug-ring { opacity: 1; }
.eyes-love, .holding .eyes-open { display: none; }
.holding .eyes-love { display: inline; }
.holding .tof-wiggle { transform-box: fill-box; transform-origin: 50% 100%; animation: wiggle .28s ease-in-out infinite; }
.holding .buzz { animation-duration: .2s; }

.hug-time { opacity: 0; transition: opacity .2s ease; }
.holding .hug-time { opacity: 1; }

/* ---------- memories ---------- */
.polaroid { cursor: pointer; }
@media (pointer: fine) { .polaroid { cursor: grab; } }
.polaroid.dragging { cursor: grabbing; }
.polaroid:focus-visible { outline: none; }
.polaroid:focus-visible > g { filter: drop-shadow(0 0 4px #C2416D); }
.like { transition: opacity .25s ease; }
.polaroid.mine .like rect { fill: #F4A6B8; }
.js .mem-art .drop { opacity: 0; }
.js .mem-art.seen .drop { transform-box: fill-box; transform-origin: 50% 0; animation: dropIn .8s cubic-bezier(.3, 1.4, .5, 1) both; }
.js .mem-art.seen .polaroid:nth-of-type(2) .drop { animation-delay: .25s; }
.js .mem-art.seen .polaroid:nth-of-type(3) .drop { animation-delay: .5s; }
.js .mem-art .polaroid.settled .drop { animation: none; opacity: 1; }
@keyframes dropIn { 0% { transform: translateY(-70px) rotate(-10deg); opacity: 0; } 100% { transform: none; opacity: 1; } }

/* ---------- mood ---------- */
.mood-art .m-eyes > * { display: none; }
.mood-art[data-mood="excited"] .m-open, .mood-art[data-mood="happy"] .m-happy, .mood-art[data-mood="sleepy"] .m-sleepy, .mood-art[data-mood="love"] .m-love { display: inline; }
.mood-art .star { opacity: 0; }
.bursting .star { animation: spray .9s ease-out forwards; }
.mb { transition: fill .25s ease; }

/* ---------- terms: the signature draws itself ---------- */
.sign { stroke-dasharray: 200; stroke-dashoffset: 200; animation: sign 5s ease-in-out infinite; }
@keyframes sign { 0%, 8% { stroke-dashoffset: 200; } 45%, 85% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -200; } }

/* ---------- 404: cheer Bao up ---------- */
.happy-eyes, .cheered .sad-eyes, .cheered .tear { display: none; }
.cheered .happy-eyes { display: inline; }

/* ---------- date mode ---------- */
.phone-screen { opacity: 0; transition: opacity .3s ease; }
.date-up .phone-screen { opacity: 1; }
.date-up .zzz { visibility: hidden; }
.d-open { display: none; }
.date-up .d-open { display: inline; }
.date-up .d-happy { display: none; }
.date-up .date-heart { visibility: hidden; }

/* =================================================================
   keyframes
   ================================================================= */
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes blink { 0%, 90%, 96%, 100% { transform: scaleY(1); } 93% { transform: scaleY(.1); } }
@keyframes wave { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(28deg); } }
@keyframes sway { 0%, 100% { transform: rotate(-9deg); } 50% { transform: rotate(9deg); } }
@keyframes twinkle { 0%, 100% { transform: scale(.55) rotate(0deg); opacity: .35; } 50% { transform: scale(1.15) rotate(45deg); opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 14% { transform: scale(1.16); } 28% { transform: scale(1); } 42% { transform: scale(1.1); } 70% { transform: scale(1); } }
@keyframes ripple { 0% { transform: scale(.9); opacity: .9; } 100% { transform: scale(1.55); opacity: 0; } }
@keyframes rise { 0% { transform: translate(0, 0) scale(.4); opacity: 0; } 15% { opacity: 1; } 100% { transform: translate(var(--dx, 0px), -130px) scale(1.25) rotate(var(--r, 10deg)); opacity: 0; } }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-10px) rotate(-1.5deg); } }
@keyframes notif { 0% { transform: translateX(-24px); opacity: 0; } 8%, 80% { transform: translateX(0); opacity: 1; } 88%, 100% { transform: translateX(0) translateY(-8px); opacity: 0; } }
@keyframes flicker { 0%, 100% { transform: scale(1, 1) skewX(0deg); } 25% { transform: scale(.96, 1.06) skewX(-3deg); } 50% { transform: scale(1.03, .97) skewX(2deg); } 75% { transform: scale(.98, 1.04) skewX(-1deg); } }
@keyframes swing { 0%, 100% { transform: rotate(-2.5deg); } 50% { transform: rotate(2.5deg); } }
@keyframes zzz { 0% { transform: translate(0, 0) scale(.6); opacity: 0; } 20% { opacity: 1; } 100% { transform: translate(18px, -70px) scale(1.2); opacity: 0; } }
@keyframes travel { 0% { transform: translate(0, 0) scale(.5); opacity: 0; } 15% { opacity: 1; } 50% { transform: translate(var(--hx, 140px), -46px) scale(1); } 85% { opacity: 1; } 100% { transform: translate(calc(var(--hx, 140px) * 2), 0) scale(.5); opacity: 0; } }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-6px); opacity: 1; } }
@keyframes typingDot { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-4px); opacity: 1; } }
@keyframes pop { 0%, 100% { transform: scale(1) rotate(0deg); } 8% { transform: scale(1.12) rotate(-6deg); } 16% { transform: scale(.97) rotate(3deg); } 24% { transform: scale(1) rotate(0deg); } }
@keyframes popOnce { 0% { transform: scale(1); } 40% { transform: scale(1.18) rotate(-4deg); } 70% { transform: scale(.96) rotate(2deg); } 100% { transform: scale(1); } }
@keyframes glow { 0%, 100% { transform: scale(1); opacity: .25; } 50% { transform: scale(1.18); opacity: .5; } }
@keyframes shadow { 0%, 100% { transform: scaleX(1); opacity: .12; } 50% { transform: scaleX(.86); opacity: .07; } }
@keyframes blinkdot { 50% { opacity: 0; } }
@keyframes lift { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes tear { 0%, 30% { transform: translateY(0) scale(0); opacity: 0; } 40% { transform: translateY(0) scale(1); opacity: 1; } 100% { transform: translateY(26px) scale(1); opacity: 0; } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes buzz { 0%, 100% { opacity: .25; transform: translateX(0); } 50% { opacity: 1; transform: translateX(3px); } }
@keyframes march { to { stroke-dashoffset: -44; } }
@keyframes jump { 0%, 100% { transform: translateY(0) scale(1); } 20% { transform: translateY(0) scale(1.08, .9); } 50% { transform: translateY(-14px) scale(.96, 1.06); } 80% { transform: translateY(0) scale(1.04, .96); } }
@keyframes beatBig { 0% { transform: scale(1); } 30% { transform: scale(1.32); } 60% { transform: scale(.95); } 100% { transform: scale(1); } }
@keyframes fly { 0% { transform: translate(0, 0) scale(.3); opacity: 0; } 15% { opacity: 1; } 55% { transform: translate(calc(var(--dx) * .55), calc(var(--dy) * .55 - var(--arc, 40px))) scale(1); } 85% { opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) scale(.7) rotate(var(--r, 0deg)); opacity: 0; } }
@keyframes spray { 0% { transform: translate(0, 0) scale(.2); opacity: 0; } 20% { opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) scale(1.1) rotate(var(--r, 90deg)); opacity: 0; } }
@keyframes flipY { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(.05); } }
@keyframes shakeGo { 0%, 100% { transform: rotate(0deg); } 10% { transform: rotate(calc(var(--amp, 6) * -1deg)); } 22% { transform: rotate(calc(var(--amp, 6) * 1deg)); } 34% { transform: rotate(calc(var(--amp, 6) * -.8deg)); } 46% { transform: rotate(calc(var(--amp, 6) * .7deg)); } 58% { transform: rotate(calc(var(--amp, 6) * -.5deg)); } 70% { transform: rotate(calc(var(--amp, 6) * .3deg)); } }
@keyframes wiggle { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .rise, .zzz, .travel, .tear, .music-notes i { opacity: 0 !important; }
  .squiggle path { stroke-dashoffset: 0; }
  .notif { opacity: 1 !important; }
  .js .reveal { opacity: 1; transform: none; }
  .js .mem-art .drop { opacity: 1; }
}

/* =================================================================
   tablet & phone
   ================================================================= */
@media (max-width: 1080px) {
  .h1 { font-size: 76px; }
  .feature { gap: 40px; }
  .nav-links { gap: 20px; }
  .promise { padding: 64px 44px; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span-4 { grid-column: span 2; }
  .span-2, .span-3 { grid-column: span 1; }
}
@media (max-width: 820px) {
  .wrap { padding: 0 16px; }
  .section { padding: 72px 0; }
  .nav .wrap { height: 64px; }
  .menu-btn { display: inline-flex; }
  .nav-links { display: none; position: absolute; left: 12px; right: 12px; top: 70px; flex-direction: column; align-items: stretch; gap: 0; background: var(--card); border: 2.5px solid var(--ink); border-radius: 22px; box-shadow: var(--shadow); padding: 8px; }
  .nav.open .nav-links { display: flex; }
  .nav-links a { padding: 14px 16px; border-radius: 14px; font-size: 18px; }
  .nav-links a:hover { background: var(--rose-tint); }
  .logo { font-size: 24px; }
  .logo svg { width: 46px; height: 32px; }
  .nav .btn-get { display: none; }
  .hero { padding: 28px 0 8px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .h1 { font-size: 60px; margin: 16px 0; }
  .h2 { font-size: 46px; }
  .h3 { font-size: 30px; }
  .lead { font-size: 18px; }
  .marquee-item { font-size: 24px; padding: 14px 18px; }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 40px; margin-top: 48px; }
  .feature { grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 36px 0; }
  .feature.flip .feature-copy { order: 0; }
  .art-card { border-radius: 28px; box-shadow: var(--shadow); }
  .art-foot { padding: 0 18px 20px; }
  .mood-chips { padding: 0 18px 12px; }
  .bento { grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: 40px; }
  .span-4, .span-2, .span-3 { grid-column: auto; }
  .promise { grid-template-columns: minmax(0, 1fr); padding: 48px 22px; border-radius: 32px; gap: 32px; }
  .pricing { grid-template-columns: minmax(0, 1fr); }
  .plan-card { padding: 28px 20px; }
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .faq summary { font-size: 16px; }
  .faq details { padding: 0 18px; }
  .cta { padding: 96px 20px 48px; border-radius: 32px; }
  .cta-peek { width: 240px; height: 84px; top: -60px; }
  .footer-grid { flex-direction: column; }
  .legal { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .toc { position: static; }
  .legal-hero { grid-template-columns: minmax(0, 1fr); }
  .legal-hero .h1 { font-size: 56px; }
  .legal-hero svg { max-width: 240px; }
  .prose h2 { font-size: 32px; }
  table.data { font-size: 14px; }
}
