/* ============ Tokens ============ */
:root {
  color-scheme: light;
  --paper: #f6f1e7;
  --paper-2: #eee6d6;
  --card: #fffbf3;
  --ink: #1b2822;
  --soft: #5b6a62;
  --faint: #8d988f;
  --line: #e4dccb;
  --line-2: #d2c9b5;
  --forest: #1f4535;
  --forest-2: #2c5a46;
  --forest-3: #3b7058;
  --night: #0f231a;
  --sage: #dfe9d6;
  --wax: #a8432c;
  --wax-2: #82301e;
  --gold: #d0a457;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, system-ui, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --shadow-sm: 0 1px 2px rgb(27 40 34 / 6%), 0 3px 10px rgb(27 40 34 / 6%);
  --shadow: 0 2px 4px rgb(27 40 34 / 5%), 0 14px 34px rgb(27 40 34 / 11%);
  --shadow-lg: 0 10px 20px rgb(27 40 34 / 9%), 0 34px 70px rgb(27 40 34 / 18%);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0; min-height: 100dvh; display: flex; flex-direction: column;
  font: 16px/1.55 var(--sans); color: var(--ink); background: var(--paper);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  overflow-x: clip; transition: background-color .7s var(--ease), color .7s var(--ease);
}
main { flex: 1; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -.02em; }
:focus-visible { outline: 3px solid var(--wax); outline-offset: 3px; border-radius: 6px; }
::selection { background: #f0d2c3; }
[hidden] { display: none !important; }
.frame { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.grain {
  position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .3 0 0 0 0 .25 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============ Header / footer ============ */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--paper) 78%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .3s, background-color .7s var(--ease);
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 600 1.28rem/1 var(--serif); letter-spacing: -.02em; }
.mark {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-size: .9rem;
  background: radial-gradient(circle at 35% 30%, #c65c40, var(--wax) 55%, var(--wax-2)); color: #fff1e6;
  box-shadow: 0 2px 6px rgb(130 48 30 / 35%); transition: transform .5s var(--spring);
}
.wordmark:hover .mark { transform: rotate(72deg) scale(1.08); }
.pill-link {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line-2); text-decoration: none; font-size: .88rem; font-weight: 600;
  transition: background-color .2s, transform .2s var(--ease);
}
.pill-link:hover { background: var(--card); transform: translateY(-1px); }
.site-footer { margin-top: 90px; border-top: 1px solid var(--line); color: var(--soft); font-size: .86rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-block: 28px calc(28px + var(--safe-b)); }
.site-footer a { text-decoration: none; font-weight: 600; color: var(--ink); }
.footer-links, .resource-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.footer-links a:hover { text-decoration: underline; text-underline-offset: .2em; }
.resource-links { margin-top: 20px; }
.resource-page { width: min(700px, calc(100% - 48px)); margin-inline: auto; padding-top: clamp(36px, 9vw, 92px); }
.resource-page .title { margin-block: 12px 18px; }
.resource-page p { line-height: 1.65; }
.resource-page section { margin-top: 34px; }
.resource-page h2 { margin-bottom: 8px; }
.resource-page blockquote { margin: 8px 0 14px; padding-left: 16px; border-left: 3px solid var(--line-2); }
.resource-page p a { color: var(--forest); text-underline-offset: .2em; }

/* ============ Typography bits ============ */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--forest); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--wax); box-shadow: 0 0 0 4px rgb(168 67 44 / 14%); }
.muted, .description { color: var(--soft); }
.hint { color: var(--soft); font-size: .84rem; }
.hint:empty, .error:empty { display: none; }
.error { color: #9a3520; font-size: .9rem; font-weight: 550; }
.meta { color: var(--soft); font-size: .92rem; }
.title { font-size: clamp(2.3rem, 7vw, 3.9rem); line-height: 1.02; letter-spacing: -.045em; overflow-wrap: anywhere; }
.title:focus { outline: none; }

/* ============ Buttons ============ */
.button {
  --bg: var(--forest); --fg: #fbf6ec;
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border-radius: 999px; border: 1px solid transparent;
  background: var(--bg); color: var(--fg); font-weight: 650; font-size: .98rem; line-height: 1.1;
  text-decoration: none; white-space: nowrap; user-select: none; -webkit-user-select: none;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 14%), 0 8px 20px rgb(31 69 53 / 24%);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .2s, opacity .2s;
}
.button::after {
  content: ''; position: absolute; inset: 0; z-index: -1; transform: translateX(-120%);
  background: linear-gradient(105deg, transparent 30%, rgb(255 255 255 / 22%) 50%, transparent 70%);
  transition: transform .7s var(--ease);
}
.button:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgb(255 255 255 / 14%), 0 14px 28px rgb(31 69 53 / 28%); }
.button:hover::after { transform: translateX(120%); }
.button:active { transform: scale(.97); transition-duration: .08s; }
.button .arrow { display: inline-block; transition: transform .3s var(--spring); }
.button:hover .arrow { transform: translateX(4px); }
.button.ghost { --bg: transparent; --fg: var(--forest); border-color: var(--line-2); box-shadow: none; }
.button.ghost:hover { background: var(--card); box-shadow: var(--shadow-sm); }
.button.wax { --bg: var(--wax); box-shadow: inset 0 1px 0 rgb(255 255 255 / 18%), 0 10px 24px rgb(130 48 30 / 30%); }
.button.danger { --bg: #9a3520; box-shadow: none; }
.button.block { width: 100%; }
.button.icon-only { width: 52px; padding: 0; }
.button:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.button.is-busy { opacity: .9; cursor: progress; }
.button svg, .copy-btn svg, .icon-btn svg, .text-link svg { width: 18px; height: 18px; flex: none; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.text-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 4px; border: 0; background: none; color: var(--forest); font-weight: 600; font-size: .92rem; text-decoration: underline; text-underline-offset: .25em; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); }
.text-link.danger { color: #9a3520; }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--card); color: var(--forest); transition: transform .3s var(--ease), background-color .2s; }
.icon-btn:hover { background: var(--sage); }
.icon-btn.spin svg { animation: spin .8s linear infinite; }

/* ============ Envelope component ============ */
.env { --w: 300px; position: relative; display: block; width: var(--w); aspect-ratio: 3 / 2; perspective: 1000px; }
.env > span, .env > div { position: absolute; display: block; }
.env-back { inset: 0; border-radius: 12px; background: linear-gradient(180deg, #24503d, #1b4232); box-shadow: var(--shadow-lg); }
.env-letter {
  left: 7%; right: 7%; top: 6%; height: 92%; z-index: 1; display: flex !important; flex-direction: column; gap: .35em;
  padding: 9% 9% 0; border-radius: 6px; background: var(--card); color: var(--ink);
  box-shadow: 0 2px 6px rgb(0 0 0 / 14%); font-size: calc(var(--w) * .045); text-align: left;
  transition: transform .9s var(--ease) .3s;
  background-image: linear-gradient(transparent 0 calc(100% - 1px), rgb(31 69 53 / 7%) 0); background-size: 100% 1.6em;
}
.letter-kicker { color: var(--wax); font: 700 .72em/1 var(--sans); letter-spacing: .18em; }
.letter-title { font: italic 2.05em/1.05 var(--serif); letter-spacing: -.02em; }
.letter-body { font: 1.05em/1.45 var(--serif); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.letter-sign { color: var(--soft); font: italic .95em/1.2 var(--serif); }
.env-front {
  inset: 0; z-index: 2; border-radius: 12px;
  background: linear-gradient(155deg, var(--forest-3), #2b5944 60%, #244d3b);
  clip-path: polygon(0 0, 50% 56%, 100% 0, 100% 100%, 0 100%);
}
.env-front::before {
  content: ''; position: absolute; inset: 0; border-radius: 12px;
  background: linear-gradient(0deg, rgb(255 255 255 / 6%), rgb(0 0 0 / 8%));
  clip-path: polygon(0 100%, 50% 50%, 100% 100%);
}
.env-flap {
  left: 0; right: 0; top: 0; height: 60%; z-index: 3; transform-origin: 50% 0;
  background: linear-gradient(180deg, #326650, #29563f); border-radius: 12px 12px 0 0;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transition: transform .7s var(--ease), z-index 0s .35s;
}
.env-wax {
  left: 50%; top: 56%; z-index: 4; translate: -50% -50%; width: 18%; aspect-ratio: 1; border-radius: 50%;
  display: grid !important; place-items: center; color: #ffe9dc; font-size: calc(var(--w) * .075);
  background: radial-gradient(circle at 35% 30%, #c95e42, var(--wax) 55%, var(--wax-2));
  box-shadow: 0 4px 10px rgb(80 20 10 / 40%), inset 0 -3px 5px rgb(0 0 0 / 22%), inset 0 2px 3px rgb(255 255 255 / 20%);
  transition: opacity .3s, scale .4s var(--ease);
}
.env.is-open .env-flap { transform: rotateX(180deg); z-index: 0; }
.env.is-open .env-wax { opacity: 0; scale: .5; }
.env.is-open .env-letter { transform: translateY(-52%); }
.env.loop .env-flap { animation: flap-loop 8s var(--ease) infinite; }
.env.loop .env-letter { animation: letter-loop 8s var(--ease) infinite; }
.env.loop .env-wax { animation: wax-loop 8s var(--ease) infinite; }
.env.breathe { animation: breathe 4.5s ease-in-out infinite; }
.env.breathe .env-wax { animation: wax-glow 2.4s ease-in-out infinite; }
.env.stamp-in .env-wax { animation: stamp .7s var(--spring) .35s both; }
.env.drop-in { animation: drop-in .9s var(--spring) both; }
.env > .env-badge { display: grid; }
.env-badge {
  position: absolute; right: -10px; top: -10px; z-index: 6; min-width: 34px; height: 34px; padding: 0 8px; border-radius: 999px;
  display: grid; place-items: center; background: var(--gold); color: #2c2008; font-weight: 800; font-size: .95rem;
  box-shadow: 0 6px 14px rgb(0 0 0 / 25%); animation: pop .6s var(--spring) .6s both;
}

/* ============ Landing ============ */
.enter { animation: rise .9s var(--ease) both; }
.e1 { animation-delay: .05s; } .e2 { animation-delay: .2s; } .e3 { animation-delay: .45s; } .e4 { animation-delay: .58s; } .e5 { animation-delay: .7s; }
.hero { display: grid; grid-template-columns: 1.02fr 1fr; align-items: center; gap: clamp(28px, 5vw, 72px); padding-block: clamp(40px, 7vw, 92px) clamp(40px, 6vw, 70px); }
.headline { margin: 20px 0 22px; font-size: clamp(3.1rem, 6.5vw, 5.4rem); line-height: .95; letter-spacing: -.055em; }
.headline .line { display: block; overflow: hidden; padding-bottom: .08em; }
.headline .line > span { display: inline-block; animation: line-up 1s var(--ease) both; }
.headline .line:nth-child(2) > span { animation-delay: .14s; }
.headline .line:nth-child(3) > span { animation-delay: .28s; }
.headline em { font-style: italic; color: var(--forest); position: relative; }
.headline em::after {
  content: ''; position: absolute; left: 2%; right: 4%; bottom: .04em; height: .09em; border-radius: 99px;
  background: var(--wax); opacity: .8; transform-origin: left; animation: underline 1s var(--ease) .9s both;
}
.lede { max-width: 42ch; color: var(--soft); font-size: clamp(1.02rem, 1.6vw, 1.14rem); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.assurance { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 22px; color: var(--soft); font-size: .84rem; }
.assurance span { color: var(--forest-3); font-weight: 800; }

.scene {
  --rx: 0deg; --ry: 0deg;
  position: relative; display: grid; place-items: center; height: clamp(360px, 42vw, 500px);
  border-radius: 32px; overflow: hidden; text-decoration: none; isolation: isolate;
  background: radial-gradient(120% 90% at 30% 10%, #e9f1e2 0%, #d5e4cd 55%, #c4d8bb 100%);
  border: 1px solid #c7d9be; box-shadow: var(--shadow);
}
.scene::before { content: ''; position: absolute; inset: 14px; border-radius: 22px; border: 1px dashed rgb(31 69 53 / 22%); }
.scene-glow { position: absolute; width: 70%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgb(255 250 235 / 85%), transparent 65%); animation: glow 6s ease-in-out infinite; }
.scene-tilt { position: relative; display: block; transform: rotateX(var(--rx)) rotateY(var(--ry)); transform-style: preserve-3d; transition: transform .5s var(--ease); margin-top: 18%; }
.scene .env { --w: clamp(230px, 27vw, 330px); rotate: -4deg; }
.slip {
  position: absolute; z-index: 2; display: grid; gap: 4px; max-width: 190px; padding: 12px 14px; border-radius: 10px;
  background: var(--card); box-shadow: var(--shadow); font: italic .86rem/1.35 var(--serif); color: var(--ink);
}
.slip b { font: 600 .72rem/1 var(--sans); font-style: normal; color: var(--wax); letter-spacing: .04em; }
.s1 { left: 6%; top: 10%; rotate: -6deg; animation: bob 7s ease-in-out infinite; }
.s2 { right: 6%; top: 18%; rotate: 5deg; animation: bob 8s ease-in-out -2s infinite; }
.s3 { left: 10%; bottom: 8%; rotate: 3deg; animation: bob 9s ease-in-out -4s infinite; }
.spark { position: absolute; z-index: 1; color: var(--forest-3); font-size: 1.4rem; animation: twinkle 3.2s ease-in-out infinite; }
.k1 { left: 44%; top: 8%; } .k2 { right: 10%; bottom: 22%; animation-delay: -1s; } .k3 { left: 6%; top: 52%; font-size: 1rem; animation-delay: -2s; }

.marquee { overflow: hidden; border-block: 1px solid var(--line); padding-block: 16px; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 44px; width: max-content; animation: marquee 60s linear infinite; }
.marquee span { white-space: nowrap; font: italic 1.08rem/1.4 var(--serif); color: var(--soft); }
.marquee b { margin-left: 8px; font: 600 .72rem var(--sans); font-style: normal; letter-spacing: .1em; text-transform: uppercase; color: var(--wax); }
.marquee:hover .marquee-track { animation-play-state: paused; }

.how { padding-top: clamp(64px, 9vw, 110px); }
.section-heading { margin: 14px 0 34px; max-width: 18ch; font-size: clamp(2rem, 4.4vw, 3.2rem); line-height: 1.04; letter-spacing: -.04em; }
.how-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 0; padding: 0; list-style: none; }
.how-card { position: relative; padding: 28px 26px 30px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.how-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.how-card h3 { margin: 18px 0 6px; font-size: 1.45rem; }
.how-card p { color: var(--soft); font-size: .95rem; }
.how-icon { position: relative; display: block; width: 52px; height: 52px; border-radius: 16px; background: var(--sage); }
.how-icon::before, .how-icon::after { content: ''; position: absolute; }
.i-date::before { inset: 14px 13px 12px; border: 2px solid var(--forest); border-radius: 5px; border-top-width: 6px; }
.i-link::before { width: 18px; height: 10px; left: 9px; top: 21px; border: 2px solid var(--forest); border-radius: 6px; }
.i-link::after { width: 18px; height: 10px; left: 23px; top: 21px; border: 2px solid var(--wax); border-radius: 6px; }
.i-open::before { left: 12px; right: 12px; top: 17px; bottom: 14px; background: var(--forest); border-radius: 4px; clip-path: polygon(0 0, 50% 55%, 100% 0, 100% 100%, 0 100%); }
.i-open::after { left: 22px; top: 23px; width: 9px; height: 9px; border-radius: 50%; background: var(--wax); }

/* scroll reveal (only when JS is running) */
.js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
.js [data-reveal].in { opacity: 1; transform: none; }

/* ============ Create wizard ============ */
.create { padding-top: clamp(64px, 9vw, 110px); }
.create-shell {
  display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(24px, 5vw, 64px); align-items: start;
  padding: clamp(22px, 5vw, 56px); border-radius: 32px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.create-aside h2 { margin: 12px 0 10px; font-size: clamp(2rem, 4.4vw, 3rem); line-height: 1.02; letter-spacing: -.04em; }
.from-banner { margin-bottom: 10px; padding: 10px 14px; border-radius: 12px; background: #f8e7dc; color: var(--wax-2); font-weight: 600; font-size: .92rem; animation: rise .6s var(--ease) both; }
.mini-card {
  position: relative; display: grid; gap: 4px; margin-top: 26px; padding: 26px 24px 24px; border-radius: 18px;
  background: linear-gradient(160deg, var(--forest-2), var(--forest)); color: #f5efe2; box-shadow: var(--shadow-lg); rotate: -2deg;
  transition: rotate .6s var(--spring), transform .6s var(--spring);
}
.mini-card:hover { rotate: 0deg; transform: translateY(-3px); }
.mini-card::before { content: ''; position: absolute; inset: 8px; border-radius: 12px; border: 1px dashed rgb(255 255 255 / 20%); pointer-events: none; }
.mini-kicker { font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.mini-name { font: italic 500 clamp(1.8rem, 4vw, 2.4rem)/1.1 var(--serif); letter-spacing: -.02em; overflow-wrap: anywhere; }
.mini-name.pop { animation: pop .45s var(--spring); }
.mini-from { color: rgb(245 239 226 / 75%); font-size: .9rem; }
.mini-date { margin-top: 10px; justify-self: start; padding: 6px 12px; border-radius: 999px; background: rgb(255 255 255 / 10%); font-size: .8rem; font-weight: 600; }
.mini-stamp { position: absolute; right: 18px; top: 18px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #c95e42, var(--wax) 55%, var(--wax-2)); color: #ffe9dc; box-shadow: 0 4px 10px rgb(0 0 0 / 30%); }

.wizard { display: grid; gap: 18px; }
.wizard-top { display: grid; gap: 10px; }
.wizard-count { font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--soft); }
.wizard-bar { display: block; height: 6px; border-radius: 99px; background: var(--paper-2); overflow: hidden; }
.wizard-bar span { display: block; height: 100%; width: calc(var(--p, .333) * 100%); border-radius: inherit; background: linear-gradient(90deg, var(--forest-3), var(--forest)); transition: width .6s var(--ease); }
.wstep { display: grid; gap: 16px; }
.wstep.from-right { animation: from-right .55s var(--ease) both; }
.wstep.from-left { animation: from-left .55s var(--ease) both; }
.q { font: 500 clamp(1.6rem, 4vw, 2.2rem)/1.1 var(--serif); letter-spacing: -.03em; }
.field { display: grid; gap: 7px; font-size: .86rem; font-weight: 650; color: var(--soft); }
input, textarea {
  width: 100%; min-width: 0; min-height: 56px; padding: 14px 16px; border-radius: 14px;
  border: 1.5px solid var(--line-2); background: #fff; color: var(--ink); font-size: 1.06rem; font-weight: 450;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
input::placeholder, textarea::placeholder { color: #a9aea6; }
input:focus, textarea:focus { outline: none; border-color: var(--forest-3); box-shadow: 0 0 0 4px rgb(59 112 88 / 16%); }
input[type="datetime-local"] { display: block; -webkit-appearance: none; appearance: none; }
.hint.invalid { color: #9a3520; }
.shake { animation: shake .45s var(--ease); }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile {
  display: grid; gap: 2px; justify-items: start; padding: 14px; min-height: 72px; text-align: left; border-radius: 16px;
  border: 1.5px solid var(--line-2); background: #fff; transition: border-color .2s, background-color .2s, transform .25s var(--spring), box-shadow .2s;
}
.tile strong { font-size: .98rem; }
.tile span { color: var(--soft); font-size: .8rem; }
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.tile:active { transform: scale(.97); }
.tile[aria-pressed="true"] { border-color: var(--forest); background: var(--sage); box-shadow: 0 0 0 3px rgb(31 69 53 / 12%); }
.tile[aria-pressed="true"] strong::after { content: ' ✓'; color: var(--forest); }
.wizard-nav { display: flex; gap: 10px; }
.wizard-nav .wizard-next { flex: 1; }
.fine { font-size: .8rem; }

/* mobile sticky CTA (landing) */
.mobile-cta { display: none; }

/* ============ App views ============ */
.view { width: min(760px, calc(100% - 40px)); margin: clamp(26px, 6vw, 60px) auto 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.note-form, .letter, .starters { min-width: 0; }
.view > * { animation: rise .75s var(--ease) both; animation-delay: calc(var(--i, 0) * 65ms); }
.view.center { text-align: center; justify-items: center; }
.view .description { font-size: 1.06rem; max-width: 52ch; }
.section-title { margin-top: 26px; font-size: 1.6rem; }

.loading-view { min-height: 50vh; place-content: center; }
.loading-view .env { --w: 180px; }

/* status pill / stats */
.status-pill { justify-self: start; display: inline-flex; align-items: center; gap: 9px; padding: 7px 14px; border-radius: 999px; font-size: .86rem; font-weight: 650; background: var(--sage); color: var(--forest); }
.status-pill.is-done { background: #f3e4d6; color: var(--wax-2); }
.pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.is-live .pulse::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: currentColor; animation: ping 1.8s var(--ease) infinite; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.stat { display: grid; gap: 2px; padding: 20px 20px 18px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.stat-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stat-value { font: 500 clamp(2.4rem, 7vw, 3.2rem)/1 var(--serif); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.stat-label { color: var(--soft); font-size: .88rem; }
.stat.bump { animation: bump .6s var(--spring); }
.ready-banner { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 18px; background: var(--forest); color: #f5efe2; box-shadow: var(--shadow); }
.ready-banner p { color: rgb(245 239 226 / 78%); font-size: .9rem; }
.ready-check { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #f5efe2; color: var(--forest); animation: pop .6s var(--spring) .3s both; }
.ready-check svg { width: 22px; height: 22px; stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .5s var(--ease) .7s forwards; }

/* timeline + link cards */
.timeline { display: grid; gap: 0; margin: 4px 0 0; padding: 0; list-style: none; }
.timeline > li { position: relative; display: grid; grid-template-columns: 36px 1fr; gap: 14px; padding-bottom: 22px; }
.timeline > li::before { content: ''; position: absolute; left: 17px; top: 38px; bottom: 4px; width: 2px; background: repeating-linear-gradient(var(--line-2) 0 6px, transparent 6px 11px); }
.timeline > li:last-child::before { display: none; }
.tl-num { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--forest); color: #fff; font-weight: 700; font-size: .9rem; }
.tl-body { display: grid; gap: 10px; padding-top: 4px; min-width: 0; }
.tl-body h3 { font-size: 1.3rem; }
.link-card { display: grid; gap: 8px; padding: 16px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm); min-width: 0; }
.link-card.tone-invite { background: #f1f6ec; border-color: #c9dbc0; }
.link-card.tone-recipient { background: #fcf3ec; border-color: #ecd3c4; }
.link-card.tone-private { border-style: dashed; box-shadow: none; }
.link-title { font-weight: 700; font-size: .95rem; }
.link-field { display: flex; align-items: center; gap: 6px; padding: 5px 5px 5px 14px; border-radius: 14px; background: #fff; border: 1.5px solid var(--line-2); }
.link-input { flex: 1; min-height: 40px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none !important; font: .86rem/1 ui-monospace, "SF Mono", Menlo, monospace; color: var(--soft); text-overflow: ellipsis; }
.copy-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 14px; border-radius: 10px; border: 0; background: var(--forest); color: #fff; font-weight: 650; font-size: .88rem; transition: background-color .25s, transform .2s var(--spring); }
.copy-btn:active { transform: scale(.94); }
.copy-btn.done { background: var(--forest-3); }
.copy-btn.done svg { animation: pop .4s var(--spring); }
.tone-recipient .copy-btn { background: var(--wax); }
.tone-private .copy-btn { background: var(--ink); }
.link-actions { display: flex; flex-wrap: wrap; gap: 4px 18px; }
details.private { border-radius: 18px; }
details.private > summary { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 4px; list-style: none; font-weight: 650; color: var(--forest); cursor: pointer; }
details.private > summary::-webkit-details-marker { display: none; }
details.private > summary::after { content: '+'; margin-left: auto; font-size: 1.3rem; transition: rotate .3s var(--ease); }
details.private[open] > summary::after { rotate: 45deg; }
details.private > summary svg { width: 18px; height: 18px; }
details.private[open] .link-card { animation: rise .45s var(--ease) both; }
.danger-zone { margin-top: 18px; padding-top: 10px; border-top: 1px solid var(--line); }
.dock { display: none; }

/* ============ Guest: writing a letter ============ */
.signers { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.stack { display: flex; }
.stack span { width: 30px; height: 22px; margin-left: -10px; border-radius: 4px; border: 2px solid var(--paper); background: linear-gradient(155deg, var(--forest-3), var(--forest)); box-shadow: var(--shadow-sm); }
.stack span:first-child { margin-left: 0; }
.stack span:nth-child(even) { rotate: 6deg; } .stack span:nth-child(odd) { rotate: -5deg; }
.letter {
  position: relative; margin-top: 10px; padding: clamp(22px, 5vw, 38px); border-radius: 6px 6px 22px 22px;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-lg); transform-origin: 50% 0;
}
.letter::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 6px; border-radius: 6px 6px 0 0; background: repeating-linear-gradient(90deg, var(--wax) 0 18px, var(--card) 18px 26px, var(--forest) 26px 44px, var(--card) 44px 52px); opacity: .85; }
.dear { font: italic 1.5rem/1.2 var(--serif); margin-bottom: 8px; }
.starters { display: flex; gap: 8px; overflow-x: auto; margin: 6px -4px 10px; padding: 4px; scrollbar-width: none; }
.starters::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; color: var(--forest); font-size: .86rem; font-weight: 600; transition: background-color .2s, transform .2s var(--spring); }
.chip:hover { background: var(--sage); }
.chip:active { transform: scale(.94); }
.letter textarea {
  display: block; min-height: 190px; padding: 2px 0; border: 0; border-radius: 0; background: transparent; resize: none; overflow: hidden;
  font: 1.18rem/2rem var(--serif); color: var(--ink); box-shadow: none !important;
  background-image: linear-gradient(transparent calc(2rem - 1px), rgb(31 69 53 / 13%) 0); background-size: 100% 2rem; background-attachment: local;
}
.signature { display: flex; align-items: center; gap: 10px; margin-top: 18px; font: italic 1.3rem var(--serif); color: var(--soft); }
.signature input { min-height: 48px; padding: 6px 2px; border: 0; border-bottom: 1.5px solid var(--line-2); border-radius: 0; background: transparent; font: italic 1.25rem var(--serif); box-shadow: none !important; }
.signature input:focus { border-bottom-color: var(--forest-3); }
.letter-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; }
.counter { font-variant-numeric: tabular-nums; flex: none; }
.counter.low { color: #9a3520; font-weight: 650; }
.letter.sealing { animation: fold-away .8s var(--ease) forwards; pointer-events: none; }
.send-row { display: grid; gap: 10px; margin-top: 18px; }
.env-stage { position: relative; display: grid; place-items: center; padding: 56px 0 30px; }
.env-stage .env { --w: min(320px, 78vw); }
.cta-card { display: grid; gap: 12px; justify-items: center; margin-top: 18px; padding: 26px 22px; border-radius: 24px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm); width: 100%; }
.cta-card h2 { font-size: 1.6rem; }

/* ============ Recipient (night theme) ============ */
body[data-theme="night"] { background-color: var(--night); color: #f3ecdf; }
body[data-theme="night"] .site-header { background: color-mix(in srgb, var(--night) 75%, transparent); }
body[data-theme="night"] .site-header.scrolled { border-bottom-color: rgb(255 255 255 / 8%); }
body[data-theme="night"] .pill-link { border-color: rgb(255 255 255 / 18%); }
body[data-theme="night"] .pill-link:hover { background: rgb(255 255 255 / 8%); }
body[data-theme="night"] .site-footer { border-top-color: rgb(255 255 255 / 8%); color: rgb(243 236 223 / 55%); }
body[data-theme="night"] .site-footer a { color: #f3ecdf; }
body[data-theme="night"] .grain { opacity: .25; }
body[data-theme="night"] .eyebrow { color: var(--gold); }
body[data-theme="night"] .description, body[data-theme="night"] .meta, body[data-theme="night"] .hint { color: rgb(243 236 223 / 70%); }
body[data-theme="night"] .button.ghost { --fg: #f3ecdf; border-color: rgb(255 255 255 / 22%); }
body[data-theme="night"] .button.ghost:hover { background: rgb(255 255 255 / 8%); }
body[data-theme="night"] .button.primary { --bg: #f3ecdf; --fg: var(--forest); box-shadow: 0 10px 26px rgb(0 0 0 / 30%); }
body[data-theme="night"] .text-link { color: #f3ecdf; }
.night-view { position: relative; }
.night-view::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(900px 520px at 50% 8%, rgb(59 112 88 / 45%), transparent 70%), radial-gradient(500px 400px at 85% 90%, rgb(168 67 44 / 16%), transparent 70%); animation: fade .9s ease both; }
.stars { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.stars i { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #f7e7c0; animation: twinkle 3.6s ease-in-out infinite; }
.stars i:nth-child(1) { left: 12%; top: 22%; } .stars i:nth-child(2) { left: 82%; top: 16%; animation-delay: -1s; } .stars i:nth-child(3) { left: 70%; top: 62%; animation-delay: -2s; }
.stars i:nth-child(4) { left: 20%; top: 74%; animation-delay: -.5s; } .stars i:nth-child(5) { left: 48%; top: 10%; animation-delay: -2.6s; } .stars i:nth-child(6) { left: 92%; top: 44%; animation-delay: -1.6s; }
.stars i:nth-child(7) { left: 6%; top: 48%; animation-delay: -3s; } .stars i:nth-child(8) { left: 36%; top: 86%; animation-delay: -1.2s; }

.countdown { display: grid; grid-template-columns: repeat(4, minmax(0, 84px)); gap: 10px; justify-content: center; margin-top: 8px; }
.flip { display: grid; gap: 8px; justify-items: center; }
.flip-face {
  position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 1 / 1.1; border-radius: 16px; overflow: hidden;
  background: linear-gradient(180deg, #24503d 0 50%, #1d4434 50%); box-shadow: inset 0 1px 0 rgb(255 255 255 / 10%), 0 10px 24px rgb(0 0 0 / 30%);
  font: 500 clamp(2rem, 8vw, 2.8rem)/1 var(--serif); font-variant-numeric: tabular-nums; color: #f8f1e3;
}
.flip-face::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgb(0 0 0 / 35%); }
.flip-face.tick span { animation: flip-in .45s var(--ease); }
.flip small { color: rgb(243 236 223 / 60%); font-size: .7rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }

/* reveal intro + deck */
.open-stage { display: grid; justify-items: center; gap: 18px; width: 100%; margin-top: 6px; }
.intro-stage { display: grid; justify-items: center; gap: 18px; width: 100%; }
.intro-stage.leaving { animation: leave .4s var(--ease) forwards; }
.env-hit { display: block; padding: 70px 0 10px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.env-hit .env { --w: min(340px, 80vw); transition: transform .4s var(--spring); }
.env-hit:hover .env { transform: translateY(-4px) rotate(-1deg); }
.tap-hint { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); animation: breathe-text 2.4s ease-in-out infinite; }
.deck-wrap { display: grid; justify-items: center; gap: 18px; width: 100%; animation: rise .6s var(--ease) both; }
.deck-top { display: grid; justify-items: center; gap: 10px; }
.deck-count { font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); font-variant-numeric: tabular-nums; }
.dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 280px; }
.dots span { width: 7px; height: 7px; border-radius: 99px; background: rgb(255 255 255 / 20%); transition: width .4s var(--ease), background-color .3s; }
.dots span.seen { background: rgb(243 236 223 / 55%); }
.dots span.now { width: 22px; background: var(--gold); }
.deck { position: relative; display: grid; width: min(560px, 100%); padding: 6px 4px 34px; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.note-card {
  grid-area: 1 / 1; position: relative; display: flex; flex-direction: column; gap: 14px; min-height: 360px;
  padding: clamp(26px, 6vw, 44px); border-radius: 8px 8px 22px 22px; text-align: left;
  background: var(--card); color: var(--ink); box-shadow: 0 26px 60px rgb(0 0 0 / 38%);
  background-image: linear-gradient(transparent calc(2.1rem - 1px), rgb(31 69 53 / 9%) 0); background-size: 100% 2.1rem; background-position: 0 8px;
  transform-origin: 50% 110%;
  transition: transform .6s var(--ease), opacity .5s var(--ease), filter .5s;
}
.note-card > * { transition: opacity .35s var(--ease); }
.note-card:not([data-pos="0"]) > * { opacity: 0; }
.note-card[data-pos="0"] { z-index: 5; transform: translateX(calc(var(--drag, 0) * 1px)) rotate(calc(var(--drag, 0) * .045deg)); }
.note-card[data-pos="1"] { z-index: 4; transform: translateY(16px) scale(.95) rotate(2.2deg); filter: brightness(.92); }
.note-card[data-pos="2"] { z-index: 3; transform: translateY(30px) scale(.9) rotate(-2.6deg); filter: brightness(.84); }
.note-card[data-pos="hidden"] { z-index: 1; transform: translateY(30px) scale(.88); opacity: 0; }
.note-card[data-pos="past"] { z-index: 6; transform: translate(-110%, -24px) rotate(-12deg); opacity: 0; pointer-events: none; }
.deck.turning-forward .note-card[data-pos="past"] {
  transition: transform 1.3s cubic-bezier(.45, 0, .35, 1) .25s, opacity .55s ease-in .7s, filter .5s;
}
.deck.turning-forward .note-card[data-pos="past"] > * { transition: opacity .5s ease-in .5s; }
.deck.turning-forward .note-card[data-pos="0"] {
  transition: transform .9s var(--ease) .55s, filter .8s var(--ease) .55s;
}
.deck.turning-forward .note-card[data-pos="0"] > * { transition: opacity .55s var(--ease) .85s; }
.deck.dragging .note-card[data-pos="0"] { transition: none; }
.note-seal { position: absolute; right: 20px; top: 20px; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: #ffe9dc; background: radial-gradient(circle at 35% 30%, #c95e42, var(--wax) 55%, var(--wax-2)); box-shadow: 0 4px 10px rgb(80 20 10 / 35%); }
.note-card[data-pos="0"] .note-seal { animation: stamp .6s var(--spring) .15s both; }
.note-dear { font: italic 1.35rem/1.2 var(--serif); color: var(--soft); padding-right: 52px; }
.note-text { flex: 1; font: 1.28rem/2.1rem var(--serif); white-space: pre-wrap; overflow-wrap: anywhere; }
.note-sign { align-self: flex-end; font: italic 1.25rem var(--serif); color: var(--wax); }
.note-card.finale { align-items: center; justify-content: center; text-align: center; background: linear-gradient(160deg, #fffbf3, #f6ecd9); }
.finale-mark { font-size: 2.4rem; color: var(--wax); }
.note-card.finale h2 { font-size: 2.2rem; }
.note-card.finale p { color: var(--soft); max-width: 32ch; }
.deck-controls { display: flex; gap: 10px; width: min(560px, 100%); }
.deck-controls .button.primary { flex: 1; }
.swipe-hint { font-size: .8rem; color: rgb(243 236 223 / 55%); }
.notes-grid { columns: 2 260px; column-gap: 14px; width: 100%; text-align: left; }
.notes-grid .mini-note { break-inside: avoid; margin-bottom: 14px; padding: 20px 22px; border-radius: 6px 6px 18px 18px; background: var(--card); color: var(--ink); box-shadow: 0 14px 30px rgb(0 0 0 / 30%); animation: rise .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 50ms); }
.mini-note p { font: 1.08rem/1.6 var(--serif); white-space: pre-wrap; overflow-wrap: anywhere; }
.mini-note span { display: block; margin-top: 10px; font: italic 1rem var(--serif); color: var(--wax); text-align: right; }
.sample-tag { padding: 6px 14px; border-radius: 999px; background: rgb(208 164 87 / 18%); color: var(--gold); font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }

/* unavailable */
.torn { width: 120px; height: 84px; border-radius: 10px; background: var(--paper-2); position: relative; clip-path: polygon(0 0, 100% 0, 100% 100%, 64% 100%, 58% 86%, 52% 100%, 46% 84%, 40% 100%, 0 100%); }
.torn::after { content: '?'; position: absolute; inset: 0; display: grid; place-items: center; font: italic 2.4rem var(--serif); color: var(--faint); }

/* ============ Overlays ============ */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + var(--safe-b)); z-index: 120; translate: -50% 140%; opacity: 0;
  display: flex; align-items: center; gap: 8px; max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 999px;
  background: var(--ink); color: #f8f2e6; font-weight: 600; font-size: .9rem; box-shadow: var(--shadow-lg);
  transition: translate .45s var(--spring), opacity .3s; pointer-events: none;
}
.toast svg { width: 18px; height: 18px; flex: none; }
.toast.show { translate: -50% 0; opacity: 1; }
.toast:empty { display: none; }
body.has-dock .toast { bottom: calc(96px + var(--safe-b)); }
.confetti { position: fixed; inset: 0; z-index: 110; pointer-events: none; width: 100%; height: 100%; }
dialog.sheet { width: min(440px, calc(100% - 32px)); padding: 28px; border: 0; border-radius: 24px; background: var(--card); color: var(--ink); box-shadow: var(--shadow-lg); }
dialog.sheet[open] { animation: sheet-in .4s var(--spring) both; }
dialog.sheet::backdrop { background: rgb(15 35 26 / 45%); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: fade .3s ease both; }
dialog.sheet h2 { font-size: 1.7rem; margin-bottom: 8px; }
dialog.sheet p { color: var(--soft); }
.sheet-actions { display: flex; gap: 10px; margin-top: 22px; }
.sheet-actions .button { flex: 1; }

/* ============ Keyframes ============ */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes line-up { from { transform: translateY(105%); } }
@keyframes underline { from { transform: scaleX(0); } }
@keyframes fade { from { opacity: 0; } }
@keyframes spin { to { rotate: 360deg; } }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 60% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }
@keyframes bump { 40% { transform: scale(1.05); } }
@keyframes ping { 0% { transform: scale(1); opacity: .6; } 100% { transform: scale(3); opacity: 0; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes glow { 0%, 100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.08); opacity: 1; } }
@keyframes twinkle { 0%, 100% { opacity: .25; transform: scale(.8) rotate(0); } 50% { opacity: 1; transform: scale(1.15) rotate(20deg); } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes breathe { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-10px) rotate(1deg); } }
@keyframes breathe-text { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes wax-glow { 0%, 100% { box-shadow: 0 4px 10px rgb(80 20 10 / 40%), 0 0 0 0 rgb(208 164 87 / 0%); } 50% { box-shadow: 0 4px 10px rgb(80 20 10 / 40%), 0 0 0 10px rgb(208 164 87 / 18%); } }
@keyframes stamp { 0% { scale: 2.4; opacity: 0; rotate: -25deg; } 70% { scale: .92; opacity: 1; rotate: 4deg; } 100% { scale: 1; rotate: 0deg; } }
@keyframes drop-in { from { transform: translateY(-60px) rotate(-8deg); opacity: 0; } }
@keyframes flap-loop { 0%, 12% { transform: rotateX(0); z-index: 3; } 22%, 78% { transform: rotateX(180deg); z-index: 0; } 88%, 100% { transform: rotateX(0); z-index: 3; } }
@keyframes letter-loop { 0%, 22% { transform: translateY(0); } 34%, 66% { transform: translateY(-52%); } 76%, 100% { transform: translateY(0); } }
@keyframes wax-loop { 0%, 9% { opacity: 1; scale: 1; } 14%, 84% { opacity: 0; scale: .5; } 92%, 100% { opacity: 1; scale: 1; } }
@keyframes from-right { from { opacity: 0; transform: translateX(34px); } }
@keyframes from-left { from { opacity: 0; transform: translateX(-34px); } }
@keyframes shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
@keyframes fold-away {
  0% { transform: none; opacity: 1; }
  35% { transform: perspective(900px) rotateX(22deg) scale(.94); }
  100% { transform: perspective(900px) translateY(-60px) rotateX(78deg) scale(.55); opacity: 0; }
}
@keyframes flip-in { 0% { transform: translateY(-40%) rotateX(80deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes leave { to { opacity: 0; transform: translateY(-20px) scale(.96); } }
@keyframes sheet-in { from { opacity: 0; transform: translateY(30px) scale(.97); } }
@keyframes slide-up { from { transform: translateY(110%); } }

/* ============ Responsive ============ */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .scene { height: 360px; order: 2; }
  .how-list { grid-template-columns: 1fr; }
  .create-shell { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .frame { width: calc(100% - 32px); }
  .header-inner { min-height: 60px; }
  .wordmark { font-size: 1.15rem; }
  .pill-link { min-height: 36px; padding: 0 13px; font-size: .82rem; }
  .hero { padding-top: 26px; gap: 30px; }
  .headline { font-size: clamp(2.55rem, 12vw, 4.2rem); margin-block: 14px 16px; }
  .actions { display: grid; grid-template-columns: 1fr; }
  .assurance { font-size: .8rem; }
  .scene { height: 340px; border-radius: 26px; }
  .scene .env { --w: 220px; }
  .slip { max-width: 150px; padding: 10px 12px; font-size: .78rem; }
  .s2 { top: 8%; } .s3 { bottom: 6%; }
  .how-card { padding: 22px; }
  .create-shell { border-radius: 26px; padding: 20px; }
  .mini-card { margin-top: 18px; padding: 20px; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .tile { min-height: 64px; padding: 12px; }
  .mobile-cta {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; padding: 12px 16px calc(12px + var(--safe-b));
    background: linear-gradient(transparent, var(--paper) 35%); transform: translateY(120%); transition: transform .5s var(--ease);
  }
  .mobile-cta.show { transform: none; }
  .view { width: calc(100% - 32px); }
  .stats { gap: 10px; }
  .stat { padding: 16px; }
  .timeline > li { grid-template-columns: 30px 1fr; gap: 12px; }
  .timeline > li::before { left: 14px; }
  .tl-num { width: 30px; height: 30px; font-size: .82rem; }
  .link-card { padding: 14px; }
  body.has-dock .site-footer { padding-bottom: 84px; }
  .dock {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; padding: 12px 16px calc(12px + var(--safe-b));
    background: linear-gradient(transparent, var(--paper) 30%); animation: slide-up .6s var(--ease) .5s both;
  }
  .letter { margin-inline: -6px; }
  .letter textarea { font-size: 1.1rem; }
  .countdown { gap: 8px; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; }
  .note-card { min-height: 340px; }
  .note-text { font-size: 1.16rem; }
  .notes-grid { columns: 1; }
  .sheet-actions { flex-direction: column-reverse; }
  dialog.sheet { margin: auto auto calc(12px + var(--safe-b)); }
}
@media (hover: none) { .button:hover, .how-card:hover, .tile:hover { transform: none; } .button:hover::after { transform: translateX(-120%); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .marquee-track { animation: none; }
}
