@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@400;600;800&display=swap');
*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:#101014;color:#f4e7c6;font-family:'Noto Sans TC',sans-serif}button,textarea{font:inherit}button{cursor:pointer}button:focus-visible,textarea:focus-visible{outline:3px solid #ffcf72;outline-offset:6px}[hidden]{display:none!important}#scene{position:relative;min-height:100svh;overflow:hidden;isolation:isolate;background:radial-gradient(ellipse at 50% 82%,#33202966,transparent 52%)}.ambient{position:absolute;inset:0;z-index:-1;opacity:.16;background-image:url('assets/note-c.png');background-size:450px;background-position:-220px -180px;filter:blur(70px)}header{position:relative;z-index:9;display:flex;justify-content:space-between;padding:22px 28px;color:#918b92;font-size:12px;letter-spacing:1px}header button{border:0;color:#aaa2a9;background:transparent}.intro{text-align:center;position:relative;z-index:2;margin-top:3vh;pointer-events:none}.eyebrow{font-size:11px;letter-spacing:3px;color:#a6a08f}h1{font-size:clamp(28px,5vw,46px);line-height:1.5;letter-spacing:3px;margin:14px 0;color:#ece7d4}#subtitle{color:#afa9a4;font-size:14px}#rain{position:absolute;inset:0;pointer-events:none;z-index:3}.falling{position:absolute;width:105px;height:110px;object-fit:contain;will-change:transform;left:50%;top:0}#box{position:absolute;bottom:7vh;left:50%;width:min(70vw,390px);aspect-ratio:634/473;transform:translateX(-50%);z-index:4;transition:filter .3s}#box>img{position:absolute;width:100%;inset:0;pointer-events:none}.box-back{z-index:0}.box-front{z-index:3}.pile{position:absolute;left:15%;right:15%;top:24%;height:42%;z-index:1;overflow:hidden}.pile img{position:absolute;width:46%;bottom:-28%;transform:rotate(-15deg)}.pile img:nth-child(2){left:28%;transform:rotate(16deg);bottom:-13%}.pile img:nth-child(3){left:54%;transform:rotate(-9deg)}#letter{position:relative;z-index:8;width:min(90vw,470px);margin:26px auto 300px;animation:receive .65s cubic-bezier(.2,.8,.2,1)}.paper{background:#a9d5c7;color:#243831;padding:30px 28px 20px;border:4px solid #111716;border-radius:3% 1% 3% 2%;box-shadow:7px 9px 0 #05090a88;transform:rotate(-1.3deg)}.paper-tag{font-size:11px;letter-spacing:2px;opacity:.65}h2{font-size:23px;line-height:1.5;margin:12px 0 24px}label{font-size:13px}textarea{display:block;width:100%;height:145px;resize:vertical;background:#ffffff20;border:0;border-bottom:2px dashed #38564d88;padding:12px 0;color:#1d342e;font-size:16px;line-height:1.8}textarea::placeholder{color:#49665c}.paper-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:18px}small{font-size:11px;color:#4f6c62}.paper-footer button{background:#293b33;color:#fff0c8;border:3px solid #141b17;border-radius:14% 9% 13% 8%;padding:10px 17px;box-shadow:2px 3px 0 #141b17;transition:transform .15s}.paper-footer button:active{transform:translate(2px,3px);box-shadow:none}.skip{display:block;margin:22px auto;background:none;border:0;color:#aaa1a6;font-size:13px;text-decoration:underline;text-underline-offset:6px}#error{font-size:12px;line-height:1.5}#portal{position:relative;z-index:8;text-align:center;margin:5vh auto 290px;animation:receive .8s ease-out}#portal h2{font-size:25px;margin-bottom:0}#hold{position:relative;width:260px;height:220px;background:none;border:0;touch-action:none;user-select:none;-webkit-touch-callout:none}#hold>img{position:absolute;width:100%;left:0;top:0;animation:breathe 2.8s ease-in-out infinite}#hold>img:first-of-type{opacity:.65;filter:brightness(.8)}.portal-halo{position:absolute;inset:30px;border-radius:50%;background:#f0529c22;filter:blur(28px);animation:breathe 2.8s infinite}.discord-mark{position:absolute;left:0;right:0;top:83px;font-size:42px;color:#ffe0ed;text-shadow:0 0 18px #ff80bc}svg{position:absolute;inset:8px 28px;width:204px;height:204px;transform:rotate(-90deg);pointer-events:none}circle{fill:none;stroke:#ffdd93;stroke-width:4;stroke-linecap:round;stroke-dasharray:547;stroke-dashoffset:547}#hold-label{font-size:14px;color:#f4c0d8;margin:0}.thanks{font-size:12px;color:#9c9498;margin-top:26px}footer{position:absolute;bottom:18px;width:100%;text-align:center;font-size:10px;letter-spacing:2px;color:#615b62}footer span{display:block;font-size:10px;letter-spacing:1px;margin-top:6px}.submitted{animation:send .75s ease-in forwards!important;pointer-events:none}.box-hit{animation:boxhit .3s ease-out}@keyframes receive{from{opacity:0;transform:translateY(70px) rotate(5deg) scale(.85)}to{opacity:1;transform:translateY(0) rotate(0) scale(1)}}@keyframes send{to{opacity:0;transform:translateY(230px) rotate(24deg) scale(.12)}}@keyframes breathe{50%{filter:brightness(1.28);transform:scale(1.025)}}@keyframes boxhit{50%{transform:translateX(-50%) translateY(3px) rotate(-1deg)}}@media(min-width:700px){#letter{margin-bottom:310px}#box{width:360px}.intro{margin-top:0}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important}#rain{display:none}}@media(max-height:720px){.intro{margin-top:0}h1{font-size:27px;margin:5px}#letter{margin-top:10px}.paper{padding:20px}textarea{height:105px}#box{bottom:4vh;width:280px}footer{position:relative;margin-top:30px}#portal{margin-top:0}}

/* Papers share the box coordinate system and remain behind its front lip. */
.pile{inset:0;height:auto;overflow:visible;z-index:1}
.pile img.falling{position:absolute;bottom:auto;max-width:none;object-fit:contain;transform:none;pointer-events:none}
.pile img.falling.settled{will-change:auto}
.box-front{z-index:40!important}
@media(prefers-reduced-motion:reduce){.pile{display:block}}

#hold{width:260px;height:240px}
#hold>img{width:100%;height:100%;object-fit:contain;inset:0;animation:none;pointer-events:none}
#hold>img.work-face{filter:brightness(.48);opacity:1}
#hold>img.work-helmet{animation:helmet-light 1.8s ease-in-out infinite;filter:brightness(1) drop-shadow(0 0 8px #ffe96b88)}
#hold .portal-halo{background:#ffdf6126;inset:45px;animation:helmet-halo 1.8s ease-in-out infinite}
.work-reflection{position:absolute;inset:18% 21%;border-radius:50%;background:linear-gradient(40deg,transparent 30%,#ffffff20 31% 43%,transparent 44% 64%,#ffffff15 65% 74%,transparent 75%);pointer-events:none}
#hold svg{inset:14px 22px;width:216px;height:216px}
#hold-label{color:#ffdf8c}
@keyframes helmet-light{50%{filter:brightness(1.3) drop-shadow(0 0 14px #ffe96baa)}}
@keyframes helmet-halo{50%{opacity:.7;transform:scale(1.06)}}
@media(prefers-reduced-motion:reduce){#hold>img.work-helmet,#hold .portal-halo{animation:none}}

/* Preserve the front lip as the occluder: papers enter between back and front. */
#box{z-index:4}.box-back{z-index:0}.pile{z-index:1}.box-front{z-index:40!important}
.pile img.falling{clip-path:none}
.pile{clip-path:polygon(-150vw -150vh,150vw -150vh,150vw 42%,91% 42%,91% 91%,9% 91%,9% 42%,-150vw 42%)}
.pile img.falling{aspect-ratio:1}
#box{position:fixed;bottom:7svh}
#scene:has(#letter:not([hidden])) #box,
#scene:has(#portal:not([hidden])) #box{width:min(36vw,255px);bottom:12px;left:auto;right:12px;transform:none}
#scene:has(#letter:not([hidden])) .box-hit,
#scene:has(#portal:not([hidden])) .box-hit{animation:corner-hit .3s ease-out}
@keyframes corner-hit{50%{transform:translateY(3px) rotate(-1deg)}}
