:root {
  --night: #060810;
  --night-2: #0b0e18;
  --cream: #efe8db;
  --muted: #9a968d;
  --gold: #dfc27c;
  --gold-light: #f3e1ad;
  --border: rgba(255,255,255,.09);
  --palette-1: #e2c27b;
  --palette-2: #d48678;
  --palette-3: #8f9f91;
  --accent-text: var(--gold);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: #020307; color: var(--cream); }
body { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", Arial, sans-serif; overflow: hidden; }
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
.phone {
  position: relative;
  width: min(100vw, 430px);
  height: 100svh;
  min-height: 620px;
  margin: 0 auto;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 62% 14%, rgba(109,104,129,.13), transparent 32%),
    radial-gradient(circle at 12% 76%, rgba(156,116,73,.07), transparent 30%),
    linear-gradient(180deg, #070910 0%, #090c15 46%, #05070c 100%);
}
@media (min-width: 600px) {
  body { display: grid; place-items: center; background: radial-gradient(circle at center, #171a22, #050609 65%); }
  .phone { height: min(94svh, 852px); border: 1px solid rgba(255,255,255,.08); border-radius: 34px; box-shadow: 0 32px 100px rgba(0,0,0,.56); }
}
.background-sky, #finalSky { position: absolute; inset: 0; width: 100%; height: 100%; }
.background-sky { z-index: -5; opacity: 0; transition: opacity 2.3s ease; }
.phone.ready .background-sky { opacity: 1; }
.aurora { position: absolute; z-index: -4; inset: -20%; background: radial-gradient(ellipse at 52% 34%, rgba(98,93,122,.11), transparent 44%); filter: blur(30px); animation: aurora-breathe 10s ease-in-out infinite; pointer-events: none; }
.grain { position: absolute; z-index: 40; inset: 0; opacity: .055; pointer-events: none; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E"); mix-blend-mode: soft-light; }
.reveal-stage { opacity: 0; transform: translateY(6px); transition: opacity 1.35s ease, transform 1.35s ease; }
.phone.reveal-1 .reveal-1, .phone.reveal-2 .reveal-2, .phone.reveal-3 .reveal-3, .phone.reveal-4 .reveal-4 { opacity: 1; transform: translateY(0); }
.micro { margin: 0; color: rgba(224,215,197,.48); font-family: Georgia, serif; font-size: 7px; letter-spacing: .24em; }
.topbar { position: relative; z-index: 12; height: 88px; padding: calc(17px + env(safe-area-inset-top)) 18px 10px 20px; display: flex; align-items: flex-start; justify-content: space-between; }
.brand { margin: 6px 0 0; font-family: Georgia, serif; font-size: 13px; letter-spacing: .13em; color: var(--accent-text); }
.brand sup { font-size: 8px; }
.top-actions { display: flex; gap: 7px; }
.round-button, .scene-back { width: 32px; height: 32px; padding: 0; border: 1px solid rgba(255,255,255,.09); border-radius: 50%; color: rgba(229,220,203,.72); background: rgba(255,255,255,.025); backdrop-filter: blur(12px); cursor: pointer; }
.round-button:active, .scene-back:active { transform: scale(.94); }
.achievement-button { position: relative; display: none; }
.phone.has-achievement .achievement-button { display: inline-grid; place-items: center; }
.achievement-button i { position: absolute; right: -2px; top: -4px; min-width: 14px; height: 14px; padding: 0 3px; display: grid; place-items: center; border-radius: 10px; font-style: normal; font-size: 7px; color: #16130e; background: var(--gold); }
.main-scene { position: absolute; z-index: 2; inset: 88px 0 0; display: grid; grid-template-rows: auto 1fr auto; transition: opacity .7s ease, transform .7s ease; }
.phone.scene-open .main-scene, .phone.scene-open .topbar { opacity: 0; pointer-events: none; }
.intro-copy { position: relative; z-index: 5; padding: 4px 25px 0; }
.intro-copy h1 { margin: 8px 0 9px; font-family: Georgia, "Songti SC", serif; font-size: clamp(25px, 7vw, 31px); line-height: 1.2; font-weight: 400; letter-spacing: .01em; color: var(--accent-text); }
.intro-copy > p:last-child { margin: 0; color: rgba(209,203,191,.58); font-size: 11px; line-height: 1.8; }
.constellation { position: relative; min-height: 360px; }
#starLayer { position: absolute; inset: 0; }
.star-node { position: absolute; width: 48px; height: 48px; margin: -24px 0 0 -24px; padding: 0; border: 0; background: transparent; cursor: pointer; opacity: 0; transform: scale(.3) rotate(-8deg); transition: opacity 1.2s ease, transform 1.25s cubic-bezier(.2,.8,.2,1), filter .5s ease; }
.star-node::before { content: ""; position: absolute; left: 50%; top: 50%; width: var(--size); height: var(--size); border-radius: 50%; transform: translate(-50%,-50%); background: rgba(227,213,173,.78); box-shadow: 0 0 6px rgba(255,242,203,.62), 0 0 20px rgba(220,191,116,.31); }
.star-node::after { content: ""; position: absolute; left: 50%; top: 50%; width: calc(var(--size) * 4.7); height: 1px; transform: translate(-50%,-50%) rotate(var(--ray-angle)); background: linear-gradient(90deg, transparent, rgba(255,242,201,.32), transparent); }
.star-node.visible { opacity: 1; transform: scale(1) rotate(0); }
.star-node.visible::before { animation: star-breathe var(--breath-duration) ease-in-out infinite; animation-delay: var(--breath-delay); }
.star-node.visible::after { animation: ray-breathe calc(var(--breath-duration) * 1.17) ease-in-out infinite; animation-delay: var(--breath-delay); }
.star-node.available::before { background: #f6e7bb; box-shadow: 0 0 8px rgba(255,247,218,.92), 0 0 30px rgba(222,188,104,.68); }
.star-node.lit::before { background: #fff7d8; box-shadow: 0 0 10px #fff1bf, 0 0 36px rgba(222,188,104,.72), 0 0 68px rgba(222,188,104,.22); }
.star-node.concealed { pointer-events: none; }
.star-index { position: absolute; left: calc(50% + 11px); top: calc(50% + 7px); color: rgba(225,216,196,.62); font-family: Georgia, serif; font-size: 7px; letter-spacing: .09em; white-space: nowrap; opacity: 0; transition: opacity .7s ease; pointer-events: none; }
.star-node.visible .star-index { opacity: .78; }
.star-node.available .star-index { color: rgba(244,229,190,.9); opacity: 1; }
.star-node[data-side="left"] .star-index { left: auto; right: calc(50% + 11px); text-align: right; }
.star-ripple { position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; border: 1px solid rgba(255,236,167,.58); border-radius: 50%; transform: translate(-50%,-50%); animation: ripple 1.6s ease-out forwards; pointer-events: none; }
.gesture-hint, .ambient-hint { position: absolute; left: 50%; transform: translateX(-50%); margin: 0; white-space: nowrap; font-family: Georgia, serif; font-size: 7px; letter-spacing: .22em; transition: opacity .9s ease; }
.gesture-hint { bottom: 12%; color: rgba(230,201,121,.58); }
.ambient-hint { bottom: 5%; color: rgba(206,201,190,.25); letter-spacing: .14em; }
.phone.is-started .gesture-hint, .phone.sound-awake .ambient-hint { opacity: 0; }
.sky-whisper { position: absolute; left: 50%; top: 8%; width: 76%; transform: translate(-50%,-6px); color: transparent; font-family: Georgia, "Songti SC", serif; font-size: 11px; line-height: 1.7; text-align: center; pointer-events: none; transition: color .8s ease, transform .8s ease; }
.sky-whisper.show { color: rgba(236,228,207,.72); transform: translate(-50%,0); }
.shooting-star { position: absolute; z-index: 1; width: var(--meteor-length); height: 1px; border-radius: 99px; background: linear-gradient(90deg, transparent 0%, rgba(255,245,205,.14) 42%, rgba(255,247,218,.94) 100%); box-shadow: 0 0 5px rgba(255,235,166,.48); transform: rotate(var(--meteor-angle)); transform-origin: right center; animation: meteor-flight var(--meteor-duration) linear forwards; pointer-events: none; }
.shooting-star::after { content: ""; position: absolute; right: -2px; top: 50%; width: 3px; height: 3px; border-radius: 50%; background: #fff9df; box-shadow: 0 0 8px #fff4c7; transform: translateY(-50%); }
.progress-panel { position: relative; z-index: 8; padding: 13px 24px calc(17px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, transparent, rgba(5,7,12,.91) 35%); }
.progress-meta { display: flex; justify-content: space-between; color: #817d75; font-size: 8px; letter-spacing: .16em; }
.progress-meta strong { color: var(--gold-light); font-weight: 600; }
.progress-dots { display: grid; grid-template-columns: repeat(9,1fr); gap: 5px; margin: 10px 0 9px; }
.progress-dots span { height: 2px; border-radius: 99px; background: rgba(255,255,255,.08); transition: .5s ease; }
.progress-dots span.on { background: var(--gold); box-shadow: 0 0 9px rgba(230,201,121,.48); }
.progress-note { margin: 0; color: #74746f; font-family: Georgia, serif; font-size: 10px; }
.memory-sheet, .achievement-sheet { position: absolute; inset: auto 0 0; width: 100%; max-width: 430px; max-height: 84%; margin: 0 auto; padding: 0; border: 1px solid rgba(255,255,255,.08); border-bottom: 0; border-radius: 24px 24px 0 0; color: var(--cream); background: rgba(9,12,19,.975); box-shadow: 0 -26px 80px rgba(0,0,0,.55); backdrop-filter: blur(25px); overflow: hidden; }
.memory-sheet::backdrop, .achievement-sheet::backdrop { background: rgba(2,4,8,.61); backdrop-filter: blur(4px); }
.memory-sheet[open], .achievement-sheet[open] { animation: sheet-in .48s cubic-bezier(.2,.8,.2,1); }
.sheet-handle { width: 42px; height: 4px; margin: 10px auto 0; border-radius: 99px; background: rgba(255,255,255,.15); }
.close-button { position: absolute; z-index: 5; right: 14px; top: 15px; width: 34px; height: 34px; border: 0; background: none; color: #aaa59b; font-size: 27px; cursor: pointer; }
.memory-content { padding: 28px 22px calc(28px + env(safe-area-inset-bottom)); overflow-y: auto; max-height: 78svh; }
.memory-index { margin: 0 0 9px; color: var(--accent-text); font-size: 9px; letter-spacing: .2em; }
.memory-content h3, .achievement-content h2 { margin: 0; font-family: Georgia, "Songti SC", serif; font-size: 25px; font-weight: 400; line-height: 1.3; color: var(--accent-text); }
.memory-content p { color: #aaa59b; font-size: 13px; line-height: 1.85; }
.memory-content blockquote { margin: 21px 0 14px; padding-left: 15px; border-left: 1px solid rgba(230,201,121,.45); color: #ece4d4; font-family: Georgia, "Songti SC", serif; font-size: 16px; line-height: 1.85; }
.memory-media { width: calc(100% + 44px); margin: -28px -22px 22px; max-height: 47svh; object-fit: cover; display: block; }
.memory-media.contain { padding: 14px; object-fit: contain; background: #06100b; }
.memory-card { margin: 18px 0; padding: 18px; border: 1px solid var(--border); border-radius: 18px; background: rgba(255,255,255,.025); }
.action-button { width: 100%; min-height: 44px; margin-top: 15px; padding: 11px 16px; border: 1px solid rgba(230,201,121,.28); border-radius: 14px; color: #e9dfca; background: rgba(230,201,121,.07); letter-spacing: .07em; cursor: pointer; }
.action-button:disabled { opacity: .35; }
.secondary-button { border-color: rgba(255,255,255,.11); color: #99958c; background: rgba(255,255,255,.02); }
.small-note { color: #77746d !important; font-size: 10px !important; line-height: 1.65 !important; }
.keyword-grid { display: grid; gap: 10px; margin-top: 19px; }
.keyword-grid input, .message-box input { width: 100%; border: 1px solid rgba(255,255,255,.11); border-radius: 13px; outline: none; color: #eee5d5; background: rgba(255,255,255,.035); }
.keyword-grid input { height: 48px; padding: 0 14px; text-align: center; font-family: Georgia, "Songti SC", serif; font-size: 16px; }
.palette-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin: 20px 0 6px; }
.palette-swatch { position: relative; aspect-ratio: 1; border: 1px solid rgba(255,255,255,.09); border-radius: 15px; background: var(--swatch); box-shadow: inset 0 0 0 2px rgba(255,255,255,.035); cursor: pointer; }
.palette-swatch span { position: absolute; inset: auto 5px 6px; color: rgba(255,255,255,.78); font-size: 7px; letter-spacing: .06em; text-shadow: 0 1px 7px rgba(0,0,0,.45); }
.palette-swatch.selected { outline: 2px solid rgba(255,242,203,.8); outline-offset: 2px; transform: translateY(-2px); }
.sunset-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.sunset-card { position: relative; min-height: 210px; overflow: hidden; border: 1px solid var(--border); border-radius: 17px; background: rgba(255,255,255,.025); }
.sunset-card img { width: 100%; height: 175px; display: block; object-fit: cover; }
.sunset-card figcaption { padding: 9px; color: #a9a397; font-family: Georgia, serif; font-size: 9px; text-align: center; }
.sunset-upload { height: 175px; display: grid; place-items: center; padding: 12px; color: #8f8b83; text-align: center; font-size: 10px; background: linear-gradient(145deg, rgba(110,97,119,.1), rgba(218,170,111,.06)); cursor: pointer; }
.sunset-upload input { display: none; }
.compare-result { min-height: 24px; margin: 10px 0 0 !important; color: var(--gold-light) !important; text-align: center; font-family: Georgia, "Songti SC", serif; }
.timeline-mark { display: flex; justify-content: space-between; align-items: center; margin: 20px 0; color: #817c72; font-family: Georgia, serif; font-size: 10px; }
.timeline-mark::before { content: ""; order: 2; flex: 1; height: 1px; margin: 0 10px; background: linear-gradient(90deg, rgba(230,201,121,.15), rgba(230,201,121,.55), rgba(230,201,121,.15)); }
.timeline-mark span:last-child { order: 3; }
.math-board { display: grid; gap: 13px; margin-top: 18px; padding: 20px 16px; border: 1px solid var(--border); border-radius: 18px; background: rgba(255,255,255,.025); text-align: center; }
.math-board .birthday-code { color: var(--gold); font-family: Georgia, serif; font-size: 13px; letter-spacing: .12em; }
.equation { color: #e8e0d2; font-family: Georgia, serif; font-size: 20px; }
.equation input { width: 46px; height: 38px; border: 0; border-bottom: 1px solid rgba(230,201,121,.55); outline: none; color: var(--gold-light); background: transparent; text-align: center; font-family: inherit; font-size: 20px; }
.math-result { min-height: 24px; margin: 2px 0 0 !important; color: var(--gold-light) !important; text-align: center; }
.shake { animation: shake .38s ease; }
.lyric-quote { margin-top: 15px; color: #e9e0cf; font-family: Georgia, "Songti SC", serif; font-size: 17px; line-height: 1.8; text-align: center; }
.achievement-content { padding: 28px 20px calc(25px + env(safe-area-inset-bottom)); }
.achievement-intro, .achievement-detail { color: #8c887f; font-size: 11px; line-height: 1.7; }
.achievement-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin: 20px 0 16px; }
.achievement-item { min-height: 88px; border: 1px solid rgba(255,255,255,.08); border-radius: 16px; color: rgba(255,255,255,.18); background: rgba(255,255,255,.018); cursor: default; }
.achievement-item span { display: block; margin-bottom: 7px; font-family: Georgia, serif; font-size: 22px; }
.achievement-item small { font-size: 7px; letter-spacing: .08em; }
.achievement-item.unlocked { color: var(--gold-light); border-color: rgba(230,201,121,.28); background: rgba(230,201,121,.055); cursor: pointer; box-shadow: 0 0 20px rgba(230,201,121,.06); }
.letter-journey, .letter-view, .finale { position: absolute; inset: 0; z-index: 22; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .9s ease, visibility .9s ease; }
.letter-journey.is-visible, .letter-view.is-visible, .finale.is-visible { opacity: 1; visibility: visible; pointer-events: auto; }
.scene-back { position: absolute; z-index: 30; right: 18px; top: calc(18px + env(safe-area-inset-top)); font-size: 16px; }
.letter-journey { overflow: hidden; background: radial-gradient(circle at 72% 16%, rgba(230,201,121,.1), transparent 22%), linear-gradient(180deg,#090d16 0%,#0a0d14 57%,#08090d 100%); }
.journey-sky { position: absolute; inset: 0 0 30%; opacity: .9; background-image: radial-gradient(circle,rgba(242,235,216,.45) 0 1px,transparent 1.2px); background-size: 53px 47px; mask-image: linear-gradient(to bottom,black,transparent); }
.journey-ground { position: absolute; left: -10%; right: -10%; bottom: -7%; height: 34%; border-radius: 50% 50% 0 0; background: linear-gradient(180deg,rgba(31,33,35,.9),#090a0d 56%); box-shadow: 0 -12px 60px rgba(0,0,0,.28); }
.journey-caption { position: absolute; left: 50%; top: 18%; transform: translateX(-50%); width: 82%; margin: 0; color: rgba(213,205,189,.67); font-family: Georgia, serif; font-size: 11px; letter-spacing: .06em; line-height: 1.6; text-align: center; transition: opacity .7s ease; }
.snail { position: absolute; z-index: 3; left: -150px; bottom: 17.5%; width: 132px; height: 88px; filter: drop-shadow(0 12px 18px rgba(0,0,0,.24)); }
.letter-journey.playing .snail { animation: snail-crawl 10.4s cubic-bezier(.17,.7,.24,1) forwards; }
.snail-art { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.snail-body-group { transform-origin: 68% 78%; animation: snail-breathe 1.7s ease-in-out infinite; }
.shell-group { transform-box: fill-box; transform-origin: 50% 55%; animation: shell-sway 2.4s ease-in-out infinite; }
.snail-neck { transform-box: fill-box; transform-origin: bottom; animation: feeler-sway 2.2s ease-in-out infinite; }
.snail-neck.second { animation-delay: -.8s; }
.snail-foot { transform-box: fill-box; transform-origin: center; animation: foot-wave 1.15s ease-in-out infinite; }
.snail-trail { position: absolute; left: 7px; bottom: 5px; width: 2px; height: 2px; border-radius: 99px; background: rgba(220,216,199,.22); opacity: 0; transform-origin: left center; }
.letter-journey.playing .snail-trail { animation: slime-trail 10.4s linear forwards; }
.carried-letter, .bird-letter { position: absolute; z-index: 7; display: grid; place-items: center; color: rgba(107,77,33,.8); background: linear-gradient(145deg,#e3d3ae,#c5af83); border: 1px solid rgba(90,66,37,.42); box-shadow: 0 8px 15px rgba(0,0,0,.24); }
.carried-letter { left: 31px; top: 2px; width: 41px; height: 27px; transform: rotate(-5deg); transition: opacity .28s ease, transform .34s ease; }
.bird-letter { left: -6px; top: 46px; width: 28px; height: 18px; opacity: 0; transform: rotate(8deg); }
.letter-journey.taken .carried-letter { opacity: 0; transform: translate(14px,-15px) rotate(14deg) scale(.72); }
.letter-journey.taken .bird-letter { opacity: 1; }
.pearl-bird { position: absolute; z-index: 5; right: -155px; top: 41%; width: 126px; height: 86px; filter: drop-shadow(0 13px 19px rgba(0,0,0,.24)); }
.bird-art { width: 100%; height: 100%; overflow: visible; }
.letter-journey.bird-in .pearl-bird { animation: bird-approach 4.7s cubic-bezier(.2,.66,.22,1) forwards; }
.letter-journey.bird-out .pearl-bird { animation: bird-depart 4.1s cubic-bezier(.2,.68,.2,1) forwards; }
.bird-wing-top { transform-box: fill-box; transform-origin: 23% 75%; animation: wing-top .58s ease-in-out infinite; }
.bird-wing-low { transform-box: fill-box; transform-origin: 25% 25%; animation: wing-low .58s ease-in-out infinite; }
.bird-tail-group { transform-box: fill-box; transform-origin: left center; animation: tail-sway 1.15s ease-in-out infinite; }
.delivered-letter { position: absolute; z-index: 7; left: 50%; top: 53%; width: 168px; height: 106px; border: 1px solid rgba(130,99,54,.5); border-radius: 3px; color: #5b4932; background: linear-gradient(150deg,#e5d7b7,#cbb88f); box-shadow: 0 24px 55px rgba(0,0,0,.42); opacity: 0; transform: translate(-50%,-42%) rotate(-4deg) scale(.75); pointer-events: none; transition: opacity .8s ease, transform .9s cubic-bezier(.2,.8,.2,1); }
.delivered-letter::before, .delivered-letter::after { content: ""; position: absolute; inset: 0; clip-path: polygon(0 0,50% 55%,100% 0); background: rgba(255,248,227,.17); }
.delivered-letter::after { clip-path: polygon(0 100%,50% 48%,100% 100%); background: rgba(76,52,25,.08); }
.delivered-letter.ready { opacity: 1; transform: translate(-50%,-50%) rotate(0) scale(1); pointer-events: auto; }
.wax-seal { position: absolute; z-index: 3; left: 50%; top: 52%; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: #dec98d; background: #6a2630; box-shadow: inset 0 0 0 2px rgba(255,255,255,.08), 0 5px 12px rgba(0,0,0,.24); transform: translate(-50%,-50%); font-family: Georgia, serif; font-size: 11px; }
.letter-prompt { position: absolute; z-index: 3; left: 50%; bottom: -28px; transform: translateX(-50%); color: rgba(232,219,187,.75); font-family: Georgia, serif; font-size: 8px; letter-spacing: .16em; white-space: nowrap; }
.letter-view { overflow: hidden; padding: calc(65px + env(safe-area-inset-top)) 17px calc(18px + env(safe-area-inset-bottom)); background: radial-gradient(circle at 50% 8%,rgba(230,201,121,.09),transparent 25%),#090b11; }
.letter-paper { height: 100%; padding: 34px 27px; overflow-y: auto; color: #433a31; background: linear-gradient(90deg,rgba(102,73,40,.03) 1px,transparent 1px),linear-gradient(180deg,#e9dec7,#d8c9ad); background-size: 24px 100%,100% 100%; border-radius: 5px; box-shadow: 0 24px 80px rgba(0,0,0,.45); }
.letter-kicker { margin: 0 0 10px; color: #8e7350; font-family: Georgia, serif; font-size: 8px; letter-spacing: .2em; }
.letter-paper h2 { margin: 0 0 28px; font-family: Georgia,"Songti SC",serif; font-size: 25px; font-weight: 400; }
.letter-body p { font-family: Georgia,"Songti SC",serif; font-size: 14px; line-height: 2.05; }
.letter-signature { margin-top: 32px; text-align: right; }
.finale { overflow: hidden; background: radial-gradient(circle at 45% 30%,rgba(85,90,125,.14),transparent 34%),linear-gradient(180deg,#070a14,#05070e); }
#finalSky { z-index: 1; touch-action: none; }
.finale-copy { position: absolute; z-index: 4; left: 50%; top: 33%; width: 84%; transform: translate(-50%,-50%); text-align: center; transition: opacity 1.2s ease, transform 1.2s ease; pointer-events: none; }
.finale-copy h2 { margin: 10px 0 11px; font-family: Georgia,"Songti SC",serif; font-size: 38px; font-weight: 400; letter-spacing: .08em; color: var(--accent-text); }
.finale-copy > p:last-child { margin: 0; color: rgba(226,219,205,.65); font-family: Georgia,serif; font-size: 12px; }
.finale.cake-mode .finale-copy { opacity: 0; transform: translate(-50%,-54%); }
.firework-hint { position: absolute; z-index: 5; left: 50%; bottom: calc(78px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: 90%; margin: 0; color: rgba(230,201,121,.48); font-family: Georgia,serif; font-size: 7px; letter-spacing: .15em; text-align: center; transition: opacity .8s ease; pointer-events: none; }
.firework-hint.fade { opacity: 0; }
.cake-scene { position: absolute; z-index: 7; inset: 17% 0 auto; height: 430px; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 1.1s ease, visibility 1.1s ease; }
.cake-scene.visible { opacity: 1; visibility: visible; pointer-events: auto; }
.cake { position: absolute; left: 50%; top: 125px; width: 220px; height: 235px; padding: 0; border: 0; background: none; transform: translateX(-50%); cursor: pointer; }
.cake span { position: absolute; left: 50%; transform: translateX(-50%); }
.cake-bottom { bottom: 12px; width: 198px; height: 76px; border-radius: 12px 12px 28px 28px; background: linear-gradient(180deg,var(--palette-3),color-mix(in srgb,var(--palette-3) 62%,#26242a)); box-shadow: 0 24px 40px rgba(0,0,0,.38); }
.cake-middle { bottom: 71px; width: 170px; height: 63px; border-radius: 11px 11px 22px 22px; background: linear-gradient(180deg,var(--palette-2),color-mix(in srgb,var(--palette-2) 68%,#29262a)); }
.cake-top { bottom: 123px; width: 142px; height: 55px; border-radius: 10px 10px 20px 20px; background: linear-gradient(180deg,var(--palette-1),color-mix(in srgb,var(--palette-1) 72%,#302a24)); }
.cake-top::after, .cake-middle::after { content: ""; position: absolute; left: 8%; right: 8%; top: 10px; height: 8px; border-radius: 99px; background: rgba(255,248,229,.28); }
.cake-candles { bottom: 175px; width: 130px; height: 62px; display: flex; justify-content: center; gap: 23px; align-items: flex-end; }
.cake-candles i { position: relative; width: 7px; height: 37px; border-radius: 4px 4px 0 0; background: repeating-linear-gradient(135deg,#eee3ca 0 5px,#b88775 5px 9px); }
.cake-candles i::before { content: ""; position: absolute; left: 50%; top: -18px; width: 10px; height: 17px; border-radius: 60% 40% 55% 45%; background: radial-gradient(circle at 50% 70%,#fff7bd 0 22%,#efa95a 45%,#c96a35 72%,transparent 75%); filter: drop-shadow(0 0 8px rgba(255,194,96,.85)); opacity: 0; transform: translateX(-50%) scale(.5); transition: opacity .4s ease, transform .4s ease; animation: flame 1.1s ease-in-out infinite; }
.cake.candles-on .cake-candles i::before { opacity: 1; transform: translateX(-50%) scale(1); }
.cake small { position: absolute; left: 50%; bottom: -15px; transform: translateX(-50%); color: rgba(232,219,187,.54); font-family: Georgia,serif; font-size: 7px; letter-spacing: .14em; white-space: nowrap; }
.blow-button { position: absolute; left: 50%; top: 362px; width: 175px; height: 56px; border: 1px solid rgba(255,255,255,.12); border-radius: 28px; color: #d9d0c0; background: rgba(255,255,255,.035); transform: translateX(-50%) scale(.9); opacity: 0; pointer-events: none; transition: opacity .5s ease, transform .5s ease; overflow: hidden; }
.cake-scene.candles-lit .blow-button { opacity: 1; transform: translateX(-50%) scale(1); pointer-events: auto; }
.blow-button b { position: relative; z-index: 2; font-family: Georgia,serif; font-size: 7px; letter-spacing: .12em; line-height: 1.45; font-weight: 400; }
.hold-ring { position: absolute; left: 0; top: 0; width: 0; height: 100%; background: rgba(230,201,121,.13); transition: width .1s linear; }
.birthday-bunting { position: absolute; left: 50%; top: 34px; width: 90%; transform: translateX(-50%) scale(.8); color: transparent; font-family: Georgia,serif; font-size: 25px; letter-spacing: .11em; text-align: center; opacity: 0; transition: opacity 1s ease, transform 1s ease, color 1s ease; text-shadow: 0 0 18px rgba(255,225,147,.4); }
.birthday-bunting::after { content: "◣  ◢  ◣  ◢  ◣  ◢  ◣"; display: block; margin-top: 10px; color: var(--palette-2); font-size: 12px; letter-spacing: .4em; }
.cake-scene.celebrated .birthday-bunting { color: var(--gold-light); opacity: 1; transform: translateX(-50%) scale(1); }
.launcher-row { position: absolute; z-index: 9; inset: auto 0 19%; height: 160px; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .9s ease, visibility .9s ease; }
.launcher-row.visible { opacity: 1; visibility: visible; pointer-events: auto; }
.launcher { position: absolute; bottom: -15px; width: 25px; height: 142px; border: 1px solid rgba(255,255,255,.13); border-radius: 9px 9px 4px 4px; background: linear-gradient(90deg,#28252b,#73634a 45%,#27252a); transform-origin: bottom; cursor: pointer; }
.launcher::before { content: ""; position: absolute; left: 4px; right: 4px; top: 9px; height: 7px; border-radius: 50%; background: #111319; box-shadow: inset 0 0 0 2px rgba(230,201,121,.25); }
.launcher i { position: absolute; left: 50%; top: -4px; width: 3px; height: 3px; border-radius: 50%; background: #fff2bd; box-shadow: 0 0 10px #e9bd68; opacity: .4; }
.launcher-a { left: 6%; transform: rotate(-19deg); }
.launcher-b { left: 20%; transform: rotate(-8deg); }
.launcher-c { right: 8%; transform: rotate(18deg); }
.launcher.selected { outline: 1px solid var(--gold); box-shadow: 0 0 26px rgba(230,201,121,.2); }
.message-box { position: absolute; z-index: 11; left: 18px; right: 18px; bottom: calc(15px + env(safe-area-inset-bottom)); padding: 10px 12px; border: 1px solid rgba(255,255,255,.08); border-radius: 16px; background: rgba(7,9,15,.72); backdrop-filter: blur(12px); }
.message-box label { display: block; margin-bottom: 7px; color: rgba(224,215,197,.36); font-family: Georgia,serif; font-size: 6px; letter-spacing: .14em; }
.message-box > div { display: flex; gap: 7px; }
.message-box input { height: 37px; padding: 0 11px; font-size: 11px; }
.message-box button { width: 74px; border: 1px solid rgba(230,201,121,.23); border-radius: 11px; color: var(--gold-light); background: rgba(230,201,121,.07); font-family: Georgia,serif; font-size: 7px; letter-spacing: .1em; }
.message-box p { margin: 7px 0 0; color: rgba(202,197,187,.32); font-size: 8px; }
.toast { position: absolute; z-index: 50; left: 50%; bottom: calc(82px + env(safe-area-inset-bottom)); max-width: 82%; padding: 10px 15px; border: 1px solid rgba(255,255,255,.08); border-radius: 16px; color: #dfd7c8; background: rgba(8,10,16,.92); backdrop-filter: blur(14px); font-size: 11px; line-height: 1.55; text-align: center; opacity: 0; transform: translate(-50%,12px); pointer-events: none; transition: opacity .4s ease, transform .4s ease; }
.toast.show { opacity: 1; transform: translate(-50%,0); }
@keyframes aurora-breathe { 0%,100%{transform:scale(1);opacity:.7}50%{transform:scale(1.1) translateY(-2%);opacity:1} }
@keyframes star-breathe { 0%,100%{transform:translate(-50%,-50%) scale(.86);opacity:.65}50%{transform:translate(-50%,-50%) scale(1.12);opacity:1} }
@keyframes ray-breathe { 0%,100%{opacity:.18}50%{opacity:.62} }
@keyframes ripple { to{width:78px;height:78px;opacity:0} }
@keyframes meteor-flight { from{translate:0 0;opacity:0}10%{opacity:1}85%{opacity:.85}to{translate:var(--meteor-x) var(--meteor-y);opacity:0} }
@keyframes sheet-in { from{transform:translateY(18%);opacity:0}to{transform:translateY(0);opacity:1} }
@keyframes shake { 0%,100%{transform:translateX(0)}25%{transform:translateX(-6px)}50%{transform:translateX(5px)}75%{transform:translateX(-3px)} }
@keyframes snail-crawl { 0%{left:-150px;transform:translateY(0)}58%{left:31%;transform:translateY(-1px)}100%{left:37%;transform:translateY(0)} }
@keyframes slime-trail { 0%,8%{opacity:0;width:2px}14%{opacity:.55}100%{opacity:.16;width:190px} }
@keyframes snail-breathe { 0%,100%{transform:translateY(0) scaleX(1)}50%{transform:translateY(1.5px) scaleX(1.025)} }
@keyframes shell-sway { 0%,100%{transform:rotate(-1deg) translateY(0)}50%{transform:rotate(1.5deg) translateY(-1px)} }
@keyframes feeler-sway { 0%,100%{transform:rotate(-2deg)}50%{transform:rotate(5deg)} }
@keyframes foot-wave { 0%,100%{transform:scaleX(1)}50%{transform:scaleX(.96) translateX(2px)} }
@keyframes bird-approach { 0%{right:-155px;top:34%;transform:rotate(-7deg) scale(.88)}68%{right:25%;top:44%;transform:rotate(-2deg) scale(1)}100%{right:35%;top:55%;transform:rotate(9deg) scale(.86)} }
@keyframes bird-depart { 0%{right:35%;top:55%;transform:rotate(9deg) scale(.86)}24%{right:36%;top:48%;transform:rotate(-4deg) scale(.95)}100%{right:103%;top:21%;transform:rotate(-13deg) scale(.82)} }
@keyframes wing-top { 0%,100%{transform:rotate(8deg) scaleY(.75)}50%{transform:rotate(-18deg) scaleY(1.08)} }
@keyframes wing-low { 0%,100%{transform:rotate(-8deg) scaleY(.8)}50%{transform:rotate(17deg) scaleY(1.04)} }
@keyframes tail-sway { 0%,100%{transform:rotate(-2deg)}50%{transform:rotate(5deg)} }
@keyframes flame { 0%,100%{rotate:-3deg;scale:1 .96}50%{rotate:4deg;scale:.88 1.08} }
@media (max-height: 700px) {
  .topbar { height: 74px; padding-top: calc(12px + env(safe-area-inset-top)); }
  .main-scene { inset: 74px 0 0; }
  .intro-copy h1 { font-size: 24px; }
  .intro-copy > p:last-child { display: none; }
  .constellation { min-height: 300px; }
  .cake-scene { top: 10%; transform: scale(.88); transform-origin: top center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}


/* V6 detail refinements */
.phone.scene-open .main-scene { opacity: 0; pointer-events: none; }
.phone.scene-open .topbar { opacity: 0; pointer-events: none; }
.phone.scene-open.finale-open .topbar { z-index: 70; opacity: 1; pointer-events: auto; }
.phone.finale-open .brand-wrap { opacity: 0; pointer-events: none; }
.phone.finale-open .top-actions { margin-left: auto; }
.phone.finale-open .round-button { background: rgba(7,9,16,.56); border-color: rgba(255,255,255,.14); box-shadow: 0 8px 28px rgba(0,0,0,.22); }

.memory-content blockquote span { display:block; }
.memory-content blockquote span + span { margin-top: 13px; color: var(--gold-light); }
.sunset-fusion { margin-top: 16px; overflow: hidden; border: 1px solid rgba(230,201,121,.19); border-radius: 18px; background: rgba(255,255,255,.025); box-shadow: 0 18px 38px rgba(0,0,0,.25); }
.sunset-fusion canvas { width: 100%; aspect-ratio: 4 / 5; display: block; object-fit: cover; }
.sunset-fusion p { margin: 0 !important; padding: 10px; color: rgba(233,219,186,.72) !important; font-family: Georgia,serif; font-size: 8px !important; letter-spacing: .16em; text-align:center; }

.achievement-item { min-height: 100px; padding: 10px 7px; }
.achievement-svg { width: 44px; height: 44px; display: grid !important; place-items: center; margin: 0 auto 7px !important; }
.achievement-svg svg { width: 100%; height: 100%; overflow: visible; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.achievement-item.locked { color: rgba(190,193,201,.22); background: linear-gradient(145deg,rgba(255,255,255,.025),rgba(255,255,255,.008)); }
.achievement-item.locked .achievement-svg { filter: grayscale(1); opacity: .72; }
.achievement-item.unlocked .achievement-svg { color: var(--gold-light); filter: drop-shadow(0 0 9px rgba(230,201,121,.26)); }
.achievement-unlock { position:absolute; inset:0; z-index:95; display:grid; place-items:center; background:rgba(3,5,10,.42); backdrop-filter:blur(6px); opacity:0; visibility:hidden; pointer-events:none; transition:opacity .36s ease,visibility .36s ease; }
.achievement-unlock.show { opacity:1; visibility:visible; }
.achievement-unlock-card { width: min(78%,310px); padding: 25px 20px 23px; border:1px solid rgba(230,201,121,.24); border-radius:24px; text-align:center; background:linear-gradient(155deg,rgba(19,22,31,.97),rgba(7,9,15,.98)); box-shadow:0 28px 85px rgba(0,0,0,.55); transform:scale(.78) translateY(12px); animation:achievement-card 3.15s cubic-bezier(.2,.8,.2,1) both; }
.achievement-unlock-card > p { margin:0 0 13px; color:rgba(227,216,194,.42); font-family:Georgia,serif; font-size:7px; letter-spacing:.2em; }
.achievement-unlock-card h3 { margin:10px 0 0; font-family:Georgia,"Songti SC",serif; font-size:20px; font-weight:400; color:var(--accent-text); }
.achievement-unlock-icon { width:82px; height:82px; margin:auto; color:rgba(177,182,193,.26); animation:achievement-light 2.1s .35s ease forwards; }
.achievement-unlock-icon .achievement-svg { width:100%; height:100%; }
.achievement-unlock-icon svg { width:100%; height:100%; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }

.letter-journey { background: radial-gradient(circle at 76% 15%,rgba(230,201,121,.14),transparent 18%),radial-gradient(ellipse at 30% 67%,rgba(93,112,103,.08),transparent 31%),linear-gradient(180deg,#090d18 0%,#0b0e16 57%,#07090d 100%); }
.journey-sky::before,.journey-sky::after { content:""; position:absolute; width:150px; height:35px; border-radius:50%; filter:blur(12px); background:rgba(205,205,214,.035); animation:journey-cloud 14s linear infinite; }
.journey-sky::before { left:-120px; top:29%; }
.journey-sky::after { left:-180px; top:49%; animation-duration:19s; animation-delay:-7s; }
.snail { filter:drop-shadow(0 14px 20px rgba(0,0,0,.3)) drop-shadow(0 0 9px rgba(222,196,133,.05)); }
.letter-journey.playing .snail { animation:snail-crawl-v6 11.7s cubic-bezier(.17,.7,.24,1) forwards; }
.letter-journey.playing .snail-trail { animation:slime-trail 11.7s linear forwards; }
.carried-letter { left:32px; top:-4px; width:43px; height:28px; transform:rotate(-4deg); box-shadow:0 9px 18px rgba(0,0,0,.28),0 0 0 1px rgba(255,245,214,.11) inset; }
.carried-letter::after,.bird-letter::after { content:""; position:absolute; inset:0; clip-path:polygon(0 0,50% 55%,100% 0); background:rgba(255,250,230,.18); }
.pearl-bird { filter:drop-shadow(0 14px 22px rgba(0,0,0,.3)) drop-shadow(0 0 10px rgba(237,231,212,.06)); }
.letter-journey.bird-in .pearl-bird { animation:bird-approach-v6 5.2s cubic-bezier(.18,.66,.2,1) forwards; }
.letter-journey.bird-out .pearl-bird { animation:bird-depart-v6 4.5s cubic-bezier(.18,.68,.18,1) forwards; }
.bird-wing-top { animation-duration:.48s; }
.bird-wing-low { animation-duration:.48s; }
.letter-journey.taken .bird-letter { animation:letter-caught .55s cubic-bezier(.2,.8,.2,1) both; }
.delivered-letter.ready { animation:letter-arrive 1.1s cubic-bezier(.2,.8,.2,1) both; }

.birthday-bunting { top:20px; font-size:27px; }
.birthday-bunting::after { content:none; }
.birthday-bunting > span { display:block; color:inherit; }
.fairy-lights { position:relative; width:86%; height:42px; margin:10px auto 0; border-top:1px solid rgba(214,219,237,.28); border-radius:50% 50% 0 0; }
.fairy-lights i { position:absolute; top:-1px; width:5px; height:8px; border-radius:3px 3px 5px 5px; background:var(--palette-2); box-shadow:0 0 10px currentColor; transform-origin:top; animation:fairy-glow 2.4s ease-in-out infinite; }
.fairy-lights i::before { content:""; position:absolute; left:50%; top:-3px; width:1px; height:4px; background:rgba(214,219,237,.35); }
.fairy-lights i:nth-child(1){left:3%;top:1px}.fairy-lights i:nth-child(2){left:12%;top:7px}.fairy-lights i:nth-child(3){left:22%;top:12px}.fairy-lights i:nth-child(4){left:32%;top:16px}.fairy-lights i:nth-child(5){left:42%;top:19px}.fairy-lights i:nth-child(6){left:51%;top:20px}.fairy-lights i:nth-child(7){left:61%;top:18px}.fairy-lights i:nth-child(8){left:71%;top:14px}.fairy-lights i:nth-child(9){left:81%;top:9px}.fairy-lights i:nth-child(10){left:90%;top:4px}.fairy-lights i:nth-child(11){left:98%;top:1px}
.fairy-lights i:nth-child(3n+1){background:var(--palette-1);animation-delay:-.7s}.fairy-lights i:nth-child(3n+2){background:var(--palette-2);animation-delay:-1.4s}.fairy-lights i:nth-child(3n){background:var(--palette-3);animation-delay:-2s}
.cake-scene { top:13%; height:475px; }
.cake { top:132px; width:242px; height:260px; }
.cake-plate { bottom:8px !important; width:230px; height:17px; border-radius:50%; background:linear-gradient(180deg,rgba(239,228,204,.55),rgba(117,113,118,.24)); box-shadow:0 20px 38px rgba(0,0,0,.35); }
.cake-bottom,.cake-middle,.cake-top { overflow:visible; border:1px solid rgba(255,255,255,.1); box-shadow:inset 0 1px rgba(255,255,255,.16),0 12px 28px rgba(0,0,0,.18); }
.cake-bottom { bottom:23px; width:204px; height:73px; border-radius:20px 20px 31px 31px; }
.cake-middle { bottom:84px; width:174px; height:61px; border-radius:17px 17px 25px 25px; }
.cake-top { bottom:135px; width:143px; height:52px; border-radius:15px 15px 21px 21px; }
.cake-bottom b,.cake-middle b,.cake-top b { position:absolute; left:10px; right:10px; top:9px; height:8px; border-radius:99px; background:linear-gradient(90deg,rgba(255,255,255,.15),rgba(255,255,255,.36),rgba(255,255,255,.12)); }
.cake-bottom::after,.cake-middle::after,.cake-top::after { content:""; position:absolute; left:8%; right:8%; bottom:7px; height:1px; background:linear-gradient(90deg,transparent,rgba(255,248,228,.24),transparent); }
.cake-candles { bottom:183px; width:30px; height:65px; gap:0; }
.cake-candles i { width:8px; height:43px; border-radius:5px 5px 1px 1px; background:repeating-linear-gradient(135deg,#f5ead2 0 6px,#b98474 6px 11px); box-shadow:inset 1px 0 rgba(255,255,255,.35); }
.cake-candles i::before { top:-20px; width:11px; height:19px; }
.cake small { bottom:-10px; }
.blow-button { top:405px; }

.launcher-row { inset:auto 0 7%; height:190px; z-index:12; }
.launcher-hint { position:absolute; left:50%; bottom:154px; width:90%; transform:translateX(-50%); margin:0; color:rgba(229,215,185,.46); font-family:Georgia,serif; font-size:7px; letter-spacing:.14em; text-align:center; }
.launcher { bottom:-12px; width:14px; height:126px; border-radius:7px 7px 3px 3px; touch-action:none; background:linear-gradient(90deg,#222631,#8a7449 48%,#252832); box-shadow:0 10px 22px rgba(0,0,0,.32),inset 0 0 0 1px rgba(255,255,255,.05); transition:box-shadow .25s ease,filter .25s ease; }
.launcher::before { left:2px; right:2px; top:5px; height:5px; }
.launcher::after { content:""; position:absolute; left:50%; top:12px; bottom:8px; width:1px; background:linear-gradient(transparent,rgba(255,236,185,.35),transparent); }
.launcher i { top:-5px; width:2px; height:2px; }
.launcher b { position:absolute; left:50%; bottom:8px; width:8px; height:22px; border-radius:2px; background:repeating-linear-gradient(180deg,rgba(255,255,255,.16) 0 2px,transparent 2px 4px); transform:translateX(-50%); }
.launcher-a { left:8%; transform:rotate(11deg); }
.launcher-b { left:19%; transform:rotate(4deg); }
.launcher-c { right:8%; transform:rotate(-11deg); }
.launcher.dragging { z-index:30; filter:brightness(1.2); box-shadow:0 18px 38px rgba(0,0,0,.45),0 0 24px rgba(230,201,121,.18); }
.launcher.near-candle { box-shadow:0 0 30px rgba(255,216,128,.55); }

@keyframes achievement-card { 0%{transform:scale(.78) translateY(12px);opacity:0}18%,78%{transform:scale(1) translateY(0);opacity:1}100%{transform:scale(.94) translateY(-5px);opacity:0} }
@keyframes achievement-light { 0%{color:rgba(176,181,192,.22);filter:grayscale(1)}45%{color:rgba(188,191,199,.4);filter:grayscale(.8)}100%{color:var(--gold-light);filter:grayscale(0) drop-shadow(0 0 18px rgba(230,201,121,.42))} }
@keyframes journey-cloud { from{transform:translateX(0)}to{transform:translateX(620px)} }
@keyframes snail-crawl-v6 { 0%{left:-150px;transform:translateY(0)}55%{left:29%;transform:translateY(-1px)}100%{left:36%;transform:translateY(0)} }
@keyframes bird-approach-v6 { 0%{right:-155px;top:31%;transform:rotate(-9deg) scale(.86)}55%{right:24%;top:41%;transform:rotate(-2deg) scale(1)}82%{right:33%;top:51%;transform:rotate(7deg) scale(.91)}100%{right:37%;top:56%;transform:rotate(10deg) scale(.84)} }
@keyframes bird-depart-v6 { 0%{right:37%;top:56%;transform:rotate(10deg) scale(.84)}20%{right:38%;top:49%;transform:rotate(-5deg) scale(.96)}100%{right:105%;top:18%;transform:rotate(-14deg) scale(.8)} }
@keyframes letter-caught { 0%{opacity:0;transform:translate(16px,-13px) rotate(-14deg) scale(.55)}100%{opacity:1;transform:rotate(8deg) scale(1)} }
@keyframes letter-arrive { 0%{opacity:0;transform:translate(-50%,-36%) rotate(-7deg) scale(.66)}100%{opacity:1;transform:translate(-50%,-50%) rotate(0) scale(1)} }
@keyframes fairy-glow { 0%,100%{opacity:.38;filter:brightness(.8)}50%{opacity:1;filter:brightness(1.35) drop-shadow(0 0 7px currentColor)} }

.phone.finale-open .achievement-button { display:inline-grid; place-items:center; }
.achievement-unlock { width:100%; height:100%; max-width:none; max-height:none; margin:0; padding:0; border:0; background:transparent; overflow:hidden; }
.achievement-unlock::backdrop { background:rgba(3,5,10,.42); backdrop-filter:blur(6px); }
.achievement-unlock:not([open]) { display:none; }
.achievement-unlock[open] { display:grid; }
@keyframes bird-approach-v6 { 0%{right:-155px;top:31%;transform:rotate(-9deg) scale(.86)}55%{right:16%;top:48%;transform:rotate(-2deg) scale(1)}82%{right:21%;top:61%;transform:rotate(7deg) scale(.91)}100%{right:23%;top:66%;transform:rotate(10deg) scale(.84)} }
@keyframes bird-depart-v6 { 0%{right:23%;top:66%;transform:rotate(10deg) scale(.84)}20%{right:24%;top:58%;transform:rotate(-5deg) scale(.96)}100%{right:105%;top:18%;transform:rotate(-14deg) scale(.8)} }
.letter-journey.bird-in .pearl-bird { animation-duration:4.2s; }


/* V7 interaction refinements */
#finalSky { z-index: 10; pointer-events: none; }
.finale-copy { z-index: 4; }
.cake-scene { z-index: 7; }
.message-box { z-index: 20; }

.achievement-unlock-hint {
  margin: 9px auto 0 !important;
  max-width: 240px;
  color: rgba(225,216,198,.62) !important;
  font-size: 11px !important;
  line-height: 1.65;
  letter-spacing: .02em !important;
}
.trophy-achievement {
  grid-column: 1 / -1;
  min-height: 92px;
  display: grid;
  grid-template-columns: 64px 1fr;
  align-items: center;
  padding: 12px 20px;
  text-align: left;
  background: linear-gradient(135deg,rgba(230,201,121,.11),rgba(255,255,255,.025)) !important;
  border-color: rgba(230,201,121,.42) !important;
}
.trophy-achievement .achievement-svg { margin: 0 !important; width: 54px; height: 54px; }
.trophy-achievement small { font-size: 9px; color: var(--gold-light); }

.letter-journey.delivered-state .snail,
.letter-journey.delivered-state .pearl-bird,
.letter-journey.delivered-state .snail-trail { display: none; }
.letter-journey.delivered-state .delivered-letter.ready { animation: letter-ready-breathe 3.6s ease-in-out infinite; }
@keyframes letter-ready-breathe {
  0%,100% { transform: translate(-50%,-50%) scale(1); filter: drop-shadow(0 14px 22px rgba(0,0,0,.3)); }
  50% { transform: translate(-50%,-52%) scale(1.025); filter: drop-shadow(0 18px 28px rgba(0,0,0,.36)) drop-shadow(0 0 12px rgba(230,201,121,.12)); }
}

.cake-candles i::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -20px;
  width: 12px;
  height: 34px;
  opacity: 0;
  transform: translateX(-50%);
  background:
    radial-gradient(ellipse at 50% 80%,rgba(205,211,219,.38),transparent 48%),
    radial-gradient(ellipse at 25% 45%,rgba(191,201,211,.26),transparent 42%),
    radial-gradient(ellipse at 70% 18%,rgba(215,220,226,.18),transparent 38%);
  filter: blur(2px);
  pointer-events: none;
}
.cake.smoking .cake-candles i::after { animation: candle-smoke 1.85s ease-out forwards; }
@keyframes candle-smoke {
  0% { opacity: 0; transform: translate(-50%,4px) scale(.5); }
  18% { opacity: .72; }
  70% { opacity: .35; }
  100% { opacity: 0; transform: translate(-35%,-42px) scale(1.6) rotate(12deg); }
}

.launcher-row {
  z-index: 13;
  inset: auto 0 92px;
  height: 245px;
  pointer-events: none;
}
.launcher-row.visible { pointer-events: none; }
.launcher-hint { bottom: 18px; }
.launcher {
  bottom: 34px;
  width: 13px;
  height: 132px;
  border-radius: 7px 7px 3px 3px;
  pointer-events: auto;
  touch-action: manipulation;
  background: linear-gradient(90deg,#181b23,#8a7449 46%,#20232b);
  box-shadow: 0 16px 30px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.06);
  transition: filter .25s ease, box-shadow .25s ease, transform .25s ease;
}
.launcher-a { left: -8px; right: auto; transform: rotate(31deg); transform-origin: bottom center; }
.launcher-c { right: -8px; left: auto; transform: rotate(-31deg); transform-origin: bottom center; }
.launcher.selected {
  filter: brightness(1.28);
  box-shadow: 0 0 28px rgba(230,201,121,.52), 0 16px 32px rgba(0,0,0,.38);
}
.launcher.selected i { opacity: 1; animation: launcher-spark .72s ease-in-out infinite; }
@keyframes launcher-spark { 0%,100%{transform:scale(.75);filter:brightness(.85)}50%{transform:scale(1.45);filter:brightness(1.5)} }

@media (max-height: 700px) {
  .launcher-row { bottom: 78px; height: 205px; }
  .launcher { height: 112px; bottom: 28px; }
}


/* V8: candle hit area and finale firework passthrough */
.cake { pointer-events: none; cursor: default; }
.cake-candles {
  position: absolute;
  pointer-events: auto;
  cursor: pointer;
  border: 0;
  padding: 0;
  background: transparent;
  touch-action: manipulation;
}


/* V9 achievement popup refinements */
.achievement-unlock.show { pointer-events: auto; }
.achievement-unlock-card {
  opacity: 0;
  transform: scale(.86) translateY(12px);
  animation: none;
}
.achievement-unlock.show .achievement-unlock-card {
  animation: achievement-card-in-v9 .48s cubic-bezier(.2,.82,.2,1) forwards;
}
.achievement-unlock-icon { animation: none; }
.achievement-unlock.show:not(.instant) .achievement-unlock-icon {
  animation: achievement-light-v9 1.25s .16s ease forwards;
}
.achievement-unlock.instant .achievement-unlock-icon {
  color: var(--gold-light);
  filter: grayscale(0) drop-shadow(0 0 18px rgba(230,201,121,.42));
}
@keyframes achievement-card-in-v9 {
  0% { opacity:0; transform:scale(.86) translateY(12px); }
  100% { opacity:1; transform:scale(1) translateY(0); }
}
@keyframes achievement-light-v9 {
  0% { color:rgba(176,181,192,.22); filter:grayscale(1); }
  45% { color:rgba(188,191,199,.4); filter:grayscale(.8); }
  100% { color:var(--gold-light); filter:grayscale(0) drop-shadow(0 0 18px rgba(230,201,121,.42)); }
}


/* V10: explicit hidden-state safety for sunset upload/fusion UI */
[hidden] { display: none !important; }

/* V10: clearer, still restrained sky-launcher silhouette */
.launcher {
  width: 18px;
  border-radius: 9px 9px 4px 4px;
  border-color: rgba(255,230,175,.18);
  background:
    repeating-linear-gradient(180deg,
      transparent 0 22px,
      rgba(139,53,48,.92) 22px 27px,
      rgba(225,183,91,.82) 27px 30px,
      transparent 30px 49px),
    linear-gradient(90deg,#171a22 0%,#745f39 32%,#b18a4d 49%,#5d482f 68%,#1b1e26 100%);
  box-shadow:
    0 16px 30px rgba(0,0,0,.4),
    inset 0 0 0 1px rgba(255,255,255,.07),
    inset 4px 0 8px rgba(255,255,255,.035),
    inset -4px 0 8px rgba(0,0,0,.22);
}
.launcher::before {
  left: 1px;
  right: 1px;
  top: -1px;
  height: 10px;
  border-radius: 50% 50% 42% 42%;
  background: radial-gradient(ellipse at 50% 42%,#331312 0 27%,#a33f37 29% 57%,#d89b55 60% 72%,#321d1d 75%);
  box-shadow: 0 0 0 1px rgba(255,220,165,.16),0 -2px 8px rgba(183,64,48,.18);
}
.launcher::after {
  content:"";
  position:absolute;
  left:1px;
  right:1px;
  top:42%;
  height:10px;
  width:auto;
  bottom:auto;
  background:
    linear-gradient(180deg,rgba(225,183,91,.95) 0 2px,rgba(121,45,42,.95) 2px 7px,rgba(225,183,91,.82) 7px 9px,transparent 9px);
  box-shadow:0 1px rgba(255,242,194,.12);
}
.launcher b {
  left:50%;
  bottom:-8px;
  width:28px;
  height:18px;
  border-radius:5px 5px 8px 8px;
  clip-path:polygon(18% 0,82% 0,100% 100%,0 100%);
  background:
    linear-gradient(180deg,#8d6238 0 3px,#542c29 3px 8px,#221d23 8px 100%);
  box-shadow:0 8px 14px rgba(0,0,0,.32),inset 0 1px rgba(255,229,170,.2);
  transform:translateX(-50%);
}
.launcher i {
  top:-9px;
  width:3px;
  height:3px;
  opacity:.5;
  background:#fff1b6;
  box-shadow:
    0 0 9px #e9bd68,
    -5px -3px 0 -1px rgba(255,215,123,.7),
    5px -5px 0 -1px rgba(228,118,74,.62);
}
.launcher-row.visible .launcher i { animation: launcher-arrival-sparks 1.05s ease-out 2; }
.launcher.selected i { animation: launcher-spark .72s ease-in-out infinite; }
@keyframes launcher-arrival-sparks {
  0% { opacity:0; transform:translateY(5px) scale(.4); }
  30% { opacity:1; transform:translateY(-2px) scale(1.25); }
  100% { opacity:0; transform:translateY(-13px) scale(.45); }
}

/* V11: finale controls, secret code and orbital stars */
.finale-back {
  top: calc(60px + env(safe-area-inset-top));
  right: 18px;
}

.finale,
#finalSky,
.finale-copy,
.firework-hint,
.cake-scene,
.launcher-row,
.message-box {
  transition-property: opacity, transform, visibility, background;
  transition-duration: 1.25s;
  transition-timing-function: ease;
}
.finale.secret-exit #finalSky,
.finale.secret-exit .finale-copy,
.finale.secret-exit .firework-hint,
.finale.secret-exit .cake-scene,
.finale.secret-exit .launcher-row,
.finale.secret-exit .message-box,
.finale.secret-exit .finale-back {
  opacity: 0 !important;
  pointer-events: none !important;
}
.finale.secret-exit { background: #05070d; }

.message-box label {
  line-height: 1.55;
}

.secret-star-layer {
  position: absolute;
  z-index: 9;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 1.25s ease, visibility 1.25s ease;
}
.secret-star-layer.visible {
  opacity: 1;
  visibility: visible;
  /* Keep all nine main stars interactive after the hidden passage appears. */
  pointer-events: none;
}
.secret-star {
  position: absolute;
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--gold-light);
  opacity: 0;
  pointer-events: none;
  transform: scale(.45);
  transition: opacity 1.35s ease, transform 1.35s cubic-bezier(.2,.8,.2,1), filter .5s ease;
}
.secret-star.visible {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}
.secret-star.awakening {
  left: 50% !important;
  top: 50% !important;
  transform: scale(1.32);
  filter: drop-shadow(0 0 24px rgba(236,211,143,.72));
}
.secret-star-core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  transform: translate(-50%,-50%);
  background: #fff3c8;
  box-shadow: 0 0 8px #fff1bd, 0 0 28px rgba(225,190,105,.75), 0 0 56px rgba(225,190,105,.22);
  animation: secret-star-breathe 4.8s ease-in-out infinite;
}
.secret-star-11 .secret-star-core {
  width: 8px;
  height: 8px;
  background: #e9e2ff;
  box-shadow: 0 0 8px #efe9ff, 0 0 26px rgba(169,158,213,.62), 0 0 52px rgba(169,158,213,.18);
  animation-duration: 6.2s;
}
.secret-star::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 76px;
  height: 2px;
  transform-origin: left center;
  transform: rotate(var(--tail-angle, 0rad));
  background: linear-gradient(90deg, rgba(244,222,164,.52), rgba(219,188,114,.16) 42%, transparent 100%);
  filter: blur(.2px);
  pointer-events: none;
}
.secret-star-11::after {
  width: 94px;
  opacity: .7;
  background: linear-gradient(90deg, rgba(225,219,255,.42), rgba(162,150,207,.13) 48%, transparent 100%);
}
.secret-star-label {
  position: absolute;
  left: 50%;
  top: calc(50% + 15px);
  transform: translateX(-50%);
  color: rgba(238,226,194,.76);
  font-family: Georgia, serif;
  font-size: 7px;
  letter-spacing: .12em;
  white-space: nowrap;
  text-shadow: 0 2px 8px rgba(0,0,0,.72);
}
.secret-star-11 .secret-star-label { color: rgba(220,215,239,.66); }
@keyframes secret-star-breathe {
  0%,100% { transform: translate(-50%,-50%) scale(.82); opacity: .72; }
  50% { transform: translate(-50%,-50%) scale(1.18); opacity: 1; }
}

.secret-image-dialog {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: hidden;
}
.secret-image-dialog::backdrop {
  background: rgba(3,5,10,.62);
  backdrop-filter: blur(8px);
}
.secret-image-dialog[open] {
  display: grid;
  place-items: center;
}
.secret-image-card {
  width: min(76%, 304px);
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid rgba(230,201,121,.24);
  border-radius: 22px;
  background: #080a10;
  box-shadow: 0 32px 95px rgba(0,0,0,.62), 0 0 36px rgba(219,183,102,.08);
  transform-origin: center center;
  animation: secret-card-unfold .9s cubic-bezier(.18,.82,.2,1) both;
}
.secret-image-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.secret-image-close {
  position: absolute;
  z-index: 2;
  right: 18px;
  top: calc(18px + env(safe-area-inset-top));
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 50%;
  color: rgba(235,226,210,.7);
  background: rgba(8,10,16,.55);
  font-size: 22px;
}
@keyframes secret-card-unfold {
  0% { opacity:0; transform: perspective(800px) rotateX(14deg) rotateY(-10deg) scale(.76); filter:blur(7px); }
  55% { opacity:1; transform: perspective(800px) rotateX(-2deg) rotateY(2deg) scale(1.025); filter:blur(0); }
  100% { opacity:1; transform:perspective(800px) rotateX(0) rotateY(0) scale(1); }
}


/* V13: the opening sentence gently changes after the first star is lit. */
.opening-second {
  display: inline-grid;
  grid-template-areas: "opening-text";
  min-width: 15em;
  vertical-align: top;
}
.opening-second > span {
  grid-area: opening-text;
  transition: opacity 1.25s ease, transform 1.25s ease, filter 1.25s ease;
}
.opening-before {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}
.opening-after {
  opacity: 0;
  transform: translateY(5px);
  filter: blur(4px);
}
.phone.is-started .opening-before {
  opacity: 0;
  transform: translateY(-4px);
  filter: blur(4px);
}
.phone.is-started .opening-after {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}
.secret-star.visible {
  pointer-events: auto;
}


/* V14 final refinements: completed achievement icon and reliable finale back target */
.achievement-button.all-complete {
  color: #16130e;
  border-color: rgba(242,213,133,.9);
  background: var(--gold);
  box-shadow: 0 0 0 1px rgba(255,244,198,.22) inset, 0 0 18px rgba(230,201,121,.3);
}
.achievement-button.all-complete > span {
  font-size: 18px;
  line-height: 1;
  transform: translateY(-.5px);
}
.achievement-button.all-complete i { display: none; }

.finale-back {
  z-index: 82;
  top: calc(61px + env(safe-area-inset-top));
  right: 13px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  touch-action: manipulation;
}


/* V15: content refinements, reaction controls, celebration and achievement light return */
.memory-content { position: relative; }

.memory-2018-card { margin-top: -10px; }
.memory-reactions {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 28px 0 2px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.07);
}
.memory-reactions > p {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  text-align: center;
  color: rgba(220,211,194,.38);
  font-family: Georgia, serif;
  font-size: 8px;
  letter-spacing: .08em;
}
.memory-reaction {
  min-height: 68px;
  padding: 9px 5px 7px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 15px;
  color: rgba(210,207,199,.26);
  background: rgba(255,255,255,.018);
  transition: color .35s ease, border-color .35s ease, background .35s ease, transform .25s ease, box-shadow .35s ease;
  touch-action: manipulation;
  -webkit-touch-callout: none;
  user-select: none;
}
.memory-reaction svg {
  display: block;
  width: 28px;
  height: 28px;
  margin: 0 auto 5px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.memory-reaction small { font-size: 9px; letter-spacing: .08em; }
.memory-reaction.active {
  color: var(--gold-light);
  border-color: rgba(230,201,121,.34);
  background: rgba(230,201,121,.065);
  box-shadow: 0 0 18px rgba(230,201,121,.08);
  transform: translateY(-2px);
}
.memory-reactions.triple-flash .memory-reaction { animation: reaction-triple .72s cubic-bezier(.2,.8,.2,1); }
.memory-reactions.triple-flash .memory-reaction:nth-child(2) { animation-delay: .08s; }
.memory-reactions.triple-flash .memory-reaction:nth-child(3) { animation-delay: .16s; }
@keyframes reaction-triple {
  0% { transform: scale(.92); filter: brightness(.8); }
  48% { transform: scale(1.08) translateY(-3px); filter: brightness(1.6); }
  100% { transform: scale(1) translateY(-2px); filter: brightness(1); }
}

.math-confetti {
  position: absolute;
  z-index: 18;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
}
.math-confetti.show { opacity: 1; }
.math-confetti i {
  position: absolute;
  left: var(--x);
  top: -24px;
  width: 5px;
  height: 17px;
  border-radius: 3px;
  background: var(--ribbon-color);
  box-shadow: 0 0 8px color-mix(in srgb, var(--ribbon-color) 55%, transparent);
  animation: math-ribbon-fall var(--duration) var(--delay) cubic-bezier(.16,.68,.28,1) forwards;
}
.math-result.celebration-result {
  color: var(--gold-light);
  font-size: 17px;
  letter-spacing: .06em;
  text-shadow: 0 0 18px rgba(230,201,121,.34);
  animation: result-celebrate 2.8s ease both;
}
@keyframes math-ribbon-fall {
  0% { opacity:0; transform: translate3d(0,-8px,0) rotate(0deg) scale(.7); }
  12% { opacity:1; }
  100% { opacity:0; transform: translate3d(var(--drift),82svh,0) rotate(var(--spin)) scale(1); }
}
@keyframes result-celebrate {
  0% { opacity:0; transform:scale(.88); }
  18%,72% { opacity:1; transform:scale(1.04); }
  100% { opacity:1; transform:scale(1); }
}

.achievement-unlock.closing-to-menu::backdrop { transition: opacity .65s ease; opacity: .18; }
.achievement-button.catching-light { animation: catch-achievement-light .72s cubic-bezier(.2,.82,.2,1); }
@keyframes catch-achievement-light {
  0% { transform:scale(1); box-shadow:0 0 0 rgba(230,201,121,0); }
  42% { transform:scale(1.18); box-shadow:0 0 28px rgba(230,201,121,.72), inset 0 0 14px rgba(255,244,205,.32); }
  100% { transform:scale(1); box-shadow:0 0 0 rgba(230,201,121,0); }
}

/* The candle instruction belongs only to the very first, still-unlit cake. */
.cake small { opacity: 0; transition: opacity .45s ease; }
.cake-scene.visible:not(.candles-lit):not(.celebrated) .cake small { opacity: 1; }

/* V16: final narrative and interaction refinements */
.intro-copy h1 { font-size: clamp(24px, 6.65vw, 30px); }

/* After the secret trophy, the handwritten nine is crossed out and ten takes its place. */
#achievementTitle .scribbled-nine {
  position: relative;
  display: inline-block;
  margin: 0 .02em;
  color: rgba(236,228,213,.62);
}
#achievementTitle .scribbled-nine::before,
#achievementTitle .scribbled-nine::after {
  content: "";
  position: absolute;
  z-index: 2;
  left: -18%;
  top: 52%;
  width: 138%;
  height: 2px;
  border-radius: 99px;
  background: rgba(229,199,119,.9);
  box-shadow: 0 0 5px rgba(229,199,119,.28);
  transform: rotate(-13deg);
}
#achievementTitle .scribbled-nine::after {
  top: 44%;
  width: 129%;
  transform: rotate(11deg);
  opacity: .78;
}
#achievementTitle .replacement-ten {
  display: inline-block;
  margin-left: .04em;
  color: var(--gold-light);
  font-family: "KaiTi", "STKaiti", Georgia, serif;
  transform: rotate(-3deg) translateY(-1px);
}

/* The second sentence is followed by a deliberate pause before the interaction row. */
.memory-2018-card blockquote { margin-bottom: 0; }
.memory-2018-card blockquote span + span { margin-top: 15px; padding-bottom: 38px; }

/* A compact social corner: a quiet chat field on the left, three small icons on the right. */
.memory-social-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin: 2px 0 4px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.07);
}
.memory-chat-placeholder {
  position: relative;
  height: 43px;
  min-width: 0;
  border: 1px solid rgba(255,255,255,.075);
  border-radius: 14px;
  background: linear-gradient(145deg,rgba(255,255,255,.025),rgba(255,255,255,.009));
  box-shadow: inset 0 1px rgba(255,255,255,.025);
  overflow: hidden;
  pointer-events: none;
}
.memory-chat-placeholder::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 13px;
  width: 7px;
  height: 7px;
  border: 1px solid rgba(220,213,199,.24);
  border-radius: 50%;
}
.memory-chat-placeholder .chat-bubble-mark {
  position: absolute;
  left: 31px;
  top: 7px;
  color: rgba(220,213,199,.28);
  font-family: Georgia, serif;
  font-size: 14px;
  letter-spacing: .12em;
}
.memory-chat-placeholder i {
  position: absolute;
  left: 31px;
  right: 32px;
  bottom: 11px;
  height: 1px;
  background: linear-gradient(90deg,rgba(220,213,199,.22),transparent);
}
.memory-chat-placeholder b {
  position: absolute;
  right: 11px;
  top: 12px;
  color: rgba(230,201,121,.34);
  font-size: 12px;
  font-weight: 400;
}
.memory-reactions {
  display: grid;
  grid-template-columns: repeat(3, 35px);
  gap: 7px;
  margin: 0;
  padding: 0;
  border: 0;
}
.memory-reaction {
  width: 35px;
  height: 35px;
  min-height: 0;
  padding: 6px;
  border-radius: 11px;
}
.memory-reaction svg { width: 21px; height: 21px; margin: 0 auto; }
.memory-reaction small,
.memory-reactions > p { display: none !important; }

/* A real envelope sequence: the sheet unfolds out, then folds back in on exit. */
.letter-view { perspective: 1200px; }
.letter-stage {
  position: relative;
  height: 100%;
  perspective: 1200px;
  isolation: isolate;
}
.letter-stage .letter-paper {
  position: relative;
  z-index: 2;
  height: 100%;
  opacity: .18;
  transform-origin: 50% 88%;
  transform: translateY(39%) scale(.80,.16);
  clip-path: inset(0 0 70% 0 round 5px);
  filter: saturate(.85) brightness(.88);
  transition: transform 1.05s cubic-bezier(.2,.78,.2,1), opacity .72s ease, clip-path 1.02s cubic-bezier(.2,.78,.2,1), filter .8s ease;
}
.letter-envelope-back,
.letter-envelope-front,
.letter-envelope-flap {
  position: absolute;
  left: 50%;
  width: 78%;
  max-width: 310px;
  transform: translateX(-50%);
  transition: transform .95s cubic-bezier(.2,.78,.2,1), opacity .8s ease, filter .8s ease;
  pointer-events: none;
}
.letter-envelope-back {
  z-index: 1;
  bottom: 8%;
  height: 142px;
  border: 1px solid rgba(119,88,54,.28);
  border-radius: 8px;
  background: linear-gradient(160deg,#cdbb9c,#a98f6e);
  box-shadow: 0 22px 56px rgba(0,0,0,.34), inset 0 1px rgba(255,255,255,.3);
}
.letter-envelope-front {
  z-index: 3;
  bottom: 8%;
  height: 142px;
  clip-path: polygon(0 38%,50% 76%,100% 38%,100% 100%,0 100%);
  background: linear-gradient(150deg,#d9c8aa,#b69d79);
  border-radius: 0 0 8px 8px;
  filter: drop-shadow(0 8px 12px rgba(0,0,0,.18));
}
.letter-envelope-flap {
  z-index: 4;
  bottom: calc(8% + 68px);
  height: 76px;
  clip-path: polygon(0 0,100% 0,50% 100%);
  background: linear-gradient(180deg,#dfcfb4,#bca17c);
  transform-origin: 50% 0;
  backface-visibility: hidden;
}
.letter-view.unfolded .letter-paper {
  opacity: 1;
  transform: translateY(0) scale(1);
  clip-path: inset(0 0 0 0 round 5px);
  filter: none;
}
.letter-view.unfolded .letter-envelope-flap {
  transform: translateX(-50%) rotateX(178deg) translateY(-8px);
  opacity: .24;
}
.letter-view.unfolded .letter-envelope-back,
.letter-view.unfolded .letter-envelope-front {
  transform: translateX(-50%) translateY(34px) scale(.94);
  opacity: 0;
  filter: blur(1px);
}
.letter-view.folding .letter-paper {
  opacity: .2;
  transform: translateY(39%) scale(.80,.16);
  clip-path: inset(0 0 70% 0 round 5px);
  filter: saturate(.82) brightness(.86);
}
.letter-view.folding .letter-envelope-back,
.letter-view.folding .letter-envelope-front {
  transform: translateX(-50%) translateY(0) scale(1);
  opacity: 1;
  filter: none;
}
.letter-view.folding .letter-envelope-flap {
  transform: translateX(-50%) rotateX(0deg);
  opacity: 1;
}

.birthday-bunting > span { line-height: 1.18; }
.launcher-hint { display: none !important; }

/* V17 · workbench text, interaction and secret-book refinements */
.keyword-grid input::placeholder { letter-spacing: .08em; }

/* The fifth star keeps a five-line pause before the interactive corner. */
.memory-2018-card blockquote span + span { padding-bottom: 94px; }
.memory-comment-form {
  display: flex;
  align-items: center;
  min-width: 0;
  height: 43px;
  padding: 0 8px 0 12px;
  border: 1px solid rgba(255,255,255,.075);
  border-radius: 14px;
  background: linear-gradient(145deg,rgba(255,255,255,.025),rgba(255,255,255,.009));
  box-shadow: inset 0 1px rgba(255,255,255,.025);
}
.memory-comment-form input {
  flex: 1 1 auto;
  min-width: 0;
  height: 36px;
  padding: 0;
  border: 0;
  outline: 0;
  color: rgba(232,224,210,.82);
  background: transparent;
  font-size: 10px;
}
.memory-comment-form input::placeholder { color: rgba(220,213,199,.3); }
.memory-comment-form button {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: rgba(230,201,121,.58);
  background: rgba(230,201,121,.055);
  font-size: 14px;
}

/* Achievement light rises a fraction while changing from grey to gold. */
.achievement-unlock.show:not(.instant) .achievement-unlock-icon {
  animation: achievement-light-v17 1.28s .14s cubic-bezier(.2,.78,.2,1) forwards;
}
@keyframes achievement-light-v17 {
  0% { color:rgba(176,181,192,.22); filter:grayscale(1); transform:translateY(7px) scale(.94); }
  48% { color:rgba(188,191,199,.46); filter:grayscale(.72); transform:translateY(-5px) scale(1.055); }
  72% { transform:translateY(-2px) scale(1.02); }
  100% { color:var(--gold-light); filter:grayscale(0) drop-shadow(0 0 18px rgba(230,201,121,.42)); transform:translateY(0) scale(1); }
}

/* The sheet visibly unfolds in two stages and folds twice on return. */
.letter-view.unfolded .letter-paper {
  animation: letter-unfold-two-v17 1.28s cubic-bezier(.2,.78,.2,1) both;
}
.letter-view.folding .letter-paper {
  animation: letter-fold-two-v17 1.05s cubic-bezier(.2,.72,.2,1) both;
}
@keyframes letter-unfold-two-v17 {
  0% { opacity:.18; transform:translateY(39%) scale(.80,.16); clip-path:inset(0 0 70% 0 round 5px); filter:saturate(.85) brightness(.88); }
  42% { opacity:.72; transform:translateY(18%) scale(.88,.52); clip-path:inset(0 0 34% 0 round 5px); filter:saturate(.92) brightness(.94); }
  100% { opacity:1; transform:translateY(0) scale(1); clip-path:inset(0 0 0 0 round 5px); filter:none; }
}
@keyframes letter-fold-two-v17 {
  0% { opacity:1; transform:translateY(0) scale(1); clip-path:inset(0 0 0 0 round 5px); filter:none; }
  48% { opacity:.74; transform:translateY(17%) scale(.88,.52); clip-path:inset(0 0 35% 0 round 5px); filter:saturate(.92) brightness(.94); }
  100% { opacity:.2; transform:translateY(39%) scale(.80,.16); clip-path:inset(0 0 70% 0 round 5px); filter:saturate(.82) brightness(.86); }
}

/* Long-pressing the candle must never select labels. */
.blow-button,
.blow-button *,
.cake,
.cake * {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* The final message field grows when the text becomes longer. */
.keyword-grid input, .message-box input, .message-box textarea {
  width: 100%;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 13px;
  outline: none;
  color: #eee5d5;
  background: rgba(255,255,255,.035);
}
.message-box textarea {
  min-height: 37px;
  max-height: 116px;
  padding: 10px 11px;
  resize: none;
  overflow-y: auto;
  font: inherit;
  font-size: 11px;
  line-height: 1.45;
}

/* Gold and violet arrival signatures for the two secret orbit stars. */
.secret-star.arrival-gold .secret-star-core,
.secret-star.arrival-violet .secret-star-core { animation: secret-arrival-core-v17 1.35s cubic-bezier(.18,.82,.2,1), secret-star-breathe 4.8s 1.35s ease-in-out infinite; }
.secret-star.arrival-gold::before,
.secret-star.arrival-violet::before {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 16px; height: 16px;
  border: 1px solid rgba(238,207,126,.72);
  border-radius: 50%;
  transform: translate(-50%,-50%);
  animation: secret-arrival-ring-v17 1.35s ease-out forwards;
}
.secret-star.arrival-violet::before { border-color: rgba(190,175,236,.72); }
@keyframes secret-arrival-core-v17 {
  0% { opacity:0; transform:translate(-50%,-50%) scale(.15); filter:brightness(3); }
  38% { opacity:1; transform:translate(-50%,-50%) scale(1.7); filter:brightness(2.2); }
  100% { opacity:1; transform:translate(-50%,-50%) scale(1); filter:brightness(1); }
}
@keyframes secret-arrival-ring-v17 {
  0% { opacity:0; transform:translate(-50%,-50%) scale(.3); }
  28% { opacity:1; }
  100% { opacity:0; transform:translate(-50%,-50%) scale(5.5); }
}

/* Six-page placeholder book from an earlier prototype. */
.secret-book-dialog {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: transparent;
  overflow: hidden;
}
.secret-book-dialog::backdrop { background: rgba(3,5,10,.68); backdrop-filter: blur(9px); }
.secret-book-dialog[open] { display: grid; place-items: center; }
.secret-book-shell {
  width: min(76%, 294px);
  color: #453a2e;
  animation: secret-book-arrive-v17 .82s cubic-bezier(.18,.82,.2,1) both;
}
.secret-book {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5.3;
  perspective: 1300px;
  filter: drop-shadow(0 30px 50px rgba(0,0,0,.48));
}
.secret-book-page {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 26px;
  border: 1px solid rgba(105,79,45,.24);
  border-radius: 5px 18px 18px 5px;
  background:
    linear-gradient(90deg,rgba(112,79,42,.08) 0 1px,transparent 1px),
    linear-gradient(155deg,#eee3cc,#d8c7a9);
  background-size: 23px 100%,100% 100%;
  box-shadow: inset 12px 0 22px rgba(79,54,29,.08), inset 0 1px rgba(255,255,255,.55);
  transform-origin: left center;
  transform: rotateY(92deg);
  opacity: 0;
  pointer-events: none;
  transition: transform .72s cubic-bezier(.2,.72,.2,1), opacity .45s ease;
  overflow: hidden;
}
.secret-book-page::after {
  content:"";
  position:absolute; inset:12px;
  border:1px solid rgba(91,108,145,.13);
  border-radius:3px 13px 13px 3px;
  pointer-events:none;
}
.secret-book-page.active { transform: rotateY(0); opacity: 1; pointer-events: auto; z-index: 3; }
.secret-book-page.past { transform: rotateY(-94deg); opacity: 0; z-index: 1; }
.secret-book-page > span { position:absolute; top:18px; right:21px; color:rgba(58,70,99,.35); font:11px Georgia,serif; }
.book-lines { width:76%; height:48%; background:repeating-linear-gradient(180deg,rgba(70,78,99,.16) 0 1px,transparent 1px 24px); }
.book-lines.short { width:62%; height:36%; }
.book-stars { width:76%; height:65%; background-image:radial-gradient(circle at 15% 20%,#52658c 0 1px,transparent 1.5px),radial-gradient(circle at 72% 19%,#52658c 0 1px,transparent 1.5px),radial-gradient(circle at 45% 52%,#52658c 0 1px,transparent 1.5px),radial-gradient(circle at 82% 72%,#52658c 0 1px,transparent 1.5px),radial-gradient(circle at 25% 82%,#52658c 0 1px,transparent 1.5px); opacity:.55; }
.book-stars.dense { background-size:70px 70px; }
.book-aquarius { width:72%; height:52%; opacity:.48; background:linear-gradient(25deg,transparent 0 47%,#52658c 48% 49%,transparent 50% 100%),linear-gradient(-18deg,transparent 0 45%,#52658c 46% 47%,transparent 48% 100%); }
.book-last-mark { color:#52658c; font-size:42px; opacity:.52; }
.secret-book-controls { display:flex; align-items:center; justify-content:center; gap:22px; margin-top:16px; }
.secret-book-controls button { width:42px; height:34px; border:1px solid rgba(230,201,121,.22); border-radius:17px; color:var(--gold-light); background:rgba(12,14,21,.78); }
.secret-book-controls button:disabled { opacity:.25; }
.secret-book-controls small { min-width:42px; text-align:center; color:rgba(230,220,201,.5); font:9px Georgia,serif; letter-spacing:.12em; }
@keyframes secret-book-arrive-v17 { from{opacity:0;transform:translateY(22px) scale(.92)} to{opacity:1;transform:none} }

/* After the six-page book, the next touch completes the night. */
.intro-copy.epilogue-complete .micro,
.intro-copy.epilogue-complete h1 { opacity: .34; }
.opening-lines .epilogue-message {
  display: inline-block;
  color: var(--gold-light);
  font-family: Georgia,"Songti SC",serif;
  font-size: 17px;
  letter-spacing: .08em;
  animation: epilogue-copy-v17 1.4s ease both;
}
.progress-note.creator-credit {
  text-align: center;
  color: rgba(225,211,178,.62);
  letter-spacing: .12em;
}
.epilogue-star-wave {
  position:absolute;
  left:50%; top:50%;
  width:18px; height:18px;
  margin:-9px;
  border:1px solid rgba(230,201,121,.62);
  border-radius:50%;
  pointer-events:none;
  animation: epilogue-wave-v17 2.3s ease-out forwards;
}
@keyframes epilogue-copy-v17 { from{opacity:0;filter:blur(5px);transform:translateY(7px)} to{opacity:1;filter:none;transform:none} }
@keyframes epilogue-wave-v17 { 0%{opacity:.8;transform:scale(.4)} 100%{opacity:0;transform:scale(16)} }


/* V18 · Le Sillon flip card, final icon parity, top-layer notices and divine epilogue */
.secret-image-dialog[open] { padding: 0; }
.secret-card-stage {
  width: min(72%, 292px);
  perspective: 1500px;
  animation: secret-card-unfold .9s cubic-bezier(.18,.82,.2,1) both;
}
.secret-flip-card {
  width: 100%;
  aspect-ratio: 3 / 4;
  padding: 0;
  border: 0;
  border-radius: 23px;
  background: transparent;
  cursor: pointer;
  perspective: 1500px;
  filter: drop-shadow(0 34px 70px rgba(0,0,0,.58));
  -webkit-tap-highlight-color: transparent;
}
.secret-flip-inner {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 1.02s cubic-bezier(.2,.75,.2,1);
}
.secret-flip-card.flipped .secret-flip-inner { transform: rotateY(180deg); }
.secret-card-face {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 27%;
  overflow: hidden;
  border: 1px solid rgba(235,211,156,.34);
  border-radius: 23px;
  color: #42372c;
  background:
    radial-gradient(circle at 83% 88%,rgba(59,80,125,.1),transparent 24%),
    linear-gradient(150deg,#efe7d6,#d9c7a8);
  box-shadow: inset 0 1px rgba(255,255,255,.68), inset 0 0 0 8px rgba(97,72,43,.035);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.secret-card-back { transform: rotateY(180deg); }
.secret-card-face::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(57,77,119,.12);
  border-radius: 15px;
  pointer-events: none;
}
.secret-card-face img {
  position: relative;
  z-index: 1;
  width: calc(100% - 22px);
  height: calc(100% - 13px);
  margin: 11px 11px 2px;
  display: block;
  object-fit: cover;
  border-radius: 14px 14px 9px 9px;
  box-shadow: 0 12px 24px rgba(70,50,29,.13), 0 0 0 1px rgba(72,54,35,.08);
}
.secret-card-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 9px 20px 14px;
  text-align: center;
}
.secret-card-copy strong,
.secret-card-copy em { display: block; font-style: normal; font-weight: 400; }
.secret-card-copy-front strong {
  font-family: "Songti SC", Georgia, serif;
  font-size: 20px;
  letter-spacing: .16em;
}
.secret-card-copy-front em {
  margin-top: 5px;
  color: #816c4d;
  font-family: Georgia,"Songti SC",serif;
  font-size: 13px;
  letter-spacing: .22em;
}
.secret-card-copy-back strong {
  color: #4d6089;
  font-family: Georgia,"Songti SC",serif;
  font-size: 14px;
  letter-spacing: .08em;
}
.secret-card-copy-back em {
  margin-top: 6px;
  color: #695b49;
  font-size: 10px;
  line-height: 1.75;
  letter-spacing: .04em;
}
.secret-card-aquarius {
  position: absolute;
  z-index: 0;
  right: 18px;
  bottom: 13px;
  color: rgba(45,67,112,.095);
  font-family: Georgia,serif;
  font-size: 58px;
  line-height: 1;
  transform: rotate(-8deg);
  pointer-events: none;
}
.secret-image-close {
  z-index: 4;
  right: 19px;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  color: var(--gold-light);
  background: rgba(7,9,15,.7);
  box-shadow: 0 10px 28px rgba(0,0,0,.3);
}

/* Keep the completed achievement symbol gold and above finale layers. */
.achievement-button.all-complete,
.phone.finale-open .achievement-button.all-complete {
  position: relative;
  z-index: 120;
  color: var(--gold-light) !important;
  border-color: rgba(243,225,173,.72) !important;
  background: rgba(8,10,16,.78) !important;
  box-shadow: 0 0 0 1px rgba(230,201,121,.12) inset, 0 0 22px rgba(230,201,121,.28) !important;
  isolation: isolate;
}
.achievement-button.all-complete > span {
  position: relative;
  z-index: 3;
  color: var(--gold-light) !important;
  font-size: 20px;
  text-shadow: 0 0 12px rgba(230,201,121,.55);
}

/* Toasts use the Popover top layer, so dialogs cannot cover them. */
.toast[popover] {
  position: fixed;
  z-index: 9999;
  left: 50%;
  right: auto;
  top: auto;
  bottom: calc(82px + env(safe-area-inset-bottom));
  margin: 0;
  border: 1px solid rgba(255,255,255,.1);
  transform: translate(-50%,12px);
}
.toast[popover]::backdrop { background: transparent; }
.toast[popover]:popover-open { display: block; }
.toast[popover].show { transform: translate(-50%,0); }

/* The little book returns to its cover, then fades. */
.secret-book-dialog.book-closing .secret-book-shell {
  animation: secret-book-close-v18 1.15s cubic-bezier(.2,.72,.2,1) both;
}
.secret-book-dialog.book-closing .secret-book-page.active {
  transform: rotateY(0deg);
  opacity: 1;
}
@keyframes secret-book-close-v18 {
  0% { opacity:1; transform:translateY(0) scale(1) rotateY(0); filter:none; }
  48% { opacity:1; transform:translateY(3px) scale(.98) rotateY(-4deg); filter:none; }
  100% { opacity:0; transform:translateY(18px) scale(.88) rotateY(-11deg); filter:blur(6px); }
}

/* The final sentence uses the same typography as the opening line. */
.opening-lines .epilogue-message {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  color: rgba(209,203,191,.72);
  font-family: inherit;
  font-size: inherit;
  line-height: 1.8;
  letter-spacing: 0;
}
.opening-lines .epilogue-message > span:last-child {
  margin-top: 2px;
  color: var(--gold-light);
  font-size: 15px;
  line-height: 1;
}

/* Slow, recurring rings around the music star: water-like and ceremonial. */
.epilogue-ripple-field {
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translate(-50%,-50%);
  pointer-events: none;
  overflow: visible;
}
.epilogue-ripple-field i {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(238,218,163,.58);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(142,164,211,.08), inset 0 0 10px rgba(243,225,173,.05);
  opacity: 0;
  animation: epilogue-wave-v18 7.2s cubic-bezier(.12,.54,.22,1) infinite;
  animation-delay: calc(var(--wave-index) * 1.42s);
}
.epilogue-ripple-field i:nth-child(even) { border-color: rgba(163,181,221,.38); }
.epilogue-ripple-field.is-suspended i {
  animation: none !important;
  opacity: 0 !important;
  transform: scale(.35) !important;
}
@keyframes epilogue-wave-v18 {
  0% { opacity:0; transform:scale(.35); filter:blur(.1px); }
  8% { opacity:.72; }
  68% { opacity:.16; }
  100% { opacity:0; transform:scale(20); filter:blur(.65px); }
}

.star-node[data-id="1"] { isolation: isolate; }

/* V39 · one butterfly halo per click, paced like the ordinary music-star ripple */
.creator-butterfly-field {
  position: absolute;
  inset: 0;
  overflow: visible;
  pointer-events: none;
  z-index: -1;
}
.creator-butterfly-halo {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 78px;
  height: 65px;
  transform: translate(-50%, -50%) scale(.18);
  transform-origin: 50% 50%;
  opacity: 0;
  animation: creator-butterfly-halo-v39 7.2s cubic-bezier(.12,.54,.22,1) forwards;
  will-change: transform, opacity, filter;
}
.creator-butterfly-halo svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.creator-butterfly-halo .butterfly-halo-glow,
.creator-butterfly-halo .butterfly-halo-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.creator-butterfly-halo .butterfly-halo-glow {
  stroke: rgba(247,233,194,.22);
  stroke-width: 10px;
  filter: blur(6.4px);
}
.creator-butterfly-halo .butterfly-halo-line {
  stroke: rgba(249,238,205,.34);
  stroke-width: 1.35px;
  filter: blur(.55px) drop-shadow(0 0 6px rgba(255,246,218,.18));
}
@keyframes creator-butterfly-halo-v39 {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(.18);
    filter: blur(1.1px);
  }
  8% { opacity: .58; }
  68% { opacity: .16; }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(5.65);
    filter: blur(2.2px);
  }
}


/* V19 · refined Le Sillon card, restored title and left-aligned epilogue */
.intro-copy.epilogue-complete h1 {
  opacity: 1 !important;
  color: inherit;
  filter: none;
}
.opening-lines .epilogue-message {
  display: inline-flex;
  width: 100%;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
}
.opening-lines .epilogue-message > span:last-child {
  margin-top: 3px;
  margin-left: 0;
}

.secret-card-stage {
  width: min(70%, 278px);
  animation: secret-card-arrive-v19 1.35s cubic-bezier(.16,.82,.2,1) both;
  transform-origin: 50% 58%;
}
.secret-flip-card {
  border-radius: 10px;
  filter: drop-shadow(0 28px 64px rgba(0,0,0,.68));
}
.secret-card-face {
  grid-template-rows: minmax(0, 1fr) 24%;
  padding: 13px 13px 11px;
  border: 1px solid rgba(238,210,140,.58);
  border-radius: 10px;
  color: #ead9ae;
  background:
    linear-gradient(rgba(9,12,20,.86),rgba(9,12,20,.94)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 400'%3E%3Cg fill='none' stroke='%23d9c27f' stroke-opacity='.22' stroke-width='1'%3E%3Cpath d='M196 90L230 118L210 154L247 177L222 215L258 244'/%3E%3Cpath d='M79 291L112 270L146 297L177 271L208 301'/%3E%3C/g%3E%3Cg fill='%23ead9ae' fill-opacity='.28'%3E%3Ccircle cx='196' cy='90' r='2.2'/%3E%3Ccircle cx='230' cy='118' r='2'/%3E%3Ccircle cx='210' cy='154' r='2.4'/%3E%3Ccircle cx='247' cy='177' r='1.8'/%3E%3Ccircle cx='222' cy='215' r='2.1'/%3E%3Ccircle cx='258' cy='244' r='2.3'/%3E%3Ccircle cx='79' cy='291' r='1.8'/%3E%3Ccircle cx='112' cy='270' r='2.2'/%3E%3Ccircle cx='146' cy='297' r='1.9'/%3E%3Ccircle cx='177' cy='271' r='2.3'/%3E%3Ccircle cx='208' cy='301' r='1.8'/%3E%3C/g%3E%3C/svg%3E"),
    radial-gradient(circle at 18% 10%,rgba(109,91,147,.16),transparent 35%),
    linear-gradient(155deg,#111625,#070911 72%);
  background-size: auto, 100% 100%, auto, auto;
  box-shadow:
    inset 0 0 0 4px rgba(230,201,121,.035),
    inset 0 0 0 7px rgba(230,201,121,.018),
    0 22px 52px rgba(0,0,0,.46);
}
.secret-card-face::before {
  content: "";
  position: absolute;
  z-index: 3;
  inset: 7px;
  border: 1px solid rgba(230,201,121,.22);
  border-radius: 6px;
  pointer-events: none;
}
.secret-card-face::after {
  inset: 10px;
  border-color: rgba(230,201,121,.09);
  border-radius: 5px;
}
.secret-card-face img {
  z-index: 2;
  width: 84%;
  height: auto;
  aspect-ratio: 1 / 1;
  margin: 18px auto 2px;
  align-self: center;
  object-fit: contain;
  border-radius: 4px;
  border: 1px solid rgba(235,215,165,.25);
  box-shadow: 0 14px 28px rgba(0,0,0,.38), 0 0 0 4px rgba(230,201,121,.035);
}
.secret-card-copy {
  z-index: 4;
  padding: 6px 15px 10px;
  color: #e7d6aa;
  font-family: Georgia,"Songti SC",serif;
  font-size: 10px;
  line-height: 1.65;
  letter-spacing: .11em;
}
.secret-card-copy strong,
.secret-card-copy em,
.secret-card-copy-front strong,
.secret-card-copy-front em,
.secret-card-copy-back strong,
.secret-card-copy-back em {
  margin: 0;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  font-style: normal;
  font-weight: 400;
}
.secret-card-copy strong + em { margin-top: 2px; }
.secret-card-copy-back { letter-spacing: .07em; }
.secret-card-aquarius {
  z-index: 1;
  right: 16px;
  bottom: 12px;
  color: rgba(230,201,121,.085);
  font-size: 48px;
}
@keyframes secret-card-arrive-v19 {
  0% { opacity: 0; transform: translateY(28px) scale(.86) rotate(-5deg); filter: blur(7px); }
  58% { opacity: 1; transform: translateY(-3px) scale(1.015) rotate(1.1deg); filter: blur(0); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(0); filter: none; }
}

/* V20 · Le Sillon card refinement and reversible closing motion */
.secret-card-stage {
  width: min(79%, 316px);
  animation: secret-card-arrive-v20 1.45s cubic-bezier(.16,.82,.2,1) both;
  transform-origin: 50% 56%;
}
.secret-card-stage.closing {
  pointer-events: none;
  animation: secret-card-arrive-v20 .92s cubic-bezier(.55,.05,.8,.2) reverse both;
}
.secret-flip-card {
  border-radius: 8px;
  filter: drop-shadow(0 32px 76px rgba(0,0,0,.72));
}
.secret-card-face {
  grid-template-rows: 22px minmax(0,1fr) auto 15px;
  gap: 4px;
  padding: 12px 12px 10px;
  border-radius: 8px;
  border-color: rgba(239,211,139,.68);
  background:
    radial-gradient(circle at 13% 12%, rgba(236,207,125,.16) 0 1px, transparent 1.7px),
    radial-gradient(circle at 74% 15%, rgba(236,207,125,.13) 0 1.1px, transparent 1.8px),
    radial-gradient(circle at 29% 43%, rgba(236,207,125,.11) 0 .9px, transparent 1.6px),
    radial-gradient(circle at 86% 55%, rgba(236,207,125,.14) 0 1px, transparent 1.8px),
    radial-gradient(circle at 17% 79%, rgba(236,207,125,.12) 0 1px, transparent 1.7px),
    radial-gradient(circle at 63% 88%, rgba(236,207,125,.13) 0 1px, transparent 1.8px),
    radial-gradient(circle at 86% 91%, rgba(236,207,125,.09) 0 .8px, transparent 1.5px),
    radial-gradient(ellipse at 20% 0%, rgba(206,171,82,.16), transparent 38%),
    radial-gradient(ellipse at 88% 100%, rgba(136,105,48,.14), transparent 42%),
    linear-gradient(145deg, #111725 0%, #090c14 56%, #05070d 100%);
  box-shadow:
    inset 0 0 0 3px rgba(230,201,121,.045),
    inset 0 0 44px rgba(198,157,61,.035),
    0 28px 65px rgba(0,0,0,.52);
}
.secret-card-face::before {
  content: "";
  position: absolute;
  z-index: 5;
  inset: 7px;
  border: 1px solid rgba(230,201,121,.19);
  border-radius: 5px;
  box-shadow: inset 0 0 0 3px rgba(230,201,121,.018);
  pointer-events: none;
}
.secret-card-face::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 12px 9px 14px 9px;
  border: 0;
  border-radius: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 400'%3E%3Cg fill='none' stroke='%23e6c979' stroke-opacity='.16' stroke-width='1'%3E%3Cpath d='M44 292 L81 264 L119 281 L154 247 L194 260 L232 221 L263 238'/%3E%3Cpath d='M65 108 L101 128 L137 94 L175 118 L213 82 L251 103'/%3E%3C/g%3E%3Cg fill='%23f0d795' fill-opacity='.28'%3E%3Ccircle cx='44' cy='292' r='2.1'/%3E%3Ccircle cx='81' cy='264' r='1.8'/%3E%3Ccircle cx='119' cy='281' r='2.2'/%3E%3Ccircle cx='154' cy='247' r='1.8'/%3E%3Ccircle cx='194' cy='260' r='2.1'/%3E%3Ccircle cx='232' cy='221' r='1.9'/%3E%3Ccircle cx='263' cy='238' r='2.2'/%3E%3Ccircle cx='65' cy='108' r='1.8'/%3E%3Ccircle cx='101' cy='128' r='2.1'/%3E%3Ccircle cx='137' cy='94' r='1.7'/%3E%3Ccircle cx='175' cy='118' r='2.2'/%3E%3Ccircle cx='213' cy='82' r='1.8'/%3E%3Ccircle cx='251' cy='103' r='2.1'/%3E%3C/g%3E%3C/svg%3E") center/100% 100% no-repeat;
  opacity: .75;
  pointer-events: none;
}
.secret-card-stars {
  position: relative;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #e3c36e;
  font-size: 7px;
  line-height: 1;
  letter-spacing: 0;
  text-shadow: 0 0 9px rgba(230,195,102,.36);
}
.secret-card-stars i {
  display: block;
  font-style: normal;
  transform: scale(.78);
}
.secret-card-face img {
  position: relative;
  z-index: 3;
  width: 78%;
  height: auto;
  max-height: 100%;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  align-self: center;
  object-fit: contain;
  border-radius: 3px;
  border: 1px solid rgba(235,215,165,.24);
  box-shadow: 0 13px 30px rgba(0,0,0,.42), 0 0 0 3px rgba(230,201,121,.03);
}
.secret-card-copy {
  position: relative;
  z-index: 6;
  width: 84%;
  margin: 0 auto;
  padding: 3px 0 1px;
  color: #ead7a8;
  font-family: Georgia,"Songti SC",serif;
  font-size: 9px;
  line-height: 1.65;
  letter-spacing: .08em;
}
.secret-card-copy-front {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  justify-content: stretch;
  font-family: "Kaiti SC","STKaiti","KaiTi",Georgia,cursive;
  letter-spacing: .055em;
  line-height: 1.45;
}
.secret-card-copy-front .front-line {
  display: block;
  width: 100%;
  color: #ebd6a1;
  text-shadow: 0 0 12px rgba(220,181,82,.08);
}
.secret-card-copy-front .front-line-left {
  text-align: left;
  font-size: 9px;
  padding-left: 1px;
}
.secret-card-copy-front .front-line-center {
  text-align: center;
  font-size: 13px;
  letter-spacing: .16em;
  margin: 1px 0;
}
.secret-card-copy-front .front-line-right {
  text-align: right;
  font-size: 9px;
  padding-right: 1px;
}
.secret-card-copy-back {
  text-align: center;
  font-size: 8.7px;
  line-height: 1.72;
  letter-spacing: .065em;
}
.secret-card-copy-back strong,
.secret-card-copy-back em {
  display: block;
  margin: 0;
  color: inherit;
  font-family: Georgia,"Songti SC",serif;
  font-size: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  font-style: normal;
  font-weight: 400;
}
.secret-card-copy-back strong + em { margin-top: 1px; }
.secret-card-date {
  position: relative;
  z-index: 6;
  display: block;
  align-self: end;
  color: rgba(229,207,151,.52);
  font-family: Georgia,serif;
  font-size: 6px;
  line-height: 1;
  letter-spacing: .25em;
  text-align: center;
  white-space: nowrap;
}
.secret-card-aquarius { display: none !important; }
@keyframes secret-card-arrive-v20 {
  0% { opacity: 0; transform: translateY(30px) scale(.82) rotate(-5.5deg); filter: blur(8px); }
  54% { opacity: 1; transform: translateY(-4px) scale(1.018) rotate(1.25deg); filter: blur(0); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(0); filter: none; }
}


/* V21 · refined SILLON card, unified names and guaranteed retreat animation */
.secret-card-stage {
  width: min(84%, 338px);
  aspect-ratio: 3 / 4;
}
.secret-card-stage.closing {
  pointer-events: none;
  animation: none !important;
}
.secret-flip-card {
  width: 100%;
  height: 100%;
}
.secret-card-face {
  grid-template-rows: 30px minmax(0, 1fr) 106px 20px;
  gap: 7px;
  padding: 14px 14px 12px;
  border-radius: 8px;
  overflow: hidden;
}
.secret-card-face::after {
  z-index: 1;
  left: 13px;
  right: 13px;
  top: 63%;
  bottom: 28px;
  width: auto;
  height: auto;
  opacity: .92;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 155'%3E%3Cg fill='none' stroke='%23e6c979' stroke-opacity='.24' stroke-width='1.2'%3E%3Cpath d='M34 112 L73 84 L112 101 L151 61 L190 76 L230 34 L267 51'/%3E%3C/g%3E%3Cg fill='%23f0d795' fill-opacity='.48'%3E%3Ccircle cx='34' cy='112' r='2.8'/%3E%3Ccircle cx='73' cy='84' r='2.4'/%3E%3Ccircle cx='112' cy='101' r='2.9'/%3E%3Ccircle cx='151' cy='61' r='2.5'/%3E%3Ccircle cx='190' cy='76' r='2.8'/%3E%3Ccircle cx='230' cy='34' r='2.5'/%3E%3Ccircle cx='267' cy='51' r='2.9'/%3E%3C/g%3E%3C/svg%3E") center bottom / 100% 100% no-repeat;
}
.secret-card-stars {
  gap: 13px;
  font-size: 11px;
  text-shadow: 0 0 12px rgba(230,195,102,.54);
}
.secret-card-stars i { transform: none; }
.secret-card-face img {
  width: 81%;
  max-height: 100%;
  margin: 0 auto;
  align-self: center;
  border-radius: 3px;
}
.secret-card-copy,
.secret-card-copy-front,
.secret-card-copy-back,
.secret-card-copy strong,
.secret-card-copy em,
.secret-card-copy-front .front-line,
.secret-card-copy-back strong,
.secret-card-copy-back em {
  font-family: Georgia, "Songti SC", "STSong", serif !important;
  font-style: normal;
  font-weight: 400;
}
.secret-card-copy {
  z-index: 6;
  width: 82%;
  min-height: 96px;
  margin: 0 auto;
  padding: 13px 0 7px;
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: .08em;
}
.secret-card-copy-front {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 3px;
  width: 70%;
  line-height: 1.35;
}
.secret-card-copy-front .front-line {
  width: 100%;
  padding: 0 !important;
  font-size: 13px;
}
.secret-card-copy-front .front-line-left {
  text-align: left;
  transform: translateX(2px);
}
.secret-card-copy-front .front-line-center {
  margin: 0;
  text-align: center;
  font-size: 17px;
  letter-spacing: .13em;
}
.secret-card-copy-front .front-line-right {
  text-align: right;
  transform: translateX(-2px);
}
.secret-card-copy-back {
  width: 86%;
  padding-top: 12px;
  font-size: 12px;
  line-height: 1.62;
  letter-spacing: .055em;
  text-align: center;
}
.secret-card-copy-back strong,
.secret-card-copy-back em {
  font-size: 12px;
  line-height: 1.62;
}
.secret-card-date {
  font-size: 7px;
  letter-spacing: .23em;
}

/* V22 · refined Aquarius star-chart watermark on the lower half of the SILLON card */
.secret-card-face::after {
  left: 15px;
  right: 15px;
  top: 62.5%;
  bottom: 29px;
  opacity: .52;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 155'%3E%3Cg fill='none' stroke='%23e8cf8d' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.4 73.8L94 51.7L150.8 22.2L177.6 28.2L189.3 20.5L201 21.1' stroke-opacity='.115' stroke-width='.72'/%3E%3Cpath d='M177.6 28.2L184.3 12.6L189.3 20.5' stroke-opacity='.14' stroke-width='.66'/%3E%3Cpath d='M189.3 20.5L169.2 64.2L192.7 80.5L224.4 96.9L232.8 109.4L257.9 139.5L279.6 133.5' stroke-opacity='.105' stroke-width='.68'/%3E%3Cpath d='M189.3 20.5L204.4 45.1L229.5 63L224.4 96.9' stroke-opacity='.095' stroke-width='.62'/%3E%3Cpath d='M169.2 64.2L152.5 98.4' stroke-opacity='.082' stroke-width='.56'/%3E%3Cpath d='M229.5 63L266.3 54.4L267.9 71.5L271.3 72L274.6 74.5' stroke-opacity='.072' stroke-width='.5'/%3E%3C/g%3E%3Cg fill='%23ecd89c'%3E%3Ccircle cx='20.4' cy='73.8' r='1.35' fill-opacity='.22'/%3E%3Ccircle cx='94' cy='51.7' r='1.8' fill-opacity='.34'/%3E%3Ccircle cx='150.8' cy='22.2' r='1.72' fill-opacity='.32'/%3E%3Ccircle cx='177.6' cy='28.2' r='1.2' fill-opacity='.24'/%3E%3Ccircle cx='189.3' cy='20.5' r='1.48' fill-opacity='.31'/%3E%3Ccircle cx='201' cy='21.1' r='1.08' fill-opacity='.22'/%3E%3Ccircle cx='184.3' cy='12.6' r='1.05' fill-opacity='.21'/%3E%3Ccircle cx='169.2' cy='64.2' r='1.18' fill-opacity='.24'/%3E%3Ccircle cx='204.4' cy='45.1' r='.92' fill-opacity='.19'/%3E%3Ccircle cx='192.7' cy='80.5' r='.95' fill-opacity='.18'/%3E%3Ccircle cx='152.5' cy='98.4' r='.9' fill-opacity='.17'/%3E%3Ccircle cx='229.5' cy='63' r='1.42' fill-opacity='.28'/%3E%3Ccircle cx='224.4' cy='96.9' r='.98' fill-opacity='.19'/%3E%3Ccircle cx='232.8' cy='109.4' r='1.62' fill-opacity='.31'/%3E%3Ccircle cx='266.3' cy='54.4' r='.84' fill-opacity='.16'/%3E%3Ccircle cx='267.9' cy='71.5' r='.72' fill-opacity='.14'/%3E%3Ccircle cx='271.3' cy='72' r='.66' fill-opacity='.13'/%3E%3Ccircle cx='274.6' cy='74.5' r='.62' fill-opacity='.12'/%3E%3Ccircle cx='257.9' cy='139.5' r='1.1' fill-opacity='.21'/%3E%3Ccircle cx='279.6' cy='133.5' r='.96' fill-opacity='.18'/%3E%3C/g%3E%3Cg fill='none' stroke='%23efdca5'%3E%3Ccircle cx='94' cy='51.7' r='4.4' stroke-opacity='.035' stroke-width='.7'/%3E%3Ccircle cx='150.8' cy='22.2' r='4.1' stroke-opacity='.032' stroke-width='.7'/%3E%3Ccircle cx='189.3' cy='20.5' r='3.8' stroke-opacity='.03' stroke-width='.7'/%3E%3Ccircle cx='232.8' cy='109.4' r='4.2' stroke-opacity='.032' stroke-width='.7'/%3E%3C/g%3E%3Cg fill='%23e9d59a' fill-opacity='.09'%3E%3Ccircle cx='39' cy='33' r='.55'/%3E%3Ccircle cx='61' cy='119' r='.48'/%3E%3Ccircle cx='112' cy='14' r='.45'/%3E%3Ccircle cx='129' cy='124' r='.5'/%3E%3Ccircle cx='217' cy='18' r='.42'/%3E%3Ccircle cx='244' cy='77' r='.5'/%3E%3Ccircle cx='287' cy='99' r='.42'/%3E%3C/g%3E%3C/svg%3E") center bottom / 100% 100% no-repeat;
}


/* V23 · precise face isolation, gentle music-era sky, smoother paper and tactile long-press controls */

/* The SILLON card has no visible back button; the night outside the card is the exit target. */
.secret-image-close { display: none !important; }

/* Safari/iOS can paint the reverse side of nested content unless every layer is isolated. */
.secret-flip-inner {
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
  isolation: isolate;
}
.secret-card-face {
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
  -webkit-backface-visibility: hidden !important;
  backface-visibility: hidden !important;
}
.secret-card-face { contain: paint; transition: opacity .01s linear .34s; }
.secret-card-front { -webkit-transform: rotateY(0deg) translateZ(1px); transform: rotateY(0deg) translateZ(1px); opacity: 1; }
.secret-card-back { -webkit-transform: rotateY(180deg) translateZ(1px); transform: rotateY(180deg) translateZ(1px); opacity: 0; }
.secret-flip-card.flipped .secret-card-front { opacity: 0; }
.secret-flip-card.flipped .secret-card-back { opacity: 1; }
.secret-flip-card.turning { pointer-events: none; }
.secret-card-date {
  font-size: 8px;
  transform: translateY(-3px);
}

/* The three reaction icons sit on one quiet cushion, with a hold-fill like the candle control. */
.memory-reactions {
  position: relative;
  z-index: 0;
  grid-template-columns: repeat(3, 35px);
  gap: 6px;
  min-width: 121px;
  height: 43px;
  padding: 4px 5px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 22px;
  background: rgba(255,255,255,.025);
  box-shadow: inset 0 1px rgba(255,255,255,.025);
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}
.reaction-hold-fill {
  position: absolute;
  z-index: 0;
  left: 0;
  top: 0;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg,rgba(230,201,121,.05),rgba(230,201,121,.17));
  box-shadow: inset 0 0 15px rgba(230,201,121,.055);
  transition: width .06s linear;
  pointer-events: none;
}
.memory-reaction,
.memory-reaction * {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}
.memory-reaction {
  position: relative;
  z-index: 1;
  border-color: transparent;
  background: transparent;
}
.memory-reaction.active { background: rgba(230,201,121,.055); }

/* Birthday ribbons travel inward from both sides rather than falling from the top. */
.math-confetti i {
  left: var(--start-x);
  top: var(--start-y);
  width: 5px;
  height: 16px;
  animation: math-ribbon-inward-v23 var(--duration) var(--delay) cubic-bezier(.18,.72,.22,1) forwards;
}
@keyframes math-ribbon-inward-v23 {
  0% { opacity:0; transform:translate3d(0,0,0) rotate(0deg) scale(.68); }
  12% { opacity:1; }
  58% { opacity:1; transform:translate3d(var(--mid-x),var(--mid-y),0) rotate(var(--mid-spin)) scale(1.03); }
  100% { opacity:0; transform:translate3d(var(--end-x),var(--end-y),0) rotate(var(--spin)) scale(.88); }
}

/* Transform-only paper motion avoids clip-path/filter jank on mobile Safari. */
.letter-stage .letter-paper {
  clip-path: none !important;
  filter: none !important;
  transition: none !important;
  transform-origin: 50% 92%;
  will-change: transform, opacity;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.letter-view.unfolded .letter-paper { animation: letter-unfold-smooth-v23 1.12s cubic-bezier(.18,.78,.2,1) both !important; }
.letter-view.folding .letter-paper { animation: letter-fold-smooth-v23 .96s cubic-bezier(.36,.02,.58,1) both !important; }
.letter-envelope-back,
.letter-envelope-front,
.letter-envelope-flap { will-change: transform, opacity; }
@keyframes letter-unfold-smooth-v23 {
  0% { opacity:.16; transform:translate3d(0,38%,0) scale(.82,.13); }
  48% { opacity:.76; transform:translate3d(0,15%,0) scale(.91,.58); }
  78% { opacity:1; transform:translate3d(0,-1.2%,0) scale(1.006,1.01); }
  100% { opacity:1; transform:translate3d(0,0,0) scale(1); }
}
@keyframes letter-fold-smooth-v23 {
  0% { opacity:1; transform:translate3d(0,0,0) scale(1); }
  45% { opacity:.82; transform:translate3d(0,14%,0) scale(.91,.59); }
  100% { opacity:.18; transform:translate3d(0,38%,0) scale(.82,.13); }
}

/* The closing-page microcopy keeps exactly the same tone as the opening. */
.intro-copy.epilogue-complete .micro {
  opacity: 1 !important;
  color: rgba(224,215,197,.48) !important;
}


/* V24 · restore the physical card turn while isolating the hidden face. */
.secret-flip-inner,
.secret-flip-card.flipped .secret-flip-inner {
  transform: none;
  -webkit-transform: none;
  transition: none;
  -webkit-transform-style: flat;
  transform-style: flat;
  will-change: transform;
}
.secret-card-face {
  transform: none;
  -webkit-transform: none;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transition: none;
}
.secret-card-front { opacity: 1 !important; visibility: visible !important; }
.secret-card-back { opacity: 0 !important; visibility: hidden !important; }
.secret-flip-card.flipped .secret-card-front { opacity: 0 !important; visibility: hidden !important; }
.secret-flip-card.flipped .secret-card-back { opacity: 1 !important; visibility: visible !important; }

.math-confetti i {
  animation: none !important;
  margin: 0;
  border-radius: 1px;
  transform-origin: 50% 50%;
  will-change: transform, opacity;
}


/* V25 · larger Aquarius chart and smoother achievement awakening */
.achievement-unlock.show:not(.instant) .achievement-unlock-icon {
  animation: achievement-awaken-v25 1.08s .12s cubic-bezier(.22,.76,.26,1) both !important;
  filter: none !important;
  will-change: transform, color, opacity;
}
.achievement-unlock.show:not(.instant) #achievementUnlockIndex {
  animation: achievement-index-awaken-v25 1.08s .12s cubic-bezier(.22,.76,.26,1) both;
  will-change: transform, color, opacity;
}
.achievement-unlock.instant .achievement-unlock-icon,
.achievement-unlock.instant #achievementUnlockIndex {
  color: var(--gold-light) !important;
}
@keyframes achievement-awaken-v25 {
  0% {
    color: rgba(176,181,192,.24);
    opacity: .72;
    transform: translate3d(0,4px,0) scale(.965);
  }
  42% {
    color: rgba(207,198,177,.66);
    opacity: 1;
    transform: translate3d(0,-2.6px,0) scale(1.035);
  }
  66% {
    color: rgba(229,207,151,.9);
    transform: translate3d(0,1.1px,0) scale(.992);
  }
  82% {
    color: var(--gold-light);
    transform: translate3d(0,-.7px,0) scale(1.012);
  }
  100% {
    color: var(--gold-light);
    opacity: 1;
    transform: translate3d(0,0,0) scale(1);
  }
}
@keyframes achievement-index-awaken-v25 {
  0% {
    color: rgba(227,216,194,.38);
    opacity: .78;
    transform: translate3d(0,2px,0);
  }
  42% {
    color: rgba(214,199,161,.68);
    opacity: 1;
    transform: translate3d(0,-1.2px,0);
  }
  66% {
    color: rgba(232,210,155,.9);
    transform: translate3d(0,.5px,0);
  }
  82%, 100% {
    color: var(--gold-light);
    opacity: 1;
    transform: translate3d(0,0,0);
  }
}


/* V30 · hidden-secret home copy, centered candle instruction and final 2+9 count */
.achievement-item.locked {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.achievement-item.locked:active { transform: scale(.985); }

.blow-button {
  display: grid !important;
  place-items: center !important;
}
.blow-button b {
  display: block;
  line-height: 1 !important;
  transform: translateY(-1px);
}

.message-box.all-secrets label {
  font-size: 8px;
  letter-spacing: .1em;
}

.progress-meta strong.epilogue-count {
  font-size: 0;
  letter-spacing: 0;
}
.progress-meta strong.epilogue-count #progressCount {
  font-size: 8px;
  letter-spacing: .05em;
}


/* V31 · creator signature pulse, eleven-star rainbow blessing */
.progress-note.creator-credit {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.progress-note.creator-credit-reveal {
  animation: creator-credit-reveal-v31 1.75s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes creator-credit-reveal-v31 {
  0% { opacity: 0; transform: translateY(5px); color: rgba(225,211,178,.25); text-shadow: none; }
  24% { opacity: 1; transform: translateY(0); color: rgba(246,227,178,.96); text-shadow: 0 0 14px rgba(230,201,121,.48); }
  47% { color: rgba(225,211,178,.5); text-shadow: 0 0 4px rgba(230,201,121,.12); }
  68% { color: rgba(247,231,190,.9); text-shadow: 0 0 12px rgba(198,181,229,.32); }
  100% { opacity: 1; color: rgba(225,211,178,.62); text-shadow: none; }
}

/* 05 · 天空：把两片天空重合后的照片贴进手记的这一页 */
.halo-photo-card {
  position: absolute;
  left: 13.8%;
  top: 22.8%;
  width: 72.4%;
  height: 47%;
  margin: 0;
  padding: 6px;
  background: #fbf7ee;
  border-radius: 3px;
  box-shadow: 0 16px 30px rgba(58, 46, 30, .20), 0 2px 5px rgba(58, 46, 30, .12);
  transform: rotate(-1.4deg);
  pointer-events: none;
}
.halo-photo-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f7f2e7;
  border-radius: 2px;
}

/* 07 · 对话：可以左右滑动的聊天记录照片 */
.chat-record {
  position: relative;
  margin: 0 0 14px;
  border-radius: 16px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(20, 40, 60, .14);
  touch-action: pan-y;
}
.chat-track {
  display: flex;
  transition: transform .36s cubic-bezier(.22, .68, .2, 1);
  will-change: transform;
}
.chat-slide {
  flex: 0 0 100%;
  margin: 0;
  height: clamp(286px, 50vh, 440px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
}
.chat-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.chat-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .8);
  background: rgba(255, 255, 255, .82);
  color: #35526b;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(20, 40, 60, .16);
  transition: opacity .25s ease;
}
.chat-prev { left: 8px; }
.chat-next { right: 8px; }
.chat-arrow:disabled { opacity: 0; pointer-events: none; }
.chat-count {
  position: absolute;
  right: 10px;
  bottom: 10px;
  margin: 0;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .86);
  color: #35526b;
  font-size: 10px;
  letter-spacing: .06em;
}
.chat-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin: -4px 0 16px;
}
.chat-dots button {
  width: 6px;
  height: 6px;
  padding: 0;
  border-radius: 50%;
  border: 0;
  background: rgba(53, 82, 107, .28);
  cursor: pointer;
}
.chat-dots button.on { background: #35526b; }
