:root {
  --ink: #1a2130;
  --cream: #f8f1e7;
  --blush: #df9d98;
  --petal: #f0c5bf;
  --gold: #e7bc77;
  --night: #141c30;
  --wine: #76505b;
  --screen-height: 100svh;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; background: var(--night); }

body {
  color: var(--cream);
  font-family: "Noto Serif SC", "Songti SC", "STSong", Georgia, serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

.site-shell { position: relative; width: 100%; height: var(--screen-height); overflow: hidden; transition: opacity 420ms ease; }
body.is-loading { overflow: hidden; }
body.is-loading .site-shell { visibility: hidden; opacity: 0; }
.site-loader { position: fixed; z-index: 30; inset: 0; display: grid; place-content: center; gap: 9px; padding: 24px; color: rgba(255, 241, 230, .92); background: radial-gradient(circle at 50% 44%, rgba(243, 186, 180, .24), transparent 22%), linear-gradient(155deg, #e6b7b7 0%, #a87891 58%, #443954 100%); font-family: ui-sans-serif, system-ui, sans-serif; text-align: center; transition: opacity 500ms ease, visibility 0s linear 500ms; }
.site-loader p { margin: 0; font-size: .82rem; letter-spacing: .15em; }
.site-loader span:not(.site-loader-flower) { color: rgba(255, 232, 220, .7); font-size: .59rem; letter-spacing: .1em; }
.site-loader-flower { color: #f5cfaa; font-size: 2.3rem; line-height: 1; animation: loader-bloom 1.8s ease-in-out infinite; }
body:not(.is-loading) .site-loader { visibility: hidden; opacity: 0; }

#petal-canvas { position: fixed; inset: 0; z-index: 5; width: 100%; height: 100%; pointer-events: none; }

.screen {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  min-height: var(--screen-height);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate3d(0, 18px, 0) scale(1.018);
  transition: opacity 700ms ease, transform 800ms cubic-bezier(.22,.75,.2,1), visibility 0s linear 800ms;
}

.screen.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate3d(0, 0, 0) scale(1);
  transition-delay: 0s;
}

.garden-backdrop, .night-wash, .promise-sky { position: absolute; inset: 0; }
.garden-backdrop {
  background: #27152f url("assets/sakura-water.png") center center / cover no-repeat;
  transform: scale(1.03);
  animation: slow-drift 18s ease-in-out infinite alternate;
}

/* 现代移动浏览器会优先获取 201 KB WebP；PNG 只给不支持 WebP 的旧浏览器回退。 */
@supports (background-image: image-set(url("assets/sakura-water.webp") type("image/webp"))) {
  .garden-backdrop {
    background-image: image-set(
      url("assets/sakura-water.webp") type("image/webp"),
      url("assets/sakura-water.png") type("image/png")
    );
  }
}
.night-wash {
  background: linear-gradient(180deg, rgba(31, 12, 36, .18) 0%, rgba(42, 14, 43, .04) 44%, rgba(23, 9, 34, .22) 100%);
}
.promise-sky {
  background:
    radial-gradient(circle at 12% 7%, rgba(250, 221, 188, .88) 0 1px, transparent 2px),
    radial-gradient(circle at 87% 18%, rgba(255,255,255,.65) 0 1px, transparent 2px),
    radial-gradient(circle at 66% 4%, rgba(255,255,255,.45) 0 1px, transparent 2px),
    radial-gradient(circle at 50% 22%, rgba(255, 235, 220, .42), transparent 32%),
    linear-gradient(155deg, #e6b7b7 0%, #d69aa0 38%, #9e708b 70%, #493d63 100%);
}

.site-header {
  position: absolute;
  top: max(22px, env(safe-area-inset-top));
  right: clamp(22px, 6vw, 74px);
  left: clamp(22px, 6vw, 74px);
  /* Keep the music control tappable while the full-screen envelope is visible. */
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(91, 63, 57, .85);
  font-size: .72rem;
  letter-spacing: .13em;
}

.wordmark, .back-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: inherit;
  text-decoration: none;
  font: inherit;
  font-size: .9rem;
  letter-spacing: .2em;
}
.wordmark-flower { color: var(--gold); font-size: 1rem; }
.back-button { border: 0; padding: 0; background: none; cursor: pointer; }
.back-button span { font-size: 1.15rem; line-height: 1; }
.header-note { opacity: .62; font-family: ui-sans-serif, system-ui, sans-serif; font-size: .63rem; text-transform: uppercase; }
.audio-panel { display: grid; justify-items: end; gap: 2px; }
.music-toggle { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border: 1px solid rgba(255, 239, 222, .36); border-radius: 999px; color: inherit; background: rgba(55, 30, 47, .18); font-family: ui-sans-serif, system-ui, sans-serif; font-size: .61rem; letter-spacing: .1em; cursor: pointer; opacity: .94; }
.music-toggle:hover { background: rgba(55, 30, 47, .31); }
.music-toggle-icon { display: inline-grid; place-items: center; width: 13px; height: 13px; color: var(--gold); font-size: .7rem; line-height: 1; }
.music-toggle.is-playing .music-toggle-icon { animation: music-pulse 1.8s ease-in-out infinite; }

.letter-layout {
  position: relative;
  z-index: 3;
  display: flex;
  width: min(100% - 42px, 650px);
  min-height: var(--screen-height);
  margin: 0 auto;
  padding: clamp(77px, 12svh, 108px) 0 max(28px, env(safe-area-inset-bottom));
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 10000ms cubic-bezier(.22,.75,.2,1) 520ms, transform 10000ms cubic-bezier(.22,.75,.2,1) 520ms;
}

.letter-screen:not(.is-opened) .letter-layout {
  opacity: 0;
  pointer-events: none;
  transform: translateY(32px) scale(.985);
}

.letter-screen::after {
  position: absolute;
  z-index: 2;
  inset: 0;
  content: "";
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at 50% 49%, rgba(255, 240, 195, .86) 0, rgba(255, 195, 168, .36) 19%, transparent 47%);
  transform: scale(.58);
}
.letter-screen.is-revealing::after { animation: ceremonial-bloom 1050ms cubic-bezier(.2,.78,.2,1) both; }

.reveal-bouquet { position: absolute; z-index: 4; inset: 0; overflow: hidden; pointer-events: none; }
.reveal-bouquet::before, .reveal-bouquet::after { position: absolute; top: 34%; width: clamp(110px, 28vw, 250px); aspect-ratio: 1; border-radius: 50%; content: ""; opacity: 0; filter: blur(2px); }
.reveal-bouquet::before { left: clamp(-105px, -9vw, -36px); background: radial-gradient(circle, rgba(221, 157, 177, .42) 0, rgba(221, 157, 177, .15) 35%, transparent 70%); }
.reveal-bouquet::after { right: clamp(-105px, -9vw, -36px); background: radial-gradient(circle, rgba(219, 178, 125, .4) 0, rgba(219, 157, 151, .14) 35%, transparent 70%); }
.letter-screen.is-opened .reveal-bouquet::before { animation: blossom-halo 2300ms ease-out 420ms both; }
.letter-screen.is-opened .reveal-bouquet::after { animation: blossom-halo 2300ms ease-out 620ms both; }
.reveal-bloom { --bloom-shift: 0px; position: absolute; opacity: 0; filter: drop-shadow(0 8px 13px rgba(91, 24, 49, .3)); line-height: 1; text-shadow: 0 0 13px rgba(255, 240, 219, .42), 0 6px 18px rgba(71, 25, 45, .28); -webkit-text-stroke: 1px rgba(255, 244, 228, .16); }
.bloom-left-one { top: 23%; left: clamp(-28px, 1.5vw, 26px); color: #dc9eac; font-size: clamp(4.2rem, 12vw, 8rem); --bloom-delay: 520ms; --bloom-shift: -18px; }
.bloom-left-three { top: 69%; left: clamp(-28px, 1.5vw, 26px); color: #d7af79; font-size: clamp(4rem, 11vw, 7.5rem); --bloom-delay: 980ms; --bloom-shift: -18px; }
.bloom-right-one { top: 20%; right: clamp(-28px, 1.5vw, 26px); color: #dea7ae; font-size: clamp(4.5rem, 13vw, 8.5rem); --bloom-delay: 680ms; --bloom-shift: 18px; }
.bloom-right-three { top: 68%; right: clamp(-28px, 1.5vw, 26px); color: #d5a09b; font-size: clamp(4.2rem, 12vw, 8rem); --bloom-delay: 1160ms; --bloom-shift: 18px; }
.letter-screen.is-opened .reveal-bloom { animation: side-bloom 2600ms cubic-bezier(.18,.88,.22,1) var(--bloom-delay) both; }

.letter-screen .site-header { color: rgba(255, 244, 232, .88); text-shadow: 0 1px 11px rgba(39, 10, 35, .5); }
.letter-screen .header-note { opacity: .75; }

.eyebrow { margin: 0 0 12px; color: rgba(101, 67, 61, .82); font-family: ui-sans-serif, system-ui, sans-serif; font-size: clamp(.61rem, 2vw, .75rem); letter-spacing: .18em; text-align: center; }
.eyebrow-dark { color: rgba(72, 47, 60, .72); }

.letter-card {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: clamp(27px, 5vw, 42px) clamp(24px, 7vw, 58px) clamp(24px, 5vw, 38px);
  border: 1px solid rgba(137, 88, 78, .2);
  border-radius: 3px;
  background: linear-gradient(134deg, rgba(255, 252, 241, .88), rgba(255, 244, 227, .76));
  box-shadow: 0 18px 60px rgba(131, 78, 63, .18), inset 0 1px 0 rgba(255,255,255,.78);
  backdrop-filter: blur(6px);
}
.letter-card::before, .letter-card::after { content: ""; position: absolute; width: 34px; height: 34px; border-color: rgba(189, 125, 100, .5); pointer-events: none; }
.letter-card::before { top: 11px; left: 11px; border-top: 1px solid; border-left: 1px solid; }
.letter-card::after { right: 11px; bottom: 11px; border-right: 1px solid; border-bottom: 1px solid; }
.letter-card-shine { position: absolute; inset: 0; background: linear-gradient(115deg, transparent 20%, rgba(255,255,255,.46) 42%, transparent 55%); transform: translateX(-130%); animation: card-shine 8s ease-in-out infinite; }
.letter-to { position: relative; margin: 0 0 12px; color: #a56c62; font-family: ui-sans-serif, system-ui, sans-serif; font-size: clamp(.88rem, 3.6vw, 1rem); letter-spacing: .19em; }
.letter-card h1 { position: relative; margin: 0 0 clamp(18px, 3vh, 27px); color: #6b4850; font-size: clamp(1.65rem, 7vw, 2.5rem); font-weight: 500; letter-spacing: .055em; line-height: 1.24; }
.letter-copy { position: relative; color: #4b323a; font-size: clamp(.91rem, 3.75vw, 1.08rem); font-weight: 500; line-height: 1.82; letter-spacing: .025em; }
.letter-copy p { margin: 0 0 .54em; }
.letter-copy p:last-child { margin-bottom: 0; }
.signature { position: relative; margin: 19px 0 0; color: #a56c62; font-size: clamp(.88rem, 3.6vw, 1rem); text-align: right; }
.pressed-flower { position: absolute; color: rgba(245, 196, 180, .7); }
.flower-one { top: 20px; right: 28px; color: rgba(205, 118, 102, .68); font-size: 1.25rem; transform: rotate(16deg); }
.flower-two { bottom: 18px; left: 24px; color: rgba(202, 154, 73, .68); font-size: .78rem; }

.promise-entrance {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  cursor: pointer;
}
.promise-entrance {
  margin-top: clamp(18px, 3.8vh, 30px);
  padding: 0;
  color: rgba(98, 62, 58, .92);
  background: none;
  font-size: .86rem;
  letter-spacing: .11em;
}
.letter-screen .promise-entrance { color: rgba(255, 245, 234, .96); text-shadow: 0 1px 10px rgba(41, 12, 41, .7); }
.promise-entrance i { font-size: 1.1rem; font-style: normal; animation: bounce-down 2s ease-in-out infinite; }
.letter-screen .eyebrow { color: rgba(255, 239, 225, .78); text-shadow: 0 1px 9px rgba(40, 10, 37, .66); }

/* 首屏：一封先被拆开的信。 */
.envelope-stage {
  position: absolute;
  z-index: 4;
  inset: 0;
  display: flex;
  padding: max(84px, env(safe-area-inset-top)) 21px max(48px, env(safe-area-inset-bottom));
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 480ms ease, visibility 0s linear 480ms, transform 620ms cubic-bezier(.22,.75,.2,1);
}
.envelope-kicker, .open-letter-hint { margin: 0; color: rgba(255, 238, 224, .91); font-family: ui-sans-serif, system-ui, sans-serif; font-size: clamp(.68rem, 2.4vw, .79rem); letter-spacing: .13em; text-align: center; text-shadow: 0 1px 10px rgba(40, 10, 37, .76); transition: opacity 360ms ease, transform 440ms ease; }
.envelope-kicker { margin-bottom: clamp(19px, 4vh, 31px); }
.open-letter-hint { margin-top: clamp(20px, 4vh, 32px); color: rgba(255, 220, 203, .88); animation: breathe 2.4s ease-in-out infinite; }
.headphone-notice { display: inline-flex; align-items: center; gap: 6px; margin: 11px 0 0; color: rgba(255, 234, 219, .92); font-family: ui-sans-serif, system-ui, sans-serif; font-size: clamp(.64rem, 2.2vw, .73rem); letter-spacing: .12em; text-shadow: 0 1px 10px rgba(40, 10, 37, .76); }
.headphone-notice span { color: #f4c995; font-size: .95rem; }
.envelope-button {
  position: relative;
  display: block;
  width: min(82vw, 390px);
  aspect-ratio: 1.4 / 1;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  filter: drop-shadow(0 18px 21px rgba(116, 70, 57, .22));
  perspective: 900px;
}
.envelope-button:focus-visible { outline-color: #9b5f5e; outline-offset: 8px; }
.envelope-letter, .envelope-back, .envelope-flap, .envelope-front { position: absolute; display: block; }
.envelope-letter {
  z-index: 1;
  top: 7%;
  left: 9%;
  width: 82%;
  height: 82%;
  padding: 17% 13% 0;
  border: 1px solid rgba(150, 91, 79, .21);
  background: linear-gradient(125deg, #fffaf0, #f8e4c6);
  color: #9f675c;
  box-shadow: inset 0 0 18px rgba(198, 139, 106, .09);
  text-align: center;
  transition: transform 4000ms cubic-bezier(.22,.75,.2,1) 70ms;
}
.envelope-letter-title { display: block; margin-bottom: 13%; font-family: Georgia, serif; font-size: clamp(1.05rem, 4vw, 1.45rem); font-style: italic; letter-spacing: .06em; }
.envelope-letter-line { display: block; height: 1px; margin: 9% auto 0; background: rgba(164, 104, 87, .26); }
.line-one { width: 78%; }.line-two { width: 61%; }.line-three { width: 70%; }
.envelope-back { z-index: 0; inset: 17% 0 0; border-radius: 3px; background: linear-gradient(135deg, #efb6a5, #d98789); }
.envelope-flap {
  z-index: 4;
  top: 17%;
  left: 0;
  width: 100%;
  height: 61%;
  clip-path: polygon(0 0, 100% 0, 50% 81%);
  background: linear-gradient(145deg, #f4c5b2, #df9792);
  transform-origin: 50% 0;
  transition: transform 2000ms cubic-bezier(.22,.75,.2,1), z-index 0s linear 1000ms;
  backface-visibility: hidden;
}
.envelope-front { z-index: 3; inset: 17% 0 0; border-radius: 3px; background: linear-gradient(145deg, #f6c8b6, #eaa69f); clip-path: polygon(0 0, 50% 47%, 100% 0, 100% 100%, 0 100%); }
.wax-seal {
  position: absolute;
  z-index: 5;
  top: 49%;
  left: 50%;
  display: grid;
  width: clamp(43px, 12vw, 55px);
  aspect-ratio: 1;
  place-items: center;
  border: 2px solid rgba(255, 220, 197, .73);
  border-radius: 50%;
  background: radial-gradient(circle at 31% 27%, #e9827c 0 6%, #bd5a62 45%, #93495a 100%);
  box-shadow: 0 4px 7px rgba(99, 49, 60, .22), inset 0 2px 4px rgba(255, 210, 190, .3);
  color: #ffe7c9;
  font-size: 1.15rem;
  transform: translate(-50%, -50%);
  transition: transform 310ms ease, opacity 240ms ease;
}
.envelope-button:hover .wax-seal { transform: translate(-50%, -54%) scale(1.05); }
.letter-screen.is-opening .wax-seal { opacity: 0; transform: translate(-50%, -50%) scale(.45); }
.letter-screen.is-opening .envelope-kicker { opacity: 0; transform: translateY(-10px); }
.letter-screen.is-opening .open-letter-hint { opacity: 0; transform: translateY(10px); }
.letter-screen.is-opening .headphone-notice { opacity: 0; transform: translateY(8px); transition: opacity 260ms ease, transform 260ms ease; }
.letter-screen.is-opening .envelope-flap { z-index: 1; transform: rotateX(178deg); }
.letter-screen.is-opening .envelope-letter { transform: translateY(-36%) scale(1.025); }
.letter-screen.is-opened .envelope-stage { visibility: hidden; opacity: 0; transform: translateY(-18px) scale(1.025); pointer-events: none; }

@keyframes breathe { 0%, 100% { opacity: .54; transform: translateY(0); } 50% { opacity: 1; transform: translateY(3px); } }
@keyframes music-pulse { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
@keyframes loader-bloom { 0%, 100% { opacity: .55; transform: scale(.86) rotate(-7deg); } 50% { opacity: 1; transform: scale(1.06) rotate(7deg); } }
@keyframes ceremonial-bloom { 0% { opacity: 0; transform: scale(.58); } 38% { opacity: .95; transform: scale(1.08); } 100% { opacity: 0; transform: scale(1.34); } }
@keyframes blossom-halo { 0% { opacity: 0; transform: scale(.25); } 48% { opacity: .58; transform: scale(1); } 100% { opacity: .22; transform: scale(1.32); } }
@keyframes side-bloom { 0% { opacity: 0; transform: translate(var(--bloom-shift), 34px) scale(.06) rotate(-34deg); } 42% { opacity: .9; transform: translate(var(--bloom-shift), -8px) scale(1.52) rotate(12deg); } 68% { opacity: .9; transform: translate(var(--bloom-shift), 4px) scale(1.12) rotate(-5deg); } 100% { opacity: .84; transform: translate(var(--bloom-shift), 0) scale(1.24) rotate(0); } }

.promise-screen { color: var(--ink); }
.site-header-light { color: rgba(53, 35, 49, .82); }
.promise-layout {
  position: relative;
  z-index: 3;
  display: grid;
  width: min(100% - 42px, 1000px);
  margin: auto;
  padding: max(76px, env(safe-area-inset-top)) 0 max(43px, env(safe-area-inset-bottom));
  grid-template-columns: minmax(0, .78fr) minmax(300px, 1fr);
  grid-template-rows: auto auto;
  column-gap: clamp(28px, 7vw, 88px);
  align-items: center;
}
.promise-intro { align-self: end; padding-bottom: 18px; }
.promise-overline { display: flex; align-items: center; gap: 13px; margin-bottom: 12px; }
.promise-intro .eyebrow { margin: 0; text-align: left; }
.promise-commitment { margin: 0 0 0 auto; color: rgba(74, 48, 60, .62); font-family: ui-sans-serif, system-ui, sans-serif; font-size: clamp(.61rem, 2vw, .75rem); letter-spacing: .18em; white-space: nowrap; }
.promise-intro h2 { margin: 0; color: #443044; font-size: clamp(2rem, 5.4vw, 4.2rem); font-weight: 500; line-height: 1.15; letter-spacing: .035em; }
.promise-intro > p:last-child { margin: 17px 0 0; color: rgba(62, 42, 56, .7); font-size: clamp(.9rem, 2vw, 1.05rem); line-height: 1.8; }

.promise-card {
  position: relative;
  grid-row: 1 / span 2;
  grid-column: 2;
  display: flex;
  width: min(100%, 450px);
  min-height: 370px;
  overflow: hidden;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid rgba(106, 64, 79, .2);
  border-radius: 10px;
  background:
    radial-gradient(circle at 89% 14%, rgba(246, 210, 187, .72), transparent 18%),
    radial-gradient(circle at 4% 94%, rgba(237, 191, 190, .7), transparent 19%),
    linear-gradient(135deg, #fff6e8 0%, #f9e5d7 49%, #eec7c8 100%);
  box-shadow: 0 26px 55px rgba(73, 45, 67, .19), inset 0 0 38px rgba(255,255,255,.75);
  flex-direction: column;
  transform: none;
}
.promise-card::before { content: ""; position: absolute; inset: 9px; border: 1px solid rgba(126, 83, 91, .22); border-radius: 5px; pointer-events: none; }
.card-topline, .card-footer { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; color: rgba(113, 68, 78, .78); font-family: ui-sans-serif, system-ui, sans-serif; font-size: .62rem; letter-spacing: .13em; }
.card-seal { display: grid; width: 29px; aspect-ratio: 1; place-items: center; border: 1px solid rgba(122, 76, 87, .45); border-radius: 50%; color: #98606d; font-size: .8rem; }
.card-copy { position: relative; z-index: 1; flex: 1; padding: clamp(18px, 3vw, 28px) 0 22px; }
.card-overline { margin: 0 0 12px; color: #a36c73; font-family: ui-sans-serif, system-ui, sans-serif; font-size: .8rem; letter-spacing: .12em; }
.card-copy h3 { max-width: 300px; margin: 0; color: #563644; font-size: clamp(1.55rem, 5vw, 2.3rem); font-weight: 500; line-height: 1.3; letter-spacing: .035em; }
.card-description { margin: 17px 0 0; color: rgba(79, 49, 60, .79); font-size: .9rem; line-height: 1.7; }
.redeem-code { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(88px, .52fr) 1fr; grid-template-areas: "label code"; align-items: center; column-gap: 16px; margin: 0 0 16px; padding: 13px 16px 12px; border-top: 1px dashed rgba(133, 79, 91, .42); border-bottom: 1px dashed rgba(133, 79, 91, .42); background: linear-gradient(90deg, rgba(255, 250, 241, .68), rgba(252, 228, 218, .43)); }
.redeem-code-label { grid-area: label; color: rgba(113, 68, 78, .78); font-family: ui-sans-serif, system-ui, sans-serif; font-size: .78rem; letter-spacing: .18em; text-align: center; transform: translateX(-6px); white-space: nowrap; }
.redeem-code strong { grid-area: code; padding-left: 16px; border-left: 1px dashed rgba(133, 79, 91, .36); color: #784857; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: clamp(1.05rem, 3vw, 1.35rem); font-weight: 600; letter-spacing: .2em; text-align: center; user-select: none; white-space: nowrap; }
.scratch-canvas { grid-area: code; z-index: 2; width: 100%; height: 42px; border-radius: 3px; cursor: grab; touch-action: none; }
.scratch-canvas:active { cursor: grabbing; }
.scratch-canvas:focus-visible { outline: 2px solid #8a5666; outline-offset: 3px; }
.scratch-canvas.is-cleared { opacity: 0; pointer-events: none; transition: opacity 560ms ease; }
.scratch-hint { grid-area: code; z-index: 3; align-self: end; justify-self: center; margin-bottom: 3px; padding: 2px 6px; border-radius: 999px; color: rgba(109, 66, 79, .82); background: rgba(255, 248, 238, .74); font-family: ui-sans-serif, system-ui, sans-serif; font-size: .46rem; letter-spacing: .08em; pointer-events: none; }
.card-footer { padding-top: 13px; }
.card-validity { display: inline-flex; align-items: baseline; gap: 8px; }
.card-footer strong { color: #965f68; font-size: .68rem; font-weight: 600; }
.card-number { color: inherit; font-size: inherit; font-weight: inherit; text-decoration: none; }
.card-number a, a[x-apple-data-detectors] { color: inherit !important; pointer-events: none; text-decoration: none !important; }
.card-bloom { position: absolute; z-index: 0; color: rgba(191, 116, 125, .18); }
.bloom-a { right: -16px; bottom: 38px; font-size: 9rem; transform: rotate(19deg); }
.bloom-b { top: 65px; left: -12px; color: rgba(206, 151, 112, .14); font-size: 3rem; }

.redemption-panel { grid-column: 1; align-self: start; padding-top: 28px; }
.redemption-label { margin: 0 0 12px; color: rgba(69, 46, 58, .78); font-family: ui-sans-serif, system-ui, sans-serif; font-size: .78rem; letter-spacing: .12em; }
.redemption-ritual { position: relative; overflow: hidden; padding: 24px 22px 21px; border: 1px solid rgba(106, 64, 79, .2); border-radius: 8px; background: rgba(255, 249, 241, .38); box-shadow: 0 12px 26px rgba(94, 54, 73, .08), inset 0 1px rgba(255,255,255,.72); text-align: center; }
.redemption-ritual::before { position: absolute; top: -44px; left: calc(50% - 44px); width: 88px; aspect-ratio: 1; border-radius: 50%; background: rgba(238, 190, 183, .24); content: ""; }
.ritual-star, .ritual-kicker, .ritual-copy, .ritual-code { position: relative; z-index: 1; }
.ritual-star { display: block; color: #bd7a80; font-size: 1.25rem; line-height: 1; }
.ritual-kicker { margin: 9px 0 17px; color: rgba(120, 76, 89, .72); font-family: ui-sans-serif, system-ui, sans-serif; font-size: .57rem; letter-spacing: .2em; }
.ritual-copy { margin: 0; color: rgba(75, 48, 58, .76); font-size: .82rem; line-height: 1.65; }
.ritual-code { display: block; margin: 7px 0 8px; color: #794b59; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: clamp(1.15rem, 3vw, 1.45rem); font-weight: 600; letter-spacing: .2em; }
.redemption-note { margin: 10px 0 0; color: rgba(69, 46, 58, .58); font-family: ui-sans-serif, system-ui, sans-serif; font-size: .66rem; line-height: 1.6; text-align: center; }
.memory-link { display: inline-flex; color: inherit; font: inherit; font-size: .9rem; letter-spacing: .2em; text-decoration: none; }
.memory-link:hover { color: rgba(54, 35, 52, .84); }

.orbit-one, .orbit-two { position: absolute; z-index: 1; border: 1px solid rgba(255, 242, 223, .25); border-radius: 50%; pointer-events: none; }
.orbit-one { width: min(76vw, 800px); aspect-ratio: 1; top: -49%; right: -20%; }
.orbit-two { width: min(60vw, 540px); aspect-ratio: 1; bottom: -31%; left: -16%; border-color: rgba(255,245,230,.15); }

.page-dots { position: fixed; z-index: 10; top: 50%; right: max(13px, env(safe-area-inset-right)); display: grid; gap: 10px; transform: translateY(-50%); }
.page-dot { width: 7px; height: 7px; padding: 0; border: 1px solid rgba(255,255,255,.72); border-radius: 50%; background: transparent; cursor: pointer; transition: height 220ms ease, background 220ms ease, border-radius 220ms ease; }
.page-dot.is-active { height: 21px; border-radius: 8px; background: #fff1dd; }

button:focus-visible, a:focus-visible { outline: 2px solid #fff3cb; outline-offset: 4px; }
.promise-screen button:focus-visible, .promise-screen a:focus-visible { outline-color: #885164; }

@keyframes slow-drift { from { transform: scale(1.03) translate3d(-.6%, -.4%, 0); } to { transform: scale(1.08) translate3d(.6%, .7%, 0); } }
@keyframes card-shine { 0%, 50%, 100% { transform: translateX(-130%); } 67% { transform: translateX(140%); } }
@keyframes bounce-down { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

@media (max-width: 720px) {
  .promise-layout { display: flex; min-height: var(--screen-height); padding-top: max(70px, env(safe-area-inset-top)); padding-bottom: max(39px, env(safe-area-inset-bottom)); flex-direction: column; justify-content: center; }
  .promise-intro { width: 100%; padding: 0; }
  .promise-intro h2 br { display: none; }
  .promise-intro > p:last-child { margin-top: 7px; font-size: .83rem; }
  .promise-card { width: min(100%, 390px); min-height: 0; margin: clamp(15px, 2.7vh, 24px) auto clamp(14px, 2.5vh, 22px); padding: 20px 22px; transform: none; }
  .card-copy { padding: 10px 0 17px; }
  .card-copy h3 { font-size: clamp(1.36rem, 6vw, 1.7rem); }
  .card-description { margin-top: 10px; font-size: .78rem; }
  .redeem-code { column-gap: 12px; margin-bottom: 12px; padding: 10px 12px 9px; }
  .redeem-code-label { font-size: .69rem; }
  .redeem-code strong { font-size: .98rem; }
  .scratch-canvas { height: 36px; }
  .scratch-hint { margin-bottom: 2px; font-size: .42rem; }
  .card-footer { padding-top: 10px; }
  .redemption-panel { width: 100%; padding: 0; }
  .redemption-label { margin-bottom: 8px; }
  .redemption-ritual { padding: 18px 18px 16px; }
  .ritual-kicker { margin: 7px 0 12px; }
  .ritual-copy { font-size: .76rem; }
  .redemption-note { display: none; }
  .orbit-one { top: -25%; right: -41%; }
  .orbit-two { bottom: -20%; left: -35%; }
}

@media (max-width: 380px), (max-height: 690px) {
  .site-header { top: max(15px, env(safe-area-inset-top)); }
  .letter-layout { padding-top: max(58px, env(safe-area-inset-top)); }
  .letter-card { padding-top: 20px; padding-bottom: 18px; }
  .letter-card h1 { margin-bottom: 11px; font-size: 1.48rem; }
  .letter-copy { font-size: .82rem; line-height: 1.64; }
  .letter-copy p { margin-bottom: .35em; }
  .signature { margin-top: 12px; font-size: .82rem; }
  .eyebrow { margin-bottom: 7px; }
  .promise-entrance { margin-top: 12px; font-size: .76rem; }
  .promise-layout { padding-top: max(57px, env(safe-area-inset-top)); }
  .promise-intro h2 { font-size: 1.65rem; }
  .promise-intro > p:last-child { display: none; }
  .promise-card { margin: 10px auto; padding: 15px 18px; }
  .card-copy { padding: 15px 0 12px; }
  .card-overline { margin-bottom: 6px; }
  .card-description { margin-top: 7px; line-height: 1.5; }
  .redeem-code { grid-template-columns: minmax(76px, .52fr) 1fr; column-gap: 9px; margin-bottom: 8px; padding: 8px 9px 7px; }
  .redeem-code-label { font-size: .62rem; }
  .redeem-code strong { padding-left: 9px; font-size: .83rem; }
  .scratch-canvas { height: 32px; }
  .scratch-hint { margin-bottom: 1px; font-size: .38rem; }
  .redemption-ritual { padding: 14px 15px 13px; }
  .ritual-star { font-size: 1rem; }
  .ritual-kicker { margin: 5px 0 9px; font-size: .5rem; }
  .ritual-copy { font-size: .71rem; }
  .ritual-code { margin: 4px 0; font-size: 1.02rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-delay: 0ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-delay: 0ms !important; transition-duration: .01ms !important; }
}
