:root{--pink:#f6c6dc;--pink2:#ff9ec7;--blue:#b9dcff;--blue2:#7fb2ff;--ink:#3b3363;--paper:#fff7fb;--win:#e9e4f7;--edge:#8c86b8;
  --font:"DotGothic16","VT323","Microsoft YaHei","PingFang SC",monospace}
*{box-sizing:border-box}
html{color-scheme:only light;background:#fff}
html,body{margin:0;height:100%;overflow:hidden;font-family:var(--font);color:var(--ink);-webkit-tap-highlight-color:transparent}
body{background:linear-gradient(170deg,#ffd9ec 0%,#e6dcff 40%,#bfe0ff 75%,#d9f4ff 100%);color-scheme:only light}
@media (prefers-color-scheme:dark){html{background:#fff;color-scheme:only light}body{background:linear-gradient(170deg,#ffd9ec 0%,#e6dcff 40%,#bfe0ff 75%,#d9f4ff 100%);color:var(--ink)}}
button{font:inherit;color:inherit}
.hidden{display:none!important}
/* 梦核雾 */
#sky{position:fixed;inset:0;pointer-events:none;overflow:hidden;transform:translateZ(0);contain:layout style}
.fog{position:absolute;border-radius:50%;filter:blur(60px);opacity:.55;mix-blend-mode:screen;animation:drift 40s ease-in-out infinite alternate;transform:translateZ(0);backface-visibility:hidden;will-change:transform}
.f1{width:60vw;height:60vw;left:-10vw;top:-10vw;background:#fff}
.f2{width:50vw;height:50vw;right:-10vw;top:30vh;background:#ffc4e1;animation-duration:55s}
.f3{width:70vw;height:40vw;left:20vw;bottom:-15vw;background:#c5e4ff;animation-duration:65s}
@keyframes drift{to{transform:translate(8vw,6vh) scale(1.15)}}
#sparkles{position:fixed;inset:0;pointer-events:none;transform:translateZ(0);contain:layout style}
.spark{position:absolute;color:#fff;text-shadow:0 0 6px #fff,0 0 12px var(--pink2);animation:twinkle 3s ease-in-out infinite}
@keyframes twinkle{50%{opacity:.15;transform:scale(.6)}}
/* CRT */
#crt{position:fixed;inset:0;pointer-events:none;z-index:9999;
  background:repeating-linear-gradient(0deg,rgba(60,40,90,.07) 0 1px,transparent 1px 3px),radial-gradient(ellipse at center,transparent 55%,rgba(70,40,110,.28) 100%);
  animation:flick 6s infinite}
@keyframes flick{0%,97%,100%{opacity:1}98%{opacity:.85}}
/* 开机 */
#boot{position:fixed;inset:0;background:#1b1631;color:#c9f3ff;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;padding:8vw;z-index:50}
#bootText{font-family:"VT323",var(--font);font-size:clamp(16px,2.6vw,24px);white-space:pre-wrap;text-shadow:0 0 6px #7fd7ff,2px 0 rgba(255,120,200,.5);min-height:10em}
.btn{background:var(--win);border:2px solid;border-color:#fff var(--edge) var(--edge) #fff;padding:6px 14px;cursor:pointer;box-shadow:1px 1px 0 #5a5486}
.btn:active{border-color:var(--edge) #fff #fff var(--edge)}
.btn.small{padding:2px 8px;font-size:13px}
#bootBtn{font-size:18px;color:var(--ink);animation:blink 1.2s steps(2) infinite}
@keyframes blink{50%{opacity:.4}}
/* 桌面 */
#desktop{position:fixed;inset:0;padding-bottom:44px}
#hero{position:absolute;left:50%;top:6vh;transform:translateX(-50%);text-align:center;pointer-events:none;width:90vw}
.hero-title{font-family:"VT323",var(--font);font-size:clamp(40px,9vw,110px);letter-spacing:.08em;color:#fff;
  text-shadow:3px 0 var(--pink2),-3px 0 var(--blue2),0 0 24px rgba(255,255,255,.9);animation:wobble 5s ease-in-out infinite}
.hero-sub{font-size:clamp(18px,3.4vw,34px);color:#fff;text-shadow:0 0 10px #c8a2ff;letter-spacing:.3em}
.hero-to{margin-top:6px;font-size:clamp(14px,2vw,18px);color:#6a5fa8;opacity:.85}
@keyframes wobble{50%{transform:skewX(-2deg) translateY(4px);filter:blur(.4px)}}
#icons{position:absolute;left:14px;top:14px;display:grid;grid-template-columns:repeat(1,112px);gap:10px;z-index:2}
.icon{background:none;border:0;display:flex;flex-direction:column;align-items:center;gap:6px;padding:4px 2px;cursor:pointer;font-size:13px;color:#3b3363;text-shadow:0 1px 0 #fff}
.icon .ico{width:76px;height:76px;display:flex;align-items:center;justify-content:center;font-size:44px;border-radius:24px;
  border:3px solid #fff;box-shadow:0 0 0 3px #3b3363,4px 6px 0 3px rgba(59,51,99,.35),inset 0 -8px 0 rgba(0,0,0,.08),inset 0 6px 0 rgba(255,255,255,.55);
  image-rendering:pixelated;transition:transform .15s;position:relative}
.icon .ico::after{content:"";position:absolute;top:8px;left:12px;width:14px;height:8px;border-radius:50%;background:rgba(255,255,255,.75)}
.t-map{background:linear-gradient(#c8f2d8,#8fdcb4)}.t-mail{background:linear-gradient(#ffd6e8,#ffa8cc)}.t-drawer{background:linear-gradient(#ffe8c4,#f8c98a)}
.t-star{background:linear-gradient(#fff6b8,#ffd86a)}.t-readme{background:linear-gradient(#e0ecff,#a9c7ff)}.t-trash{background:linear-gradient(#ece2ff,#c6b2f5)}
.icon:hover .ico,.icon:focus .ico{transform:translateY(-4px) rotate(-4deg) scale(1.05)}
.icon:active .ico{transform:scale(.92)}
.icon span:last-child{padding:1px 6px;border-radius:8px;background:rgba(255,255,255,.55)}
.icon:hover span:last-child,.icon:focus span:last-child{background:#6e63c6;color:#fff;text-shadow:none}
/* 窗口 */
.win{position:absolute;display:none;flex-direction:column;background:var(--win);border:2px solid;border-color:#fff #5a5486 #5a5486 #fff;
  box-shadow:4px 4px 0 rgba(70,50,130,.35),0 0 40px rgba(255,190,230,.5);min-width:280px;max-width:94vw;max-height:calc(100vh - 70px);z-index:10}
.win.open{display:flex;animation:pop .25s ease-out}
@keyframes pop{from{transform:scale(.9);opacity:0;filter:blur(4px)}}
.titlebar{display:flex;align-items:center;gap:6px;padding:3px 4px 3px 8px;background:linear-gradient(90deg,#8f7fe0,#f3a6cf);color:#fff;cursor:move;user-select:none;touch-action:none;font-size:14px}
.titlebar .t{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.titlebar button{width:22px;height:20px;padding:0;line-height:14px;font-size:13px}
.win .content{padding:10px;overflow:auto;flex:1}
.hint{font-size:13px;margin:8px 0 0;opacity:.8}
/* 地图 */
#win-map{width:680px}
.map{position:relative;width:100%;aspect-ratio:16/10;background:#efe6ff;border:2px inset #fff;overflow:hidden}
.map-bg,.map-art{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:0;display:block}
#mapPath{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:1;overflow:visible}
.pin{position:absolute;transform:translate(-50%,-27px);background:none;border:0;cursor:pointer;text-align:center;font-size:12px;padding:0;z-index:2}
.pin:hover,.pin:focus{z-index:5}
.pin .p{position:relative;display:block;width:48px;height:48px;margin:auto;border-radius:50%;
  background:linear-gradient(180deg,#fffafd 0%,#ffe4f2 100%);
  border:3px solid var(--pink2);
  box-shadow:0 0 0 4px rgba(255,158,199,.28),0 3px 8px rgba(120,80,170,.22),inset 0 2px 0 rgba(255,255,255,.85);
  animation:pinpulse 2.6s ease-in-out infinite;overflow:visible}
.pin .p::after{content:"";position:absolute;left:8px;top:5px;width:18px;height:11px;border-radius:50%;
  background:linear-gradient(180deg,rgba(255,255,255,.9),rgba(255,255,255,0));pointer-events:none}
.pin .p svg{width:42px;height:42px;display:block;margin:3px auto 0;position:relative;z-index:1}
.pin.seen .p{border-color:var(--blue2);box-shadow:0 0 0 4px rgba(127,178,255,.3),0 3px 8px rgba(80,110,180,.22),inset 0 2px 0 rgba(255,255,255,.85)}
.pin .c{display:inline-block;margin-top:5px;background:rgba(255,255,255,.92);padding:1px 7px;border-radius:8px;
  border:1px solid rgba(255,158,199,.45);font-family:"VT323","Noto Sans SC",sans-serif;font-size:13px;
  white-space:nowrap;letter-spacing:.02em;color:var(--ink);box-shadow:0 1px 0 rgba(255,255,255,.9),0 1px 3px rgba(80,60,130,.12)}
@keyframes pinpulse{50%{box-shadow:0 0 0 8px rgba(255,158,199,0),0 3px 8px rgba(120,80,170,.18),inset 0 2px 0 rgba(255,255,255,.85)}}
.pin.seen{/* keep seen pulse in blue */ }
.pin.seen .p{animation-name:pinpulseBlue}
@keyframes pinpulseBlue{50%{box-shadow:0 0 0 8px rgba(127,178,255,0),0 3px 8px rgba(80,110,180,.18),inset 0 2px 0 rgba(255,255,255,.85)}}
.map-story{margin-top:8px;background:var(--paper);border:2px dashed var(--pink2);padding:10px;white-space:pre-wrap;line-height:1.7}
.map-story h4{margin:0 0 4px}
/* 信箱 */
#win-mail{width:520px}
.mail-list{list-style:none;margin:0;padding:0}
.mail-list li{display:flex;gap:10px;align-items:center;padding:8px;border-bottom:1px dotted var(--edge);cursor:pointer}
.mail-list li:hover{background:#fff}
.mail-list .env{font-size:26px}
.mail-list li.unread .t{font-weight:bold}
.mail-list li.unread .env::after{content:"●";color:var(--pink2);font-size:10px;vertical-align:top}
.mail-list li.locked{opacity:.6}
.mail-list li.mail-gap{display:block;cursor:default;pointer-events:none;text-align:center;padding:2px 0 4px;font-size:22px;line-height:1;letter-spacing:0;color:#a796d6;user-select:none}
.mail-list li.mail-gap:hover{background:none}
.letter{background:var(--paper) repeating-linear-gradient(transparent 0 27px,#f2d6e6 27px 28px);padding:14px 16px;border:1px solid #e3c2d6;line-height:28px;white-space:pre-wrap;box-shadow:inset 0 0 30px rgba(255,200,230,.5);margin-top:8px}
.letter .meta{font-size:12px;opacity:.7}
/* 抽屉 */
#win-drawer{width:600px}
.drawer{perspective:700px}
.drawer-front{display:flex;flex-direction:column;align-items:center;justify-content:center;height:70px;background:linear-gradient(#d9c6a8,#b99f7b);border:3px outset #e8d6b9;cursor:pointer;position:relative;z-index:2}
.knob{width:60px;height:12px;border-radius:6px;background:#7d6447;box-shadow:inset 0 2px 2px #4a3a27}
.label{margin-top:6px;font-size:12px;background:#fff8e8;padding:0 6px;border:1px solid #a68b66}
.drawer-body{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;padding:0 12px;max-height:0;overflow:hidden;background:#efe3cf;border:3px inset #d9c6a8;border-top:0;transition:max-height .8s cubic-bezier(.2,.9,.3,1.2),padding .8s}
.drawer.open .drawer-body{max-height:900px;padding:14px 12px}
.polaroid{background:#fff;padding:6px 6px 22px;box-shadow:2px 3px 6px rgba(0,0,0,.25);cursor:pointer;position:relative;transition:transform .3s}
.polaroid:nth-child(odd){transform:rotate(-3deg)}.polaroid:nth-child(even){transform:rotate(2.5deg)}
.polaroid:hover{transform:rotate(0) scale(1.06);z-index:3}
.polaroid .ph{aspect-ratio:1;background:repeating-linear-gradient(45deg,#f9e2ef 0 8px,#e5efff 8px 16px);display:flex;align-items:center;justify-content:center;text-align:center;font-size:11px;color:#8a7bb5;overflow:hidden}
.polaroid img{width:100%;height:100%;object-fit:cover;filter:saturate(.85) contrast(.95) sepia(.12)}
.polaroid .cap{position:absolute;left:0;right:0;bottom:3px;font-size:11px;text-align:center}
.polaroid .tag{position:absolute;top:-6px;left:50%;transform:translateX(-50%) rotate(-4deg);background:rgba(255,200,225,.8);padding:0 8px;font-size:10px}
#win-photo{width:480px}
#photoBig .ph,#photoBig img{width:100%;max-height:70vh;object-fit:contain;aspect-ratio:auto;min-height:240px;display:flex;align-items:center;justify-content:center;background:repeating-linear-gradient(45deg,#f9e2ef 0 8px,#e5efff 8px 16px)}
#photoBig p{white-space:pre-wrap}
#photoBig .pcap{position:relative;display:table;margin:12px auto 4px;max-width:calc(100% - 24px);padding:7px 16px 6px;font-family:"DotGothic16",var(--font);font-size:16px;line-height:1.5;letter-spacing:.04em;color:#3b3363;text-align:center;
  background:linear-gradient(180deg,#fff7fb,#fde9f4);border:2px dashed #e7a3c6;border-radius:10px;box-shadow:3px 3px 0 rgba(155,120,200,.25);transform:rotate(-1.2deg)}
#photoBig .pcap::before{content:"";position:absolute;top:-9px;left:50%;width:54px;height:15px;transform:translateX(-50%) rotate(3deg);background:rgba(255,200,225,.85);box-shadow:0 1px 2px rgba(0,0,0,.08)}
#photoBig .pcap-k{color:#c46a9c}
#photoBig .pcap-v{color:#4a3f7a}
/* 抓星星 */
#win-star{width:560px}
.game-bar{display:flex;gap:8px;align-items:center;justify-content:space-between;margin-bottom:6px;font-size:14px;
  padding:4px 6px 5px;background:linear-gradient(180deg,#f7f1ff,#e6dcf8);border:2px inset #fff;border-radius:4px}
.game-bar #starMsg{flex:1;text-align:center;min-width:0;font-size:13px;line-height:1.35}
.game-score{display:flex;align-items:center;gap:6px;white-space:nowrap;font-family:"VT323",var(--font);font-size:18px;letter-spacing:.04em}
.gems{display:inline-flex;gap:3px;align-items:center}
.gems i{width:10px;height:10px;border-radius:50%;background:#b7a8d8;box-shadow:inset 0 0 0 1px #3b3363;display:inline-block;opacity:.45}
.gems i.on{background:radial-gradient(circle at 35% 30%,#fff 0,#fff6a8 45%,#ff9ec7 100%);opacity:1;box-shadow:0 0 0 1px #3b3363,0 0 8px 2px #fff6a8}
.streak{font-family:"VT323",var(--font);font-size:16px;color:#6e63c6;text-shadow:0 0 6px #ffd0ea;white-space:nowrap;flex-shrink:0}
.game{position:relative;height:340px;background:linear-gradient(180deg,#1c1440,#3a2878 45%,#2a163f);overflow:hidden;touch-action:none;cursor:crosshair;
  border:2px solid #fff6b8;box-shadow:inset 0 0 0 2px #5a3a88,inset 0 0 48px rgba(255,158,199,.16),inset 0 -30px 50px rgba(40,20,70,.35)}
.game-sky{position:absolute;inset:0;z-index:0;pointer-events:none;overflow:hidden}
.game-sky .sky-art{width:100%;height:100%;display:block}
.game-sky.react #skyAurora{animation:aurorapulse .9s ease-out}
@keyframes aurorapulse{0%{opacity:.85;filter:brightness(1)}40%{opacity:1;filter:brightness(1.35) saturate(1.25)}100%{opacity:1;filter:brightness(1)}}
#skyMoon{transform-box:fill-box;transform-origin:center;transition:filter .4s}
#skyMoon.glow{filter:drop-shadow(0 0 10px #fffcea) drop-shadow(0 0 18px #ffd0ea)}
.sky-dot{animation:skytw 2.8s ease-in-out infinite;transform-box:fill-box;transform-origin:center}
@keyframes skytw{0%,100%{opacity:.3}50%{opacity:1}}
.sky-cloud{animation:skycloud 36s linear infinite}
.sky-cloud.c2{animation-duration:48s;animation-direction:alternate}
@keyframes skycloud{0%{transform:translateX(0)}50%{transform:translateX(18px)}100%{transform:translateX(-10px)}}
.game-fx{position:absolute;inset:0;z-index:1;pointer-events:none;width:100%;height:100%}
.wish-sky{position:absolute;left:8px;bottom:6px;width:128px;z-index:1;pointer-events:none;opacity:.95}
.wish-svg{width:100%;height:86px;display:block;overflow:visible;filter:drop-shadow(0 0 6px rgba(255,246,184,.4))}
.wish-lines line{stroke:rgba(255,246,184,.16);stroke-width:1.15}
.wish-lines line.on{stroke:rgba(255,236,180,.7);filter:drop-shadow(0 0 3px #fff6a8)}
.wish-jewel{fill:#9b8ec8;opacity:.38}
.wish-jewel.lit{fill:url(#wishGem);opacity:1;filter:drop-shadow(0 0 5px #fff6a8)}
.wish-jewel.just{animation:jewellin .55s ease-out}
@keyframes jewellin{from{transform:scale(.2);opacity:0}to{transform:scale(1);opacity:1}}
.wish-jewel{transform-box:fill-box;transform-origin:center}
.wish-cap{display:block;text-align:center;font-size:10px;color:#ffe9c8;opacity:.8;margin-top:-4px;text-shadow:0 0 6px #1c1440,0 0 1px #3b3363;letter-spacing:.12em}
.jewel-fly{position:absolute;z-index:5;pointer-events:none;color:#fff6a8;text-shadow:0 0 10px #fff,0 0 16px #ff9ec7;font-size:22px;
  transform:translate(-50%,-50%);transition:left .5s cubic-bezier(.2,.85,.2,1),top .5s cubic-bezier(.2,.85,.2,1),opacity .5s,transform .5s}
.game-peek{position:absolute;right:14px;bottom:-36px;width:54px;height:44px;z-index:2;pointer-events:none;opacity:0;
  filter:drop-shadow(0 0 6px rgba(255,240,220,.7))}
.game-peek.show{opacity:1;animation:ypeek .95s ease-out}
@keyframes ypeek{0%{transform:translateY(0);opacity:0}35%{transform:translateY(-32px);opacity:1}80%{transform:translateY(-28px);opacity:1}100%{transform:translateY(8px);opacity:0}}
.miss-rip{position:absolute;width:18px;height:18px;margin:-9px 0 0 -9px;border:2px solid rgba(255,246,184,.75);border-radius:50%;pointer-events:none;z-index:4;animation:rip .48s ease-out forwards}
@keyframes rip{to{transform:scale(2.8);opacity:0}}
.star{position:absolute;left:50%;top:50%;font-size:40px;color:#fff6a8;text-shadow:0 0 10px #fff,0 0 22px #ffd36e;transform:translate(-50%,-50%);cursor:pointer;user-select:none;padding:12px;z-index:3;line-height:1}
.star::after{content:"";position:absolute;inset:-8px}
.star.peek-l::after{left:0;right:-28px}
.star.peek-r::after{right:0;left:-28px}
.star.peek-t::after{top:0;bottom:-28px}
.star.peek-b::after{bottom:0;top:-28px}
.star.caught{animation:caught .6s}
@keyframes caught{50%{transform:translate(-50%,-50%) scale(2) rotate(180deg)}}
.star.kind-shoot{color:#fff;font-size:42px;text-shadow:0 0 12px #fff,0 0 26px #b9dcff,0 0 40px #fff6a8}
.star.kind-moon{color:#eef6ff;text-shadow:0 0 12px #fff,0 0 26px #b9dcff,0 0 36px #ffe08a}
.star.kind-moon::before{content:"";position:absolute;inset:-16px;border-radius:50%;background:radial-gradient(circle,rgba(255,246,200,.5),transparent 70%);pointer-events:none;animation:moonhalo 1.6s ease-in-out infinite}
@keyframes moonhalo{50%{opacity:.55;transform:scale(1.08)}}
.star.kind-twin{color:#fff0c8;animation:twintw 0.7s ease-in-out infinite;text-shadow:0 0 12px #fff,0 0 24px #ff9ec7,0 0 34px #fff6a8}
@keyframes twintw{0%,100%{filter:brightness(1)}50%{filter:brightness(1.45)}}
.star.decoy{font-size:30px;opacity:.7;z-index:2;padding:10px;color:#e4d4ff;text-shadow:0 0 8px #b9a6ff,0 0 14px #8f7fe0}
.star.decoy.kind-hollow{font-size:32px;color:#ffe9b8;opacity:.62;text-shadow:0 0 6px #c9b8ff,0 0 12px #8e7cc8}
.star.decoy.kind-spark{font-size:26px;color:#ffc6e8;opacity:.58;text-shadow:0 0 8px #ff9ec7,0 0 14px #b9dcff}
.star.decoy.kind-dim{font-size:28px;color:#d8c6ff;opacity:.55;text-shadow:0 0 6px #a8c0ff}
.star.decoy.popped{animation:decoypop .4s ease-in forwards;pointer-events:none}
@keyframes decoypop{to{transform:translate(-50%,-50%) scale(.2);opacity:0}}
.pop{position:absolute;color:#fff;pointer-events:none;animation:rise 1.2s forwards;font-size:14px;white-space:nowrap;text-shadow:0 0 6px #f0f;z-index:4}
@keyframes rise{to{transform:translateY(-50px);opacity:0}}
.giftwin{width:420px;max-height:calc(100vh - 56px);box-shadow:4px 4px 0 rgba(70,50,130,.35),0 0 0 3px #fff6b8,0 0 40px rgba(255,190,230,.85)}
.giftwin.kind-1{box-shadow:4px 4px 0 rgba(70,50,130,.35),0 0 0 3px #e4d8ff,0 0 40px rgba(190,180,255,.8)}
.giftwin .content{padding:8px}
.giftwin.unwrapped .content{padding:6px 6px 8px}
.giftBox{text-align:center}
.parcel-wrap{position:relative;padding:16px 0 10px;min-height:200px;display:flex;flex-direction:column;align-items:center;justify-content:center;
  background:radial-gradient(circle at 50% 45%,#fff 0,#fff1f8 40%,#e4ecff 100%);border:3px solid #3b3363;border-radius:18px;overflow:hidden}
.giftwin.kind-0 .parcel-wrap{background:radial-gradient(circle at 50% 45%,#fff 0,#fff1f8 42%,#ffe8f2 100%)}
.giftwin.kind-1 .parcel-wrap{background:radial-gradient(circle at 50% 45%,#fff 0,#f3eefc 42%,#e4ecff 100%)}
.parcel{cursor:pointer;animation:wiggle 1.8s ease-in-out infinite;transform-origin:50% 90%;outline:none}
.parcel:hover{animation-duration:.9s}
@keyframes wiggle{0%,60%,100%{transform:rotate(0)}68%{transform:rotate(-6deg) translateY(-4px)}76%{transform:rotate(5deg) translateY(-4px)}84%{transform:rotate(-3deg)}92%{transform:rotate(2deg)}}
.parcel-svg{display:block;width:200px;height:auto;overflow:visible;filter:drop-shadow(0 0 14px rgba(255,255,255,.9))}
.parcel-svg *{transform-box:view-box}
.parcel-hint{margin-top:10px;font-size:15px;line-height:1.6;color:#3b3363}
.parcel-hint b{display:inline-block;margin-top:4px;padding:2px 12px;border:2px solid #3b3363;border-radius:10px;background:#fff6b8;animation:blink 1.2s steps(2) infinite}
.parcel.opening{animation:shake .45s linear 1 forwards}
@keyframes shake{20%{transform:rotate(-7deg)}40%{transform:rotate(7deg)}60%{transform:rotate(-5deg)}80%{transform:rotate(4deg)}100%{transform:rotate(0)}}
.parcel.opening .plid{transform-origin:60px 40px;animation:lidoff .7s .35s cubic-bezier(.3,1.4,.6,1) forwards}
@keyframes lidoff{to{transform:translate(46px,-90px) rotate(32deg);opacity:0}}
.parcel.opening .pbody{transform-origin:60px 106px;animation:bodypop .5s .7s ease-in forwards}
@keyframes bodypop{40%{transform:scale(1.12,.88)}100%{transform:scale(.2);opacity:0}}
.burst{position:absolute;left:50%;top:50%;font-size:20px;pointer-events:none;opacity:0;text-shadow:0 0 8px #fff;animation:burst .9s .55s ease-out forwards}
@keyframes burst{0%{opacity:1;transform:translate(-50%,-50%) scale(.3)}100%{opacity:0;transform:translate(calc(-50% + var(--dx)),calc(-50% + var(--dy))) scale(1.3)}}
.gift-reveal{animation:reveal .6s cubic-bezier(.2,1.5,.5,1)}
@keyframes reveal{from{transform:scale(.3) rotate(-6deg);opacity:0;filter:blur(6px)}}
.gift-ribbon{display:inline-block;margin-bottom:8px;padding:1px 14px;font-family:"VT323",var(--font);font-size:20px;letter-spacing:.12em;color:#3b3363;background:#fff6b8;border:3px solid #3b3363;border-radius:12px;box-shadow:3px 3px 0 rgba(59,51,99,.3)}
.gift-frame{background:transparent;border:3px solid #3b3363;border-radius:12px;padding:0;margin:0 auto;overflow:hidden;line-height:0;
  box-shadow:0 0 0 4px #ffd6e8,5px 7px 0 4px rgba(59,51,99,.28),0 0 30px rgba(255,190,230,.6)}
.giftwin.kind-1 .gift-frame{box-shadow:0 0 0 4px #e0d6ff,5px 7px 0 4px rgba(59,51,99,.28),0 0 30px rgba(190,180,255,.55)}
.gift-frame .gimg{display:block;width:100%;height:auto;max-height:none;object-fit:contain;object-position:center;border-radius:0;background:transparent;vertical-align:top}
.gift-name{margin:10px auto 2px;display:inline-block;padding:4px 14px;max-width:calc(100% - 8px);font-family:"DotGothic16",var(--font);font-size:24px;line-height:1.4;letter-spacing:.06em;color:#fff;
  background:linear-gradient(90deg,#8f7fe0,#f3a6cf);border:3px solid #3b3363;border-radius:14px;box-shadow:4px 5px 0 rgba(59,51,99,.3);text-shadow:2px 0 #ff9ec7,-2px 0 #7fb2ff,0 0 10px rgba(255,255,255,.8)}
body.has-two-gifts .gift-name{font-size:18px;letter-spacing:.03em;padding:3px 10px;white-space:nowrap}
.giftBox .gph{aspect-ratio:4/3;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;border-radius:10px;background:repeating-linear-gradient(45deg,#fff0f7 0 10px,#eef4ff 10px 20px);font-size:20px}
.note{white-space:pre-wrap;margin:0;background:#fff;padding:10px;border:2px inset #fff;line-height:1.7;font-family:var(--font)}
.trash-item{cursor:pointer;padding:6px}
.trash-item:hover{background:#fff}
/* 小东西 */
#buddy{position:fixed;right:18px;bottom:58px;z-index:6000;cursor:pointer;user-select:none;width:156px;text-align:center}
.catsvg{display:block;margin:auto;overflow:visible;animation:breathe 3.6s ease-in-out infinite;transform-origin:50% 100%;filter:drop-shadow(0 0 10px rgba(255,255,255,.85)) drop-shadow(0 0 18px rgba(255,190,225,.45));position:relative;z-index:1}
.catimg{width:150px;height:auto;pointer-events:none}
@keyframes breathe{50%{transform:translateY(-3px) scale(1.02,.985)}}
#buddy.happy .catsvg{animation:hop .5s ease-out 2}
@keyframes hop{0%,100%{transform:translateY(0) scale(1)}20%{transform:translateY(0) scale(1.08,.9)}55%{transform:translateY(-24px) scale(.95,1.06)}80%{transform:translateY(0) scale(1.06,.94)}}
.buddy-shadow{width:104px;height:12px;margin:-16px auto 0;background:rgba(80,60,140,.22);border-radius:50%;filter:blur(2px);animation:shadow 3.6s ease-in-out infinite;position:relative;z-index:0;pointer-events:none}
@keyframes shadow{50%{transform:scale(.92);opacity:.7}}
.buddy-name{font-size:12px;margin-top:2px;display:inline-block;padding:0 8px;border-radius:8px;background:rgba(255,255,255,.6);border:2px solid #3b3363}
.bubble{position:absolute;bottom:200px;right:4px;width:180px;background:#fff;border:2px solid var(--ink);padding:8px;font-size:13px;line-height:1.5;text-align:left;box-shadow:3px 3px 0 rgba(70,50,130,.3)}
.bubble::after{content:"";position:absolute;right:30px;bottom:-10px;border:8px solid transparent;border-top-color:var(--ink);border-bottom:0}
/* 任务栏 */
#taskbar{position:fixed;left:0;right:0;bottom:0;height:40px;display:flex;align-items:center;gap:6px;padding:4px 6px calc(4px + env(safe-area-inset-bottom));background:var(--win);border-top:2px solid #fff;z-index:40}
.start{font-weight:bold}
#tasks{flex:1;display:flex;gap:4px;overflow-x:auto}
#tasks button{font-size:12px;padding:2px 8px;white-space:nowrap;max-width:150px;overflow:hidden;text-overflow:ellipsis}
#clock{border:2px inset #fff;padding:2px 10px;font-family:"VT323",monospace;font-size:18px;cursor:pointer}
#bgmBtn{position:relative;flex-shrink:0;min-width:36px;height:28px;padding:0 9px;font-size:18px;line-height:24px;
  font-family:"VT323",var(--font);cursor:pointer;user-select:none}
#bgmBtn.on{border-color:var(--edge) #fff #fff var(--edge);background:#f3e4f8;box-shadow:inset 1px 1px 0 #5a5486}
#bgmBtn.off{color:#8c86b8}
#bgmBtn.off::after{content:"";position:absolute;left:7px;right:7px;top:50%;height:2px;background:var(--ink);
  transform:rotate(-28deg);pointer-events:none}
#startMenu{position:fixed;left:4px;bottom:42px;width:220px;background:var(--win);border:2px solid;border-color:#fff #5a5486 #5a5486 #fff;z-index:41;display:flex}
#startMenu .side{writing-mode:vertical-rl;transform:rotate(180deg);background:linear-gradient(#f3a6cf,#8f7fe0);color:#fff;padding:6px 3px;font-family:"VT323";font-size:20px}
#startMenu ul{list-style:none;margin:0;padding:4px;flex:1}
#startMenu li{padding:6px 8px;cursor:pointer}#startMenu li:hover{background:#6e63c6;color:#fff}
#toast{position:fixed;left:50%;bottom:56px;transform:translateX(-50%);z-index:8000!important;background:#fff;border:2px solid var(--ink);padding:8px 14px;z-index:100;box-shadow:3px 3px 0 rgba(70,50,130,.3);max-width:90vw;text-align:center}
.rain{position:fixed;top:-30px;color:#fff6a8;text-shadow:0 0 8px #fff;pointer-events:none;z-index:60;animation:fall linear forwards}
@keyframes fall{to{transform:translateY(110vh) rotate(360deg)}}
.dblstar{position:fixed;pointer-events:none;z-index:5;animation:rise 1.5s forwards;color:#fff;text-shadow:0 0 8px var(--pink2)}
/* 电脑端：芋泥的气泡放在猫左侧，避免压到礼物窗口 */
@media (min-width:701px){
  .bubble{bottom:64px;right:150px;width:190px}
  .bubble::after{right:-10px;bottom:16px;border:8px solid transparent;border-left-color:var(--ink);border-right:0}
  body.has-gifts #buddy .bubble{bottom:auto;top:0;right:4px;width:156px;transform:translateY(-100%);z-index:2}
  body.has-gifts #buddy .bubble::after{right:28px;bottom:-10px;left:auto;border:8px solid transparent;border-top-color:var(--ink);border-left-color:transparent;border-right:0;border-bottom:0}
}
/* 流星雨 */
#meteorLayer{position:fixed;inset:0;pointer-events:none;z-index:7000;overflow:hidden;opacity:0;transition:opacity .6s;
  background:linear-gradient(180deg,rgba(60,40,130,.42),rgba(120,80,180,.18) 60%,transparent)}
#meteorLayer.on{opacity:1}
.meteor{position:absolute;width:var(--len);height:4px;border-radius:4px;transform:rotate(-35deg);transform-origin:0 50%;opacity:0;
  background:linear-gradient(90deg,#fff 0%,var(--c) 12%,rgba(255,170,220,.75) 35%,rgba(170,210,255,.4) 65%,transparent 100%);
  filter:drop-shadow(0 0 6px var(--c));animation:meteor 1.2s ease-in forwards}
.meteor::before{content:"";position:absolute;left:-4px;top:50%;width:9px;height:9px;margin-top:-4.5px;border-radius:50%;background:#fff;box-shadow:0 0 10px 4px var(--c),0 0 22px 6px rgba(255,180,230,.6)}
@keyframes meteor{0%{opacity:0;transform:rotate(-35deg) translateX(0)}10%{opacity:1}85%{opacity:1}100%{opacity:0;transform:rotate(-35deg) translateX(-130vmax)}}
/* 手机 */
@media (max-width:700px){
  #icons{grid-template-columns:repeat(3,1fr);left:8px;right:8px;top:auto;bottom:54px;gap:8px 2px}
  .icon{font-size:11px}.icon .ico{width:64px;height:64px;font-size:36px;border-radius:20px}
  #hero{top:8vh}
  .win{left:6px!important;right:6px!important;top:10px!important;width:auto!important;min-width:0;max-height:calc(100vh - 64px)}
  .titlebar{cursor:default}
  #win-map .map{aspect-ratio:auto;height:min(52vh,calc(100vw - 24px));}
  #buddy{right:10px;bottom:auto;top:27vh;transform:scale(.72);transform-origin:right top;z-index:9}
  .game{height:52vh}
  .game-bar{flex-wrap:wrap;gap:4px 8px}
  .streak{display:none}
  .wish-sky{width:100px;left:4px;bottom:2px}
  .wish-svg{height:68px}
  .wish-cap{font-size:9px}

  .drawer-body{grid-template-columns:repeat(2,1fr)}
  .pin .p{width:44px;height:44px}
  #bgmBtn{min-width:42px;height:32px;font-size:20px}
  .pin{transform:translate(-50%,-25px)}
  .pin .p svg{width:38px;height:38px}
  #toast{bottom:auto;top:10px}
  body.has-gifts #toast{top:auto;bottom:56px}
  .giftwin{left:var(--gleft,6px)!important;right:auto!important;width:var(--gift-w,calc(100% - 12px))!important;max-width:calc(100% - 12px);top:var(--gtop,10px)!important}
  .giftwin .content{padding:6px}
  .giftwin.unwrapped .content{padding:4px 4px 6px}
  .parcel-wrap{min-height:160px;padding:8px 0}
  .parcel-svg{width:130px}
  .parcel-hint{font-size:13px;margin-top:4px}
  .gift-frame{border-radius:10px;padding:0}
  .gift-frame .gimg{height:auto;max-height:none;background:transparent}
  .gift-name{font-size:17px;padding:3px 10px;margin:8px auto 2px}
  body.has-gifts .game{height:30vh}
  body.has-two-gifts .game{height:18vh}
  body.has-gifts #buddy{top:auto;bottom:52px;transform:scale(.6);transform-origin:right bottom;z-index:6000}
  body.has-gifts #buddy .bubble{bottom:auto;top:-8px;right:0;width:140px;transform:translateY(-100%)}
  body.has-gifts .bubble::after{right:24px;bottom:-10px;border:8px solid transparent;border-top-color:var(--ink);border-bottom:0;border-left-color:transparent}
}

/* wish-finale */
.wish-sky.wish-away{opacity:0}
#wishFinale{position:fixed;inset:0;z-index:8800;display:flex;align-items:center;justify-content:center;
  opacity:0;pointer-events:none;isolation:isolate}
#wishFinale.on{opacity:1;pointer-events:auto}
#wishFinale .wf-dim{position:absolute;inset:0;
  background:radial-gradient(ellipse at 50% 46%,rgba(48,28,90,.22) 0%,rgba(18,10,40,.58) 62%,rgba(8,4,22,.76) 100%);
  opacity:0;transition:opacity .85s ease}
#wishFinale.on .wf-dim{opacity:1}
#wishFinale .wf-aurora{position:absolute;inset:-12%;pointer-events:none;
  background:
    radial-gradient(ellipse at 50% 44%,rgba(255,246,184,.38),transparent 44%),
    radial-gradient(ellipse at 28% 40%,rgba(255,158,199,.3),transparent 46%),
    radial-gradient(ellipse at 72% 52%,rgba(185,220,255,.32),transparent 46%),
    radial-gradient(ellipse at 50% 70%,rgba(200,170,255,.2),transparent 50%);
  filter:blur(14px);opacity:0;transform:scale(.72);
  transition:opacity 1s ease,transform 1.15s ease}
#wishFinale.on .wf-aurora{opacity:1;transform:scale(1);animation:wfAurora 5.5s ease-in-out infinite}
@keyframes wfAurora{50%{filter:blur(18px) saturate(1.3);transform:scale(1.07)}}
.wf-stage{position:relative;width:min(480px,90vw);height:min(400px,74vh);
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  will-change:transform;transition:transform 1.05s cubic-bezier(.18,.86,.2,1)}
.wf-halo{position:absolute;width:150%;height:150%;left:50%;top:44%;transform:translate(-50%,-50%);
  background:radial-gradient(circle,rgba(255,246,184,.75) 0%,rgba(255,158,199,.28) 36%,transparent 68%);
  filter:blur(10px);opacity:0;pointer-events:none}
#wishFinale.on .wf-halo{opacity:1;animation:wfHalo 2.8s ease-in-out infinite}
@keyframes wfHalo{50%{transform:translate(-50%,-50%) scale(1.14);opacity:.7}}
.wf-ring{position:absolute;width:124%;aspect-ratio:1;left:50%;top:40%;transform:translate(-50%,-50%);
  pointer-events:none;opacity:0}
.wf-ring i,.wf-ring b{position:absolute;inset:0;border-radius:50%;
  border:1.5px dashed rgba(255,246,184,.55);
  box-shadow:0 0 18px rgba(255,246,184,.35),inset 0 0 18px rgba(185,220,255,.2)}
.wf-ring b{inset:-16px;border-style:dotted;border-color:rgba(255,158,199,.5);animation:wfSpin 18s linear infinite}
.wf-ring i{animation:wfSpin 26s linear infinite reverse}
#wishFinale.on .wf-ring{opacity:1}
@keyframes wfSpin{to{transform:rotate(360deg)}}
.wf-spark{position:absolute;color:#fff6a8;text-shadow:0 0 8px #fff,0 0 16px #ff9ec7;pointer-events:none;
  animation:wfSpark 2.4s ease-in-out infinite;font-size:14px;z-index:2}
@keyframes wfSpark{0%,100%{opacity:.2;transform:scale(.6) rotate(0)}50%{opacity:1;transform:scale(1.25) rotate(18deg)}}
.wf-constellation{position:relative;width:82%;z-index:2;
  filter:drop-shadow(0 0 16px rgba(255,246,184,.9)) drop-shadow(0 0 28px rgba(255,158,199,.5))}
.wf-constellation .wish-svg{width:100%;height:auto;display:block;overflow:visible}
#wishFinale .wish-lines line{stroke:rgba(255,246,184,.22);stroke-width:1.5;
  stroke-dasharray:90;stroke-dashoffset:90}
#wishFinale.on.wf-arrived .wish-lines line.on{stroke:#fff6a8;stroke-dashoffset:0;
  transition:stroke-dashoffset 1.05s ease,stroke .5s;filter:drop-shadow(0 0 6px #fff)}
#wishFinale.on.wf-arrived .wish-jewel.lit{animation:wfJewel 1.6s ease-in-out infinite;
  filter:drop-shadow(0 0 10px #fff6a8)}
@keyframes wfJewel{0%,100%{transform:scale(1)}50%{transform:scale(1.48)}}
.wf-caption{position:relative;z-index:3;margin-top:6px;padding:7px 18px;border-radius:999px;
  font-family:"DotGothic16",var(--font);font-size:clamp(15px,3.2vw,22px);letter-spacing:.12em;
  color:#fff;background:linear-gradient(90deg,rgba(143,127,224,.9),rgba(243,166,207,.9));
  border:2px solid #fff6a8;box-shadow:0 0 18px rgba(255,246,184,.55),3px 4px 0 rgba(59,51,99,.28);
  text-shadow:0 0 8px rgba(255,255,255,.8);opacity:0;transform:translateY(12px) scale(.92);
  transition:opacity .6s ease .5s,transform .6s ease .5s;text-align:center;max-width:92vw}
#wishFinale.on.wf-arrived .wf-caption{opacity:1;transform:translateY(0) scale(1)}
#wishFinale.wf-out{pointer-events:none}
#wishFinale.wf-out .wf-dim,#wishFinale.wf-out .wf-aurora,#wishFinale.wf-out .wf-caption,
#wishFinale.wf-out .wf-halo,#wishFinale.wf-out .wf-ring{opacity:0;transition:opacity .55s ease}
@media (max-width:700px){
  .wf-stage{width:min(340px,90vw);height:min(300px,62vh)}
  .wf-caption{font-size:15px;letter-spacing:.06em;padding:5px 12px;white-space:normal;line-height:1.45}
}
@media (prefers-reduced-motion:reduce){
  .wf-stage{transition:opacity .45s ease}
  .wf-ring i,.wf-ring b,#wishFinale.on .wf-halo,#wishFinale.on .wf-aurora,
  #wishFinale.on.wf-arrived .wish-jewel.lit,.wf-spark{animation:none}
  #wishFinale.on .wf-aurora{opacity:.65;transform:none}
  #wishFinale .wish-lines line{stroke-dasharray:none;stroke-dashoffset:0}
  .wf-caption{transition:opacity .4s ease}
}

.letter .letter-img{display:block;max-width:min(100%,320px);height:auto;margin:6px auto 10px;border:1px solid #e3c2d6;border-radius:8px;box-shadow:0 3px 10px rgba(180,120,160,.25)}
.letter .letter-img.handwriting{width:100%;max-width:560px;border:0;border-radius:0;box-shadow:none;background:transparent;margin:8px auto 4px}
/* 信箱：聊天记录重绘（DREAM.OS 气泡） */
#win-mail .content{padding:8px}
.letter.has-chat{padding:12px 12px 10px}
.letter.has-chat h3{margin:2px 0 6px!important}
.lchat{white-space:normal;line-height:1.5;margin:0 0 6px;padding:10px 8px 8px;border:2px solid var(--ink);border-radius:12px;
  background:linear-gradient(180deg,rgba(255,255,255,.72),rgba(246,238,255,.78));box-shadow:3px 3px 0 rgba(59,51,99,.18),inset 0 0 0 2px #fff}
.lc-time{text-align:center;margin:0 0 8px;opacity:0;transform:translateY(4px);transition:opacity .25s,transform .25s}

.lc-time{font-family:"VT323",var(--font);font-size:16px;letter-spacing:.08em;color:#7d70b8}
.lc-row{display:flex;align-items:flex-start;gap:6px;margin-top:4px;opacity:0;transform:translateY(6px) scale(.96);transition:opacity .22s ease-out,transform .22s ease-out}
.lc-row.first{margin-top:9px}
.lc-row.in,.lc-time.in{opacity:1;transform:none}
.lc-row.me{flex-direction:row-reverse}
.lc-av{flex:0 0 26px;height:26px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:13px;line-height:1;color:#3b3363}
.lc-row.first .lc-av{border:2px solid var(--ink);box-shadow:1px 2px 0 rgba(59,51,99,.3)}
.lc-row.her.first .lc-av{background:#ffd6e8}
.lc-row.me.first .lc-av{background:#ddd0ff}
.lc-col{display:flex;flex-direction:column;align-items:flex-start;max-width:78%;min-width:0}
.lc-row.me .lc-col{align-items:flex-end}
.lc-name{font-family:"VT323",var(--font);font-size:15px;line-height:1;margin:0 4px 3px;color:#6a5fa8;letter-spacing:.06em}
.lc-bub{position:relative;padding:6px 11px;font-size:15px;line-height:1.5;color:var(--ink);word-break:break-word;
  border:2px solid var(--ink);border-radius:12px;box-shadow:2px 3px 0 rgba(59,51,99,.22)}
.lc-row.her .lc-bub{background:linear-gradient(180deg,#fff0f7,#ffd6e8);border-top-left-radius:4px}
.lc-row.me .lc-bub{background:linear-gradient(180deg,#f3eeff,#ddd0ff);border-top-right-radius:4px}
.lc-row.first.her .lc-bub,.lc-row.first.her .lc-sticker{border-top-left-radius:2px}
.lc-row.first.me .lc-bub,.lc-row.first.me .lc-sticker{border-top-right-radius:2px}
.lc-row.her .lc-bub,.lc-row.me .lc-bub{border-top-left-radius:12px;border-top-right-radius:12px}
.lc-row.first.her .lc-bub{border-top-left-radius:2px}
.lc-row.first.me .lc-bub{border-top-right-radius:2px}
.lc-sticker{display:block;width:104px;height:104px;object-fit:cover;border:2px solid var(--ink);border-radius:12px;box-shadow:2px 3px 0 rgba(59,51,99,.22);background:#fff}
.letter.has-chat #lbody{margin:0 0 2px;font-size:16px;min-height:28px}
.letter.has-chat .lsign{margin:-4px 0 10px}
@media (max-width:700px){
  .letter.has-chat{padding:10px 8px 8px}
  .lchat{padding:8px 5px 6px}
  .lc-col{max-width:80%}
  .lc-bub{font-size:14px;padding:5px 9px}
  .lc-av{flex-basis:22px;height:22px;font-size:11px}
  .lc-sticker{width:92px;height:92px}
}

.lchat.lchat-2{display:grid;grid-template-columns:1fr 1fr;gap:0 10px}
.lchat-2 .lchat-c{min-width:0}
.lchat-2 .lchat-c + .lchat-c{border-left:2px dashed #d9c6ee;padding-left:8px}
.lchat-2 .lc-col{max-width:84%}
.lchat-2 .lc-sticker{width:92px;height:92px}
@media (max-width:600px){ .lchat.lchat-2{gap:0 6px} .lchat-2 .lchat-c + .lchat-c{padding-left:5px} .lchat-2 .lc-bub{font-size:13px;padding:4px 8px} .lchat-2 .lc-av{flex-basis:20px;height:20px;font-size:10px} .lchat-2 .lc-sticker{width:76px;height:76px} .lchat-2 .lc-col{max-width:86%} }

html.page-hidden #sky,html.page-hidden #sparkles,html.page-hidden .fog,html.page-hidden .spark,
html.page-hidden #crt,html.page-hidden #hero .title,html.page-hidden .catsvg,html.page-hidden .buddy-shadow,
html.page-hidden .parcel:not(.opening),html.page-hidden .sky-dot,html.page-hidden .sky-cloud,
html.page-hidden .sky-cloud,html.page-hidden #skyAurora,html.page-hidden .pin .dot{
  animation-play-state:paused!important}
