:root {
  --ink: #24221e;
  --muted: #746d62;
  --paper: #fffaf0;
  --paper-deep: #f2e4c7;
  --night: #15191e;
  --night-soft: #252a2d;
  --cinnabar: #ba3d2c;
  --gold: #d8aa55;
  --jade: #50756c;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Noto Serif SC", "SimSun", serif;
  background: var(--night);
  overflow-x: hidden;
}

button, input, textarea { font: inherit; }
button { cursor: pointer; }

.sky {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 78% 14%, rgba(251,220,150,.14), transparent 21%),
    linear-gradient(145deg, #121619 0%, #26302f 55%, #171a1d 100%);
}

.sky::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .18;
  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='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.3'/%3E%3C/svg%3E");
}

.star { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fae7b6; box-shadow: 0 0 12px #fae7b6; animation: twinkle 2.8s infinite alternate; }
.star-1 { left: 8%; top: 14%; }.star-2 { left: 41%; top: 8%; animation-delay: .8s; }
.star-3 { right: 11%; top: 32%; animation-delay: 1.4s; }.star-4 { left: 21%; bottom: 16%; animation-delay: 2s; }

.cloud { position: absolute; width: 240px; height: 1px; background: rgba(233,224,203,.15); }
.cloud::after, .cloud::before { content: ""; position: absolute; width: 160px; height: 28px; border-top: 1px solid rgba(233,224,203,.15); border-radius: 50%; top: -13px; }
.cloud::before { left: 12px; }.cloud::after { right: -45px; }
.cloud-a { left: -40px; top: 23%; }.cloud-b { right: -20px; bottom: 17%; transform: scale(.75); }

.app-shell { position: relative; z-index: 1; width: min(100%, 430px); margin: 0 auto; padding: 0 0 32px; background: var(--paper); box-shadow: 0 0 80px rgba(0,0,0,.42); }
.masthead { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px; min-height: 86px; padding: 16px 20px; color: #f6ead1; background: rgba(18,22,25,.96); }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid rgba(239,207,135,.7); border-radius: 50%; font-family: "Ma Shan Zheng", cursive; font-size: 23px; color: #efcf87; }
.eyebrow { margin: 0 0 2px; color: #bfb59f; font-size: 11px; letter-spacing: .18em; }
.masthead h1 { margin: 0; font-family: "Ma Shan Zheng", cursive; font-size: 30px; font-weight: 400; letter-spacing: .08em; }
.subtitle { display: none; }

.workspace { display: block; min-height: 680px; background: var(--paper); }
.composer { padding: 27px 20px 30px; background: var(--paper); border-bottom: 1px solid #d9cab0; }
.step-block { border: 0; margin: 0 0 27px; padding: 0; }
.step-heading { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; padding: 0; width: 100%; }
.step-number { flex: 0 0 30px; width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--cinnabar); color: var(--cinnabar); font-size: 13px; transform: rotate(45deg); }
.step-number::first-line { transform: rotate(-45deg); }
.step-heading h2, .step-heading strong { display: block; margin: 0; font-size: 17px; font-weight: 700; }
.step-heading p, .step-heading small { display: block; margin: 3px 0 0; color: var(--muted); font-size: 11px; font-weight: 400; }
.field-label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 12px; }
.input-wrap { position: relative; }
.input-wrap input, .input-wrap textarea { width: 100%; border: 1px solid #cfc2ab; border-radius: 2px; outline: none; background: #fffdf8; color: var(--ink); padding: 12px 58px 12px 13px; transition: border-color .2s, box-shadow .2s; }
.input-wrap textarea { resize: none; line-height: 1.7; }
.input-wrap input:focus, .input-wrap textarea:focus { border-color: var(--cinnabar); box-shadow: 0 0 0 3px rgba(186,61,44,.09); }
.counter { position: absolute; right: 11px; bottom: 10px; color: #978d7e; font: 11px Georgia, serif; }
.quick-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.quick-list button { padding: 6px 11px; border: 1px solid #d8cbb5; border-radius: 2px; color: #665f55; background: transparent; font-size: 11px; transition: all .18s; }
.quick-list button:hover { color: var(--cinnabar); border-color: var(--cinnabar); background: #fff6ed; }
.style-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.style-option { position: relative; min-width: 0; display: grid; justify-items: center; padding: 12px 4px 11px; border: 1px solid #d9cdb8; background: #fffdf8; transition: .2s; cursor: pointer; }
.style-option input { position: absolute; opacity: 0; }
.style-option:has(input:checked) { border-color: var(--cinnabar); box-shadow: inset 0 0 0 1px var(--cinnabar); background: #fff7ec; }
.style-option:has(input:focus-visible) { outline: 2px solid var(--cinnabar); outline-offset: 2px; }
.style-icon { width: 30px; height: 30px; display: grid; place-items: center; margin-bottom: 5px; border-radius: 50%; background: #ead7b5; color: #785a2f; font-family: "Ma Shan Zheng", cursive; font-size: 18px; }
.style-option.playful .style-icon { background: #d8e3c7; color: #48643e; }
.style-option.poetic .style-icon { background: #d4dcd8; color: #385c55; }
.style-option b { font-size: 13px; }.style-option small { margin-top: 2px; color: #8c8377; font-size: 10px; }
.form-error { min-height: 18px; margin: -10px 0 6px; color: var(--cinnabar); font-size: 12px; }
.generate-button { width: 100%; min-height: 48px; border: 0; border-radius: 2px; background: var(--cinnabar); color: #fff8e9; font-weight: 700; box-shadow: 0 8px 22px rgba(157,48,33,.22); transition: transform .18s, background .18s; }
.generate-button:hover { background: #a93425; transform: translateY(-2px); }
.button-moon { display: inline-block; width: 14px; height: 14px; margin: 0 8px -2px 0; border-radius: 50%; background: #f1cd7c; box-shadow: inset 4px 0 #fff8e9; }

.preview-panel { padding: 24px 15px 26px; background: #e7decd; background-image: linear-gradient(rgba(255,255,255,.18) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.18) 1px, transparent 1px); background-size: 28px 28px; }
.preview-topline { display: flex; justify-content: space-between; margin-bottom: 13px; color: #70685d; font-size: 11px; letter-spacing: .1em; }
.preview-topline span:last-child { color: var(--cinnabar); }
.wish-card { position: relative; min-height: 460px; overflow: hidden; display: grid; place-items: center; padding: 76px 34px 48px; color: #2b2d28; background: #faf2dc; border: 1px solid rgba(107,78,38,.22); box-shadow: 0 16px 36px rgba(63,50,31,.17); isolation: isolate; transition: background .35s, color .35s; }
.wish-card::before { content: ""; position: absolute; inset: 12px; border: 1px solid rgba(162,110,50,.27); pointer-events: none; }
.wish-card::after { content: ""; position: absolute; width: 260px; height: 260px; right: -130px; bottom: -130px; border: 1px solid rgba(186,61,44,.15); border-radius: 50%; box-shadow: 0 0 0 30px rgba(186,61,44,.04), 0 0 0 62px rgba(186,61,44,.03); }
.card-moon { position: absolute; top: -59px; left: 50%; width: 158px; height: 158px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(circle at 38% 35%, #fff5cc, #edc974 72%, #cc993f); box-shadow: 0 0 45px rgba(225,181,86,.42); transition: transform .55s cubic-bezier(.2,.9,.2,1); animation: moon-glow 4.2s ease-in-out infinite; }
.moon-crater { position: absolute; border-radius: 50%; background: rgba(154,108,38,.09); box-shadow: inset 2px 1px 5px rgba(122,80,27,.08); }
.crater-a { width: 22px; height: 22px; left: 31px; top: 58px; }.crater-b { width: 13px; height: 13px; right: 29px; top: 38px; }
.moon-rabbit { position: absolute; left: 58px; bottom: 19px; color: rgba(107,77,34,.3); font-family: "Ma Shan Zheng", cursive; font-size: 23px; animation: rabbit-hop 2.8s ease-in-out infinite; }
.moving-cloud { position: absolute; z-index: 1; display: flex; align-items: flex-end; opacity: .23; animation: cloud-drift 12s linear infinite; }
.moving-cloud i { display: block; width: 48px; height: 15px; margin-left: -12px; border-top: 1px solid #8e8068; border-radius: 50%; }
.cloud-one { top: 103px; left: -70px; }.cloud-two { top: 153px; left: -120px; transform: scale(.72); animation-duration: 17s; animation-delay: -7s; opacity: .16; }
.rabbit-delivery { position: absolute; z-index: 8; inset: 0; overflow: hidden; display: grid; place-items: center; pointer-events: none; visibility: hidden; }
.rabbit-delivery::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 48%, rgba(255,249,218,.92), rgba(244,225,181,.7) 44%, rgba(80,74,60,.18)); backdrop-filter: blur(2px); opacity: 0; }
.delivery-halo { position: absolute; left: 50%; top: 46%; width: 250px; height: 250px; border: 1px solid rgba(210,162,69,.42); border-radius: 50%; transform: translate(-50%,-50%) scale(.35); opacity: 0; box-shadow: 0 0 0 24px rgba(218,174,85,.08), 0 0 0 50px rgba(218,174,85,.04); }
.rabbit-runner { position: absolute; z-index: 2; top: 116px; left: 50%; width: 170px; height: 240px; transform: translateX(250px); }
.rabbit-character { position: absolute; left: 18px; top: 0; width: 136px; transform-origin: 50% 100%; }
.rabbit-character svg { display: block; width: 100%; height: auto; overflow: visible; }
.delivery-scroll { position: absolute; z-index: 3; top: 132px; left: -19px; width: 205px; height: 60px; display: grid; place-items: center; border: 1px solid #bf8a3e; background: linear-gradient(90deg,#d6a85c 0 10px,#fff2cb 10px calc(100% - 10px),#d6a85c calc(100% - 10px)); box-shadow: 0 7px 14px rgba(79,53,25,.18); transform: scaleX(.05); opacity: 0; transform-origin: center; }
.delivery-scroll::before, .delivery-scroll::after { content: ""; position: absolute; top: -6px; width: 9px; height: 70px; border-radius: 5px; background: #a96d31; box-shadow: inset 2px 0 rgba(255,255,255,.25); }
.delivery-scroll::before { left: 5px; }.delivery-scroll::after { right: 5px; }
.delivery-scroll span { color: #a53629; font-family: "Ma Shan Zheng", cursive; font-size: 25px; letter-spacing: .18em; opacity: 0; }
.delivery-trail { position: absolute; z-index: 3; top: 47%; left: 0; width: 100%; }
.delivery-trail i { position: absolute; color: #dc9f34; font-style: normal; opacity: 0; }
.delivery-trail i:nth-child(1) { left: 9%; top: -42px; }.delivery-trail i:nth-child(2) { left: 18%; top: 34px; }.delivery-trail i:nth-child(3) { right: 17%; top: -18px; }.delivery-trail i:nth-child(4) { right: 8%; top: 53px; }
.delivery-caption { position: absolute; z-index: 3; left: 0; right: 0; bottom: 31px; margin: 0; color: #8b6331; text-align: center; font-size: 12px; letter-spacing: .12em; opacity: 0; }
.card-content { position: relative; z-index: 2; width: min(360px, 100%); text-align: center; }
.card-kicker { margin: 0 0 26px; color: #8c7045; font-size: 10px; letter-spacing: .22em; }
.card-content h2 { margin: 0; font-family: "Ma Shan Zheng", cursive; font-size: 35px; font-weight: 400; letter-spacing: .06em; }
.divider { display: flex; align-items: center; gap: 10px; margin: 17px auto 20px; color: var(--cinnabar); }
.divider span { flex: 1; height: 1px; background: currentColor; opacity: .28; }.divider i { font-style: normal; font-size: 11px; }
.wish-copy { min-height: 108px; margin: 0; font-size: 15px; line-height: 2; }
.signature { margin: 24px 0 0; color: #8c7045; font-size: 10px; letter-spacing: .18em; }
.osmanthus { position: absolute; z-index: 1; color: #cf993e; font-size: 15px; line-height: 2.6; opacity: .65; }
.osmanthus-left { left: 27px; top: 116px; transform: rotate(-12deg); }.osmanthus-right { right: 29px; bottom: 76px; transform: rotate(14deg); }
.lantern { position: absolute; top: 65px; width: 31px; text-align: center; color: #f2d18b; }
.lantern i { display: block; height: 24px; border-left: 1px solid #9e3328; }
.lantern span { display: grid; place-items: center; width: 31px; height: 38px; border-radius: 48%; background: #b73b2d; font-size: 11px; box-shadow: 0 5px 12px rgba(104,26,19,.2); }
.lantern-left { left: 37px; animation: lantern-breathe 3s ease-in-out infinite; }.lantern-right { right: 37px; animation: lantern-breathe 3s .6s ease-in-out infinite; }
.theme-playful { background: #f5f2d8; }.theme-playful .card-kicker, .theme-playful .signature { color: #55725b; }.theme-playful .divider { color: #55725b; }
.theme-poetic { background: #edf0eb; color: #263b38; }.theme-poetic .card-kicker, .theme-poetic .signature { color: #527169; }.theme-poetic .divider { color: #527169; }
.wish-card.celebrate .card-moon { animation: moon-rise 1.15s cubic-bezier(.16,.84,.32,1), moon-glow 4.2s 1.15s ease-in-out infinite; }
.wish-card.celebrate .lantern { animation: lantern-swing .7s .35s ease-in-out 4 alternate; transform-origin: top center; }
.wish-card.celebrate .rabbit-delivery { visibility: visible; animation: delivery-stage 4.5s both; }
.wish-card.celebrate .rabbit-delivery::before { animation: delivery-backdrop 4.5s both; }
.wish-card.celebrate .delivery-halo { animation: halo-open 3.1s .65s both; }
.wish-card.celebrate .rabbit-runner { animation: rabbit-enter 4.35s .05s both; }
.wish-card.celebrate .rabbit-character { animation: rabbit-bounce .42s .15s 4 alternate ease-in-out; }
.wish-card.celebrate .delivery-scroll { animation: scroll-open 2.25s 1.42s both; }
.wish-card.celebrate .delivery-scroll span { animation: scroll-words 1.7s 1.78s both; }
.wish-card.celebrate .delivery-trail i { animation: trail-sparkle 1.8s .45s ease-out both; }
.wish-card.celebrate .delivery-trail i:nth-child(2) { animation-delay: .7s; }.wish-card.celebrate .delivery-trail i:nth-child(3) { animation-delay: .9s; }.wish-card.celebrate .delivery-trail i:nth-child(4) { animation-delay: 1.1s; }
.wish-card.celebrate .delivery-caption { animation: caption-in 1.8s 1.65s both; }
.wish-card.celebrate .card-kicker { animation: text-arrive .6s 4.05s both; }
.wish-card.celebrate .card-content h2 { animation: text-arrive .65s 4.2s both; }
.wish-card.celebrate .divider { animation: line-open .6s 4.35s both; }
.wish-card.celebrate .wish-copy { animation: text-arrive .75s 4.5s both; }
.wish-card.celebrate .signature { animation: text-arrive .65s 4.85s both; }
.sparkles span { position: absolute; z-index: 4; top: 50%; left: 50%; color: #d89f39; font-size: 14px; animation: burst .9s ease-out forwards; }
.falling-petals { position: absolute; z-index: 3; inset: 0; overflow: hidden; pointer-events: none; }
.falling-petals i { position: absolute; top: -18px; width: 7px; height: 5px; border-radius: 70% 20% 70% 20%; background: #d89f39; opacity: .58; animation: petal-fall 7s linear infinite; }
.falling-petals i:nth-child(1) { left: 12%; animation-delay: -1s; }.falling-petals i:nth-child(2) { left: 28%; animation-delay: -4.2s; animation-duration: 8.4s; }
.falling-petals i:nth-child(3) { left: 47%; animation-delay: -2.7s; animation-duration: 6.6s; }.falling-petals i:nth-child(4) { left: 63%; animation-delay: -.4s; animation-duration: 8s; }
.falling-petals i:nth-child(5) { left: 79%; animation-delay: -5.4s; animation-duration: 7.4s; }.falling-petals i:nth-child(6) { left: 91%; animation-delay: -3.3s; animation-duration: 9s; }

.parent-response { margin-top: 18px; padding: 17px 18px; border: 1px solid rgba(112,86,49,.2); background: rgba(255,250,240,.66); }
.parent-response > div:first-child { display: flex; align-items: center; gap: 9px; }.parent-response h3 { margin: 0; font-size: 14px; }
.parent-response > p { margin: 6px 0 10px 33px; color: #776e61; font-size: 11px; }
.seal { width: 24px; height: 24px; display: grid; place-items: center; color: var(--cinnabar); border: 1px solid var(--cinnabar); font-size: 11px; }
.response-buttons { display: flex; flex-wrap: wrap; gap: 7px; margin-left: 33px; }
.response-buttons button { padding: 7px 10px; color: #655e55; border: 1px solid #cbbda5; background: rgba(255,255,255,.58); font-size: 11px; }
.response-buttons button:hover { color: var(--cinnabar); border-color: var(--cinnabar); }
.parent-response .response-result { min-height: 16px; margin-bottom: 0; color: var(--cinnabar); }
.toast { position: fixed; z-index: 10; left: 50%; bottom: 28px; padding: 10px 18px; color: #fff9ed; background: #332f29; border: 1px solid #d2a44d; transform: translate(-50%, 80px); opacity: 0; transition: .3s; font-size: 12px; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

@keyframes twinkle { to { opacity: .22; transform: scale(.65); } }
@keyframes lantern-swing { to { transform: rotate(8deg); } }
@keyframes lantern-breathe { 50% { filter: brightness(1.18); transform: translateY(2px); } }
@keyframes moon-glow { 50% { box-shadow: 0 0 68px rgba(225,181,86,.62); filter: brightness(1.05); } }
@keyframes moon-rise { from { transform: translate(-50%, 76px) scale(.78); opacity: .25; } to { transform: translate(-50%, 0) scale(1); opacity: 1; } }
@keyframes rabbit-hop { 0%, 72%, 100% { transform: translateY(0); } 82% { transform: translateY(-7px) rotate(-5deg); } 91% { transform: translateY(0) rotate(3deg); } }
@keyframes delivery-stage { 0%, 96% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
@keyframes delivery-backdrop { 0% { opacity: 0; } 12%, 78% { opacity: 1; } 100% { opacity: 0; } }
@keyframes halo-open { 0% { opacity: 0; transform: translate(-50%,-50%) scale(.3) rotate(0); } 28%, 70% { opacity: .8; transform: translate(-50%,-50%) scale(1) rotate(45deg); } 100% { opacity: 0; transform: translate(-50%,-50%) scale(1.22) rotate(90deg); } }
@keyframes rabbit-enter { 0% { transform: translateX(250px) rotate(9deg); } 22% { transform: translateX(-85px) rotate(-4deg); } 32%, 76% { transform: translateX(-85px) rotate(0); } 100% { transform: translateX(-430px) rotate(-8deg); } }
@keyframes rabbit-bounce { to { transform: translateY(-18px) rotate(-3deg); } }
@keyframes scroll-open { 0%, 10% { opacity: 0; transform: scaleX(.05); } 25%, 78% { opacity: 1; transform: scaleX(1); } 100% { opacity: 0; transform: scaleX(.8) translateY(-5px); } }
@keyframes scroll-words { 0%, 14% { opacity: 0; transform: scale(.8); } 35%, 76% { opacity: 1; transform: scale(1); } 100% { opacity: 0; } }
@keyframes trail-sparkle { 0% { opacity: 0; transform: scale(.2) rotate(0); } 35% { opacity: 1; transform: scale(1.5) rotate(90deg); } 100% { opacity: 0; transform: scale(.4) rotate(180deg) translateY(-20px); } }
@keyframes caption-in { 0%, 15% { opacity: 0; transform: translateY(8px); } 35%, 78% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(-5px); } }
@keyframes cloud-drift { from { translate: 0 0; } to { translate: 560px 0; } }
@keyframes petal-fall { 0% { transform: translate(0,-10px) rotate(0); opacity: 0; } 10% { opacity: .58; } 100% { transform: translate(45px,490px) rotate(520deg); opacity: 0; } }
@keyframes text-arrive { from { opacity: 0; transform: translateY(14px); filter: blur(3px); } to { opacity: 1; transform: translateY(0); filter: blur(0); } }
@keyframes line-open { from { opacity: 0; transform: scaleX(.25); } to { opacity: 1; transform: scaleX(1); } }
@keyframes burst { from { opacity: 1; transform: translate(0,0) scale(.6); } to { opacity: 0; transform: translate(var(--x),var(--y)) scale(1.5); } }

@media (max-width: 520px) {
  .app-shell { width: 100%; min-height: 100vh; box-shadow: none; }
  .composer { padding: 26px 18px 30px; }
  .preview-panel { padding: 24px 12px 28px; }
  .style-option { padding-inline: 2px; }
  .wish-card { min-height: 450px; padding: 72px 30px 46px; }
  .wish-copy { font-size: 14px; }.lantern-left { left: 22px; }.lantern-right { right: 22px; }
  .response-buttons { margin-left: 0; }.parent-response > p { margin-left: 0; }
}

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

/* Immersive moonlit glass direction */
:root {
  --night: #0b1026;
  --night-soft: #1b2450;
  --ink: #f5f0e6;
  --muted: rgba(245,240,230,.62);
  --moon: #f5e6c8;
  --orange: #f2a65a;
  --orange-deep: #e8873a;
  --glass: rgba(255,255,255,.095);
  --glass-line: rgba(255,255,255,.18);
}

body { color: var(--ink); font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif; background: #0b1026; }
.sky { z-index: 0; overflow: hidden; background: radial-gradient(circle at 72% 18%, rgba(82,69,137,.34), transparent 29%), linear-gradient(145deg, #0b1026 0%, #151b3b 54%, #2a1e4a 100%); }
.sky::after { opacity: .12; }
.star { width: 3px; height: 3px; z-index: 2; background: #fff2ca; box-shadow: 0 0 12px 2px rgba(255,226,153,.75); animation: star-pulse 3.2s ease-in-out infinite alternate; }
.star-1 { left: 8%; top: 14%; }.star-2 { left: 41%; top: 8%; animation-delay: .8s; }.star-3 { right: 11%; top: 32%; animation-delay: 1.4s; }.star-4 { left: 21%; bottom: 16%; animation-delay: 2s; }.star-5 { left: 67%; top: 42%; animation-delay: .25s; }.star-6 { right: 31%; top: 12%; animation-delay: 1.75s; }.star-7 { left: 52%; bottom: 24%; animation-delay: 2.4s; }.star-8 { right: 6%; bottom: 23%; animation-delay: 1.1s; }
.sky-moon { position: absolute; z-index: 1; top: 7vh; right: 9vw; width: clamp(190px, 29vw, 370px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 31%, #fff9df 0%, #f7e4b8 48%, #e7c884 77%, #bd8c4c 100%); box-shadow: 0 0 25px rgba(255,232,177,.54), 0 0 80px rgba(239,199,111,.3), 0 0 170px rgba(173,126,78,.18); animation: sky-moon-breathe 6s ease-in-out infinite; }
.sky-moon::before { content: ""; position: absolute; inset: -25%; border-radius: 50%; background: radial-gradient(circle, rgba(255,231,172,.2), transparent 63%); filter: blur(16px); }
.sky-crater { position: absolute; border-radius: 50%; background: rgba(155,111,58,.1); box-shadow: inset 3px 2px 6px rgba(145,92,34,.1); }.sky-crater-a { width: 19%; height: 19%; top: 23%; left: 26%; }.sky-crater-b { width: 12%; height: 12%; top: 55%; left: 59%; }.sky-crater-c { width: 8%; height: 8%; top: 35%; left: 63%; }
.meteor { position: absolute; z-index: 2; width: 90px; height: 1px; opacity: 0; background: linear-gradient(90deg, transparent, rgba(255,236,182,.9)); transform: rotate(-34deg); transform-origin: right center; animation: meteor-fall 8s linear infinite; }.meteor-a { top: 19%; left: 18%; animation-delay: 3.4s; }.meteor-b { top: 33%; left: 64%; width: 65px; animation-delay: 7.1s; }
.distant-roof { position: absolute; z-index: 1; left: -3%; bottom: 7%; width: 54%; height: 100px; opacity: .42; border-top: 2px solid rgba(5,8,20,.8); transform: skewX(-13deg); }.distant-roof::before { content: ""; position: absolute; left: 8%; top: 10px; width: 88%; height: 24px; border-top: 8px solid rgba(5,8,20,.8); border-radius: 50% 50% 0 0; }.distant-roof span { position: absolute; bottom: 0; width: 10px; height: 78px; background: rgba(5,8,20,.76); }.distant-roof span:nth-child(1) { left: 13%; }.distant-roof span:nth-child(2) { left: 47%; }.distant-roof span:nth-child(3) { left: 82%; }
.osmanthus-tree { position: absolute; z-index: 1; right: 2%; bottom: 5%; width: 23%; height: 190px; opacity: .38; }.osmanthus-tree::before { content: ""; position: absolute; bottom: 0; left: 48%; width: 10px; height: 170px; border-radius: 50%; background: rgba(5,8,20,.82); transform: rotate(10deg); }.osmanthus-tree i { position: absolute; width: 75px; height: 45px; border-radius: 50%; background: rgba(5,8,20,.86); }.osmanthus-tree i:nth-child(1) { top: 25px; left: 18%; transform: rotate(-19deg); }.osmanthus-tree i:nth-child(2) { top: 55px; left: 42%; transform: rotate(17deg); }.osmanthus-tree i:nth-child(3) { top: 91px; left: 2%; transform: rotate(10deg); }.osmanthus-tree b { position: absolute; top: 7px; left: 54%; width: 8px; height: 8px; border-radius: 50%; background: #f2a65a; box-shadow: 15px 18px #f2a65a, -29px 25px #e8873a, 30px 50px #f2a65a; }
.sky-lantern { position: absolute; z-index: 2; width: 18px; height: 27px; opacity: .58; animation: sky-lantern-rise 15s ease-in-out infinite; }.sky-lantern::before { content: ""; position: absolute; top: -11px; left: 8px; height: 9px; border-left: 1px solid rgba(242,166,90,.45); }.sky-lantern span { display: block; width: 18px; height: 27px; border-radius: 48%; background: radial-gradient(circle at 45% 38%, #ffe2a0, #f2a65a 42%, #b54c32 100%); box-shadow: 0 0 18px rgba(242,166,90,.8); }.sky-lantern i { position: absolute; bottom: -5px; left: 7px; width: 4px; height: 4px; border-radius: 50%; background: #ffd584; box-shadow: 0 0 8px 2px #f2a65a; }.sky-lantern-a { left: 13%; bottom: -30px; animation-delay: -3s; }.sky-lantern-b { left: 48%; bottom: -60px; transform: scale(.7); animation-delay: -8s; }.sky-lantern-c { right: 17%; bottom: -10px; transform: scale(.55); animation-delay: -12s; }
.mist { position: absolute; z-index: 2; left: -15%; bottom: -2%; width: 130%; height: 130px; border-radius: 50%; background: rgba(211,218,230,.1); filter: blur(18px); animation: mist-drift 18s ease-in-out infinite alternate; }.mist-b { bottom: -7%; opacity: .45; animation-delay: -7s; animation-duration: 23s; }
.cloud { opacity: .12; }

.app-shell { width: min(100%, 430px); background: transparent; box-shadow: none; }
.masthead { min-height: 102px; padding: 20px 22px 16px; background: rgba(9,14,34,.34); border: 1px solid var(--glass-line); border-top: 0; border-radius: 0 0 26px 26px; box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 12px 34px rgba(0,0,0,.18); backdrop-filter: blur(14px) saturate(140%); }
.brand-mark { border-color: rgba(255,226,164,.72); color: var(--moon); box-shadow: 0 0 22px rgba(245,230,200,.18); }.eyebrow { color: rgba(245,240,230,.64); }.masthead h1 { color: var(--moon); text-shadow: 0 0 20px rgba(255,225,161,.34); }.workspace { background: transparent; }
.composer, .preview-panel { background: transparent; border: 0; }
.composer { padding: 26px 18px 28px; }
.step-block, .parent-response, .preview-panel, .wish-card { position: relative; border: 1px solid var(--glass-line); border-radius: 24px; background: var(--glass); backdrop-filter: blur(20px) saturate(140%); box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 8px 32px rgba(0,0,0,.35); }
.step-block { padding: 18px 17px 17px; margin-bottom: 14px; }.step-block::before, .parent-response::before, .wish-card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(115deg, rgba(255,255,255,.16), transparent 34%, transparent 76%, rgba(245,205,128,.1)); opacity: .75; }
.step-heading h2, .step-heading strong { color: var(--moon); }.step-heading p, .step-heading small, .field-label { color: var(--muted); }.step-number { border-color: var(--orange); color: var(--orange); }
.input-wrap input, .input-wrap textarea { border: 1px solid rgba(255,255,255,.2); border-radius: 14px; background: rgba(0,0,0,.18); color: var(--ink); padding: 13px 58px 13px 14px; box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }.input-wrap input::placeholder, .input-wrap textarea::placeholder { color: rgba(245,240,230,.4); }.input-wrap input:focus, .input-wrap textarea:focus { border-color: rgba(242,166,90,.85); box-shadow: 0 0 0 3px rgba(242,166,90,.13); }.counter { color: rgba(245,240,230,.5); }
.quick-list button, .response-buttons button { min-height: 40px; padding: 8px 12px; border: 1px solid rgba(255,255,255,.2); border-radius: 12px; color: rgba(245,240,230,.78); background: rgba(255,255,255,.06); }.quick-list button:hover, .response-buttons button:hover { color: #fff4d7; border-color: rgba(242,166,90,.8); background: rgba(242,166,90,.16); }
.style-option { min-height: 98px; padding: 12px 4px; border: 1px solid rgba(255,255,255,.17); border-radius: 16px; color: var(--ink); background: rgba(255,255,255,.055); }.style-option:has(input:checked) { border-color: var(--orange); background: rgba(242,166,90,.15); box-shadow: inset 0 0 0 1px rgba(242,166,90,.68), 0 0 20px rgba(242,166,90,.12); }.style-option b { color: var(--moon); }.style-option small { color: var(--muted); }.style-icon { background: rgba(245,230,200,.16); color: var(--moon); }.style-option.playful .style-icon { background: rgba(165,204,159,.17); color: #d3eac2; }.style-option.poetic .style-icon { background: rgba(166,195,194,.17); color: #cae1df; }
.generate-button { position: relative; overflow: hidden; min-height: 54px; border-radius: 16px; background: linear-gradient(135deg, #e8873a, #f2a65a); color: #241a16; box-shadow: 0 10px 28px rgba(232,135,58,.28), inset 0 1px 0 rgba(255,255,255,.45); transition: transform .3s ease-out, filter .3s ease-out; }.generate-button::after { content: ""; position: absolute; top: 0; left: -90%; width: 45%; height: 100%; transform: skewX(-18deg); background: rgba(255,255,255,.32); transition: left .55s ease-out; }.generate-button:hover { transform: scale(1.03); filter: brightness(1.08); }.generate-button:hover::after { left: 135%; }.button-moon { background: #fff4ce; box-shadow: inset 4px 0 #e8873a; }
.preview-panel { padding: 4px 18px 30px; }.preview-topline { color: rgba(245,240,230,.6); }.preview-topline span:last-child { color: var(--orange); }
.wish-card { min-height: 460px; border-radius: 28px; color: var(--ink); background: linear-gradient(145deg, rgba(245,230,200,.15), rgba(24,31,69,.32)); box-shadow: inset 0 1px 0 rgba(255,255,255,.26), 0 18px 50px rgba(0,0,0,.35); }.wish-card::after { border-color: rgba(245,207,128,.19); box-shadow: 0 0 0 30px rgba(245,207,128,.05), 0 0 0 62px rgba(245,207,128,.025); }.wish-card::before { border: 1px solid rgba(255,255,255,.14); inset: 12px; background: none; }.card-kicker, .signature { color: rgba(245,230,200,.7); }.card-content h2 { color: var(--moon); text-shadow: 0 0 20px rgba(255,226,167,.3); }.divider { color: var(--orange); }.wish-copy { color: #f5f0e6; text-shadow: 0 1px 9px rgba(0,0,0,.38); }.osmanthus { color: #f2a65a; opacity: .48; }.lantern span { background: radial-gradient(circle at 40% 35%, #f8cf83, #e8873a 50%, #9b3d35 100%); box-shadow: 0 0 15px rgba(242,166,90,.45); }
.theme-playful, .theme-poetic { background: linear-gradient(145deg, rgba(245,230,200,.15), rgba(24,31,69,.32)); color: var(--ink); }.theme-playful .card-kicker, .theme-playful .signature, .theme-poetic .card-kicker, .theme-poetic .signature { color: rgba(245,230,200,.7); }.theme-playful .divider, .theme-poetic .divider { color: var(--orange); }
.parent-response { padding: 18px; color: var(--ink); }.parent-response h3 { color: var(--moon); }.parent-response > p { color: var(--muted); }.seal { border-color: var(--orange); color: var(--orange); }.parent-response .response-result { color: #ffd794; }
.toast { border-radius: 14px; color: #221711; background: rgba(255,225,164,.92); border: 1px solid rgba(255,255,255,.45); box-shadow: 0 8px 24px rgba(0,0,0,.3); }
.masthead { animation: scene-in .75s ease-out both; }.composer .step-block:nth-child(1) { animation: scene-in .65s .12s ease-out both; }.composer .step-block:nth-child(2) { animation: scene-in .65s .22s ease-out both; }.composer .style-step { animation: scene-in .65s .32s ease-out both; }.generate-button { animation: scene-in .65s .42s ease-out both; }.preview-panel { animation: scene-in .75s .3s ease-out both; }

@keyframes star-pulse { from { opacity: .28; transform: scale(.7); } to { opacity: 1; transform: scale(1.5); } }
@keyframes sky-moon-breathe { 50% { filter: brightness(1.06); box-shadow: 0 0 38px rgba(255,232,177,.68), 0 0 110px rgba(239,199,111,.38), 0 0 200px rgba(173,126,78,.2); } }
@keyframes meteor-fall { 0%, 78% { opacity: 0; transform: translate(0,0) rotate(-34deg); } 82% { opacity: .9; } 90%, 100% { opacity: 0; transform: translate(120px,72px) rotate(-34deg); } }
@keyframes sky-lantern-rise { 0% { opacity: 0; transform: translate(0,30px) rotate(-3deg); } 14% { opacity: .58; } 50% { transform: translate(12px,-36vh) rotate(4deg); } 100% { opacity: 0; transform: translate(-7px,-78vh) rotate(-3deg); } }
@keyframes mist-drift { from { transform: translateX(-6%); } to { transform: translateX(7%); } }
@keyframes scene-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 520px) {
  .sky-moon { top: 6vh; right: -30px; width: 230px; }.distant-roof { bottom: 5%; width: 58%; }.osmanthus-tree { right: -6%; transform: scale(.78); transform-origin: bottom right; }.sky-lantern-b { display: none; }.composer { padding-top: 22px; }.step-block { padding: 16px 14px 15px; }.preview-panel { padding-inline: 12px; }.wish-card { min-height: 470px; }
}

.presentation[hidden], .presentation-video[hidden], .presentation-card[hidden] { display: none; }
.presentation-open { overflow: hidden; }
.presentation { position: fixed; z-index: 30; inset: 0; background: rgba(5,8,23,.97); }
.presentation-video, .presentation-card { position: absolute; inset: 0; display: grid; place-items: center; }
.presentation-video video { display: block; width: min(100%, 430px); height: 100%; object-fit: cover; object-position: center; background: #080c19; }
.presentation-action { position: absolute; z-index: 2; min-width: 48px; min-height: 48px; border: 1px solid rgba(255,255,255,.4); border-radius: 24px; color: #fff6e2; background: rgba(10,15,37,.6); backdrop-filter: blur(10px); box-shadow: 0 8px 24px rgba(0,0,0,.24); }
.presentation-action:focus-visible { outline: 2px solid #ffe9b8; outline-offset: 3px; }
.video-skip { right: max(16px, env(safe-area-inset-right)); bottom: max(24px, env(safe-area-inset-bottom)); padding: 0 18px; font-size: 14px; }
.card-close { top: max(14px, env(safe-area-inset-top)); right: max(14px, env(safe-area-inset-right)); width: 48px; padding: 0; font-size: 30px; line-height: 1; }
.presentation-card { overflow-y: auto; padding: max(68px, env(safe-area-inset-top)) 16px max(28px, env(safe-area-inset-bottom)); background: radial-gradient(circle at 50% 22%, rgba(245,210,146,.15), transparent 45%), linear-gradient(150deg,#0b1026,#25214b); }
.presented-card { width: min(100%, 430px); margin: auto; animation: scene-in .65s ease-out both; }
.presented-card .wish-card { min-height: min(610px, calc(100svh - 110px)); padding: 84px 32px 50px; }
.presented-card .card-content { width: min(360px,100%); transform: translateY(-25px); }
.presented-card .wish-copy { font-size: 16px; line-height: 2.1; }
.card-brand { position: absolute; z-index: 5; left: 28px; bottom: 22px; width: 98px; height: auto; filter: drop-shadow(0 2px 5px rgba(0,0,0,.28)); }
.card-characters { position: absolute; z-index: 3; right: 25px; bottom: 55px; left: 25px; display: flex; align-items: flex-end; justify-content: space-between; pointer-events: none; }
.card-character { display: block; height: auto; filter: drop-shadow(0 5px 10px rgba(2,7,28,.28)); animation: character-float 3.5s ease-in-out infinite; }
.character-blue { width: 145px; }.character-red { width: 88px; animation-delay: -1.6s; }
@keyframes character-float { 50% { transform: translateY(-5px); } }
@media (max-width: 520px) {
  .presented-card .wish-card { min-height: min(610px, calc(100svh - 110px)); padding: 72px 26px 42px; }
  .presented-card .wish-copy { font-size: 14px; }
}
@media (max-width: 350px) {
  .card-characters { right: 22px; left: 22px; }
  .character-blue { width: 125px; }.character-red { width: 76px; }
}

/* Single-screen entry and mobile card maker */
.entry-cover[hidden], .app-shell[hidden] { display: none; }
.cover-open { overflow: hidden; }
.entry-cover { position: fixed; z-index: 20; top: 0; bottom: 0; left: 50%; width: min(100%, 430px); transform: translateX(-50%); overflow: hidden; background: #735025; }
.entry-cover img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center center; }
.entry-cover::after { content: ""; position: absolute; inset: 66% 0 0; pointer-events: none; background: linear-gradient(transparent, rgba(25,18,15,.46)); }
.cover-start { position: absolute; z-index: 1; right: max(17px, env(safe-area-inset-right)); bottom: max(40px, calc(env(safe-area-inset-bottom) + 24px)); min-height: 54px; padding: 0 17px 0 21px; border: 1px solid rgba(255,240,194,.8); border-radius: 27px; color: #fff5d7; background: rgba(32,26,25,.67); box-shadow: 0 7px 24px rgba(16,13,10,.26), inset 0 1px rgba(255,255,255,.2); backdrop-filter: blur(12px); font-size: 15px; font-weight: 700; text-shadow: 0 1px 5px rgba(0,0,0,.4); transition: transform .25s ease-out, background .25s ease-out; }
.cover-start:hover { transform: scale(1.03); background: rgba(38,28,24,.8); }
.cover-start span { display: inline-block; margin-left: 8px; font-size: 21px; vertical-align: -1px; }
.cover-start:focus-visible, .back-cover:focus-visible { outline: 2px solid #ffe9b8; outline-offset: 3px; }
.back-cover { width: 42px; height: 42px; padding: 0; border: 1px solid rgba(245,230,200,.36); border-radius: 50%; color: var(--moon); background: rgba(255,255,255,.08); font-size: 23px; line-height: 1; }
.masthead { grid-template-columns: auto auto 1fr; justify-content: start; gap: 12px; min-height: 78px; padding: 12px 18px; }
.masthead h1 { font-size: 26px; }.brand-mark { width: 36px; height: 36px; font-size: 20px; }
.preview-panel { display: none; }
.composer { padding: 15px 16px 24px; }
.composer .step-block { margin-bottom: 11px; padding: 13px 14px 14px; }
.step-heading { gap: 11px; margin-bottom: 10px; }.step-heading h2, .step-heading strong { font-size: 16px; }.step-heading p, .step-heading small { margin-top: 2px; }
.field-label { margin-bottom: 5px; }.input-wrap input, .input-wrap textarea { min-height: 46px; padding-block: 9px; }.input-wrap textarea { height: 74px; }
.quick-list { gap: 6px; margin-top: 7px; }.quick-list button { min-height: 38px; padding: 6px 10px; }
.style-option { min-height: 78px; padding: 8px 3px; }.style-icon { width: 25px; height: 25px; margin-bottom: 3px; font-size: 16px; }.style-option small { font-size: 10px; }
.form-error { margin: -4px 0 5px; }.generate-button { min-height: 52px; }
.app-shell { padding-bottom: 0; }
.composer .step-block:first-child { background: rgba(14,21,49,.7); }
@media (max-width: 380px) {
  .composer { padding-inline: 12px; }.composer .step-block { padding-inline: 12px; }.quick-list button { padding-inline: 8px; font-size: 10px; }
}

/* Full artwork on every phone ratio, with a separate action area */
.entry-cover { background: #5d3f28; }
.entry-cover::before { content: ""; position: absolute; inset: -5%; background: url("assets/mid-autumn-cover.png") center / cover no-repeat; filter: blur(24px) brightness(.55); transform: scale(1.04); }
.entry-cover img { position: relative; z-index: 1; height: calc(100% - 90px); object-fit: contain; }
.entry-cover::after { z-index: 2; inset: auto 0 0; height: 115px; background: linear-gradient(transparent, rgba(22,17,17,.72)); }
.cover-start { z-index: 3; }
.entry-cover::before { display: none; }
.entry-cover .cover-art { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.entry-cover .cover-brand { position: absolute; z-index: 3; top: max(18px, env(safe-area-inset-top)); left: max(16px, env(safe-area-inset-left)); width: clamp(146px, 43vw, 178px); height: auto; filter: drop-shadow(0 2px 7px rgba(0,0,0,.6)); }

.recipient-step, .blessing-step { min-width: 0; }
.recipient-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.recipient-option, .blessing-option { position: relative; display: block; min-width: 0; cursor: pointer; }
.recipient-option input, .blessing-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.recipient-option span, .blessing-option span { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 52px; padding: 9px 5px; border: 1px solid rgba(255,255,255,.2); border-radius: 13px; color: #f5f0e6; background: rgba(12,18,45,.46); text-align: center; font-size: 13px; line-height: 1.45; transition: background .22s ease-out, border-color .22s ease-out, transform .22s ease-out; }
.recipient-option input:checked + span, .blessing-option input:checked + span { color: #fff6df; border-color: #f2a65a; background: rgba(242,166,90,.2); box-shadow: inset 0 0 0 1px rgba(242,166,90,.34), 0 0 18px rgba(242,166,90,.12); }
.recipient-option input:focus-visible + span, .blessing-option input:focus-visible + span { outline: 2px solid #ffe9b8; outline-offset: 3px; }
.recipient-option:hover span, .blessing-option:hover span { transform: translateY(-2px); }
.blessing-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.blessing-option span { justify-content: flex-start; min-height: 94px; padding: 11px 12px; text-align: left; font-size: 12px; line-height: 1.55; }
.composer .step-block:first-child { background: rgba(14,21,49,.72); }
.composer .blessing-step { background: rgba(14,21,49,.67); }
.composer { padding-bottom: 16px; }
.form-error { margin-top: 0; }

@media (max-width: 360px) {
  .recipient-grid, .blessing-list { gap: 6px; }
  .recipient-option span { font-size: 12px; }
  .blessing-option span { padding: 9px; font-size: 11px; }
}
@media (max-width: 340px) {
  .recipient-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .blessing-list { grid-template-columns: 1fr; }
  .blessing-option span { min-height: 56px; padding: 10px 12px; font-size: 13px; }
}
