@font-face{font-family:Mali;src:url('./Mali-Regular.woff2') format('woff2');font-style:normal;font-weight:400;font-display:swap}
*{box-sizing:border-box}
html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#050208;color:#fff0f7;font-family:Mali,system-ui,sans-serif;user-select:none;-webkit-user-select:none}
button{font:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent}
button:focus-visible,canvas:focus-visible{outline:2px solid #ffd4e6;outline-offset:4px}
#scene-root{position:fixed;inset:0;background:radial-gradient(ellipse at 45% 25%,#27101f,#050208 75%)}
#scene-root canvas{display:block;width:100%!important;height:100%!important;touch-action:none}
#falling-images-stage{position:fixed;inset:0;pointer-events:none;z-index:20;overflow:hidden}
#falling-images{position:absolute;inset:0}
.falling-img{position:absolute;top:0;left:var(--photo-x);width:clamp(68px,8.5vw,118px);aspect-ratio:.86;object-fit:cover;border:3px solid #fff0ef;border-bottom-width:12px;border-radius:6px;box-shadow:0 0 18px #d9689666,0 8px 24px #0007;animation:fall-image var(--photo-duration) var(--photo-delay) linear infinite;will-change:transform,opacity}
@keyframes fall-image{0%{transform:translate(-50%,-22vh) rotate(var(--photo-rotate));opacity:0}12%,83%{opacity:.93}100%{transform:translate(calc(-50% + 22px),114vh) rotate(calc(var(--photo-rotate) * -1));opacity:0}}
.rain-paused .falling-img{animation-play-state:paused}
#hint{position:fixed;left:50%;top:max(20px,env(safe-area-inset-top));transform:translateX(-50%);z-index:40;pointer-events:none;font-size:11px;color:#efd9e4a6;text-align:center;width:min(80vw,480px);line-height:1.6;transition:opacity .8s}
#hint.is-quiet{opacity:0}
#music-btn{position:fixed;right:max(16px,env(safe-area-inset-right));top:max(16px,env(safe-area-inset-top));z-index:70;width:44px;height:44px;border-radius:50%;border:1px solid #f7b1ce50;background:#160c19d9;color:#f9d5e4;display:none;font-size:20px}
#music-btn.is-visible{display:inline-grid;place-items:center}
#music-btn[aria-pressed=true]{box-shadow:0 0 16px #f07bad4d;border-color:#f8bfd9}
#boot{position:fixed;inset:0;z-index:99999;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;background:radial-gradient(circle,#24101d,#050208 70%);color:#ffe9f2;transition:opacity .4s}
#boot .lg-heart{font-size:48px;animation:lg-pulse 1.6s ease-in-out infinite;filter:drop-shadow(0 0 16px #e371a377)}
#boot .lg-text{font-size:14px;color:#e6bacd}
@keyframes lg-pulse{0%,100%{transform:scale(1)}50%{transform:scale(1.1)}}
#boot.is-hidden{opacity:0;pointer-events:none}
.rain-dialog{width:min(560px,calc(100vw - 28px));max-height:calc(100dvh - 32px);padding:0;border:1px solid #eab2cd50;border-radius:24px;background:#1a101ed9;backdrop-filter:blur(20px);color:#fff0f7;box-shadow:0 25px 90px #0009;overflow:hidden}
.rain-dialog::backdrop{background:#08030bd9;backdrop-filter:blur(6px)}
.rain-dialog header{padding:18px 18px 12px;display:flex;align-items:center;justify-content:space-between;gap:10px;border-bottom:1px solid #f8bfd926}
.rain-dialog h1{font-size:19px;font-weight:400;margin:0}
.rain-dialog .rain-close{width:44px;height:44px;flex:0 0 44px;border:1px solid #eab2cd50;border-radius:50%;background:#ffffff08;color:#ffe5ef;font:26px/1 system-ui}
.rain-dialog-body{max-height:calc(100dvh - 132px);overflow:auto;overscroll-behavior:contain;touch-action:pan-y;padding:8px 22px 24px}
.rain-dialog h2{font-weight:400;font-size:15px;color:#f4b5d0;margin:22px 0 14px}
#rainMessages{margin:12px 0;padding:0;list-style:none;display:grid;gap:9px}
.rain-message{padding:12px 14px;border:1px solid #f8bfd924;border-radius:13px;background:#ffffff04;font-size:15px;line-height:1.8;overflow-wrap:anywhere}
#rainPhotos{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.rain-photo{position:relative;aspect-ratio:1;border:0;padding:0;border-radius:10px;overflow:hidden;background:#3a2433}
.rain-photo img{width:100%;height:100%;object-fit:cover;display:block}
.rain-photo span{position:absolute;bottom:5px;right:5px;padding:2px 6px;border-radius:6px;background:#1a101ebd;color:#fff;font-size:11px}
#rainPhotoDialog{width:min(920px,calc(100vw - 24px));background:#110c17}
#rainPhotoLarge{display:block;width:100%;height:min(70dvh,760px);object-fit:contain;padding:12px}
#rainPhotoDialog footer{display:flex;align-items:center;justify-content:center;gap:20px;padding:6px 18px 18px}
#rainPhotoDialog footer button{width:44px;height:44px;background:#ffffff0c;border:1px solid #eab2cd50;border-radius:50%;color:#ffe5ef;font-size:22px}
#rainPhotoDialog footer button:disabled{opacity:.3;cursor:default}
#rainPhotoPosition{font-size:13px;min-width:60px;text-align:center}
#rainSceneError{position:fixed;left:50%;top:45%;transform:translate(-50%,-50%);width:min(80vw,360px);z-index:30;text-align:center;padding:24px;background:#281422de;border:1px solid #efb3cd50;border-radius:20px;font-size:14px;line-height:1.8}
#rainSceneError[hidden]{display:none}
#rainRetryButton{margin-top:12px;padding:10px 18px;border:0;border-radius:20px;background:#f8bfd9;color:#36172a;min-height:44px}
@media(max-width:400px){.rain-dialog-body{padding:8px 14px 18px}.rain-message{font-size:14px}.rain-dialog h1{font-size:17px}#hint{width:70vw;left:44%;font-size:10px}}
@media(max-height:430px){#hint{top:9px}.rain-dialog{max-height:calc(100dvh - 16px)}.rain-dialog header{padding:8px 14px}.rain-dialog-body{max-height:calc(100dvh - 90px)}}
#rainPhotoDialog[open]{display:flex;flex-direction:column;max-height:calc(100dvh - 24px)}
#rainPhotoDialog header,#rainPhotoDialog footer{flex-shrink:0}
#rainPhotoLarge{flex:1 1 auto;min-height:0;max-height:calc(100dvh - 190px)}
@media(prefers-reduced-motion:reduce){#boot .lg-heart{animation:none}#hint,#boot{transition:none}}
