:root{--bg:#9cc3ea;--ink:#17365d;--paper:#fffaf0;--olive:#2c63a8;--sage:#2b4f7d;box-sizing:border-box;padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px)}
*{box-sizing:border-box;margin:0}
body{min-height:100vh;background:#fff;color:var(--ink);font-family:'Gaegu','Comic Sans MS',cursive;overflow-x:hidden}
section{min-height:clamp(640px,100vh,900px);display:flex;align-items:center;justify-content:center;padding:24px}
#s1{background:#d6708e;color:#fff6ea;flex-direction:column;text-align:center;cursor:pointer;gap:0}
h1{font-family:'Lora',Georgia,serif;font-weight:400;letter-spacing:.06em;font-size:clamp(1.9rem,8vw,3.6rem);line-height:1.1}
.sub{font-family:'Caveat','Gaegu',cursive;font-style:italic;color:#ffe3ec;font-size:clamp(1.8rem,7vw,3rem);margin-top:2px}
.stage{position:relative;width:min(84vw,430px);margin-top:clamp(10px,4vh,36px)}
#env{width:100%;display:block;transform:rotate(-6deg);animation:boing 1.8s ease-in-out infinite;transform-origin:center bottom;filter:drop-shadow(0 10px 14px rgba(0,0,0,.35))}
@keyframes boing{0%{transform:rotate(-6deg) scale(1)}15%{transform:rotate(-6deg) scale(1.14,.9)}35%{transform:rotate(-6deg) scale(.92,1.1)}55%{transform:rotate(-6deg) scale(1.07,.96)}75%{transform:rotate(-6deg) scale(.98,1.02)}100%{transform:rotate(-6deg) scale(1)}}
#env.pop{animation:pop .6s ease forwards}
@keyframes pop{0%{transform:rotate(-6deg) scale(1)}40%{transform:rotate(-6deg) scale(1.3)}100%{transform:rotate(-6deg) scale(0);opacity:0}}
.hint{position:absolute;right:-2%;bottom:-62px;display:flex;align-items:flex-end;gap:6px;color:#ffe3ec;font-weight:700;font-size:clamp(1rem,4vw,1.35rem);line-height:1.15;text-align:center}
.hint svg{width:58px;height:58px;flex:0 0 auto;animation:wob 1.4s ease-in-out infinite}
@keyframes wob{50%{transform:translate(-3px,-5px)}}
#s2{display:none;flex-direction:column;gap:clamp(22px,5vw,40px);background:#67792d;color:#fff6ea;padding:48px clamp(24px,7vw,120px) 64px}
.row{max-width:none;display:flex;align-items:center;justify-content:center;gap:clamp(4px,1.5vw,20px);width:auto}
.row img{width:min(42vw,340px);height:auto;flex:0 0 auto}
.txt{flex:0 1 auto;text-align:center}
#s2.open{display:flex}
@keyframes fl{from{opacity:0;transform:translateX(-30px)}to{opacity:1;transform:none}}
@keyframes fr{from{opacity:0;transform:translateX(30px)}to{opacity:1;transform:none}}
@keyframes fu{from{opacity:0;transform:translateY(24px)}to{opacity:1;transform:none}}
.txt h2{font-family:'Gaegu',cursive;font-weight:700;letter-spacing:.04em;line-height:1;font-size:clamp(2.2rem,10vw,6.5rem);color:#fff;margin-bottom:0}
.txt p{font-weight:400;line-height:1.5;font-size:clamp(1.05rem,4vw,1.5rem)}
.letter{width:100%;max-width:none;color:#fff6ea;font-family:'Gaegu','Comic Sans MS',cursive;padding:0 clamp(4px,3vw,16px);line-height:1.5;font-size:clamp(1.15rem,4.4vw,1.5rem)}
.letter p{margin-bottom:1em}
.letter .sig{text-align:right;margin:1.4em 0 0}

/* ===== Section 3: botol kejutan (pink tua + hijau lumut) ===== */
#s3{display:none;flex-direction:column;text-align:center;background:#d6708e;color:#fff6ea;padding:56px 16px 64px;
  --glass:rgba(255,255,255,.28);--edge:#f6c9d6;--cork:#67792d;--accent:#67792d;--card:#fff6ea;--shadow:rgba(60,10,30,.35)}
#s3.open{display:flex}
#s3 h2{font-family:'Lora',Georgia,serif;font-weight:500;font-size:clamp(1.8rem,7vw,2.8rem);color:#fff6ea;margin-bottom:6px}
#s3 .sub3{color:#ffe3ec;max-width:34ch;line-height:1.4;font-size:clamp(1.15rem,4.4vw,1.5rem);margin-bottom:18px}
#s3 .stage3{position:relative;width:min(210px,60vw);margin:6px auto 0}
#s3 .bottle{position:relative;transform-origin:50% 90%}
#s3 .cork{width:34%;height:28px;margin:0 auto;background:var(--cork);border-radius:8px 8px 4px 4px;box-shadow:inset 0 -5px 0 rgba(0,0,0,.15);position:relative;z-index:2}
#s3 .neck{width:36%;height:46px;margin:-4px auto 0;border:3px solid var(--edge);border-bottom:0;border-radius:10px 10px 0 0;background:var(--glass)}
#s3 .body{position:relative;width:100%;aspect-ratio:210/380;margin-top:-3px;border:3px solid var(--edge);border-radius:38% 38% 14% 14%/22% 22% 8% 8%;background:var(--glass);overflow:hidden;box-shadow:0 18px 30px -12px var(--shadow),inset 12px 0 18px rgba(255,255,255,.2)}
#s3 .body::after{content:"";position:absolute;left:9%;top:12%;width:7%;height:48%;border-radius:20px;background:rgba(255,255,255,.35);pointer-events:none}
#s3 .item{position:absolute;width:42px;height:42px;border:0;border-radius:11px;padding:0;cursor:pointer;display:grid;place-items:center;background:var(--c);
  box-shadow:inset 0 3px 0 rgba(255,255,255,.45),inset 0 -5px 0 rgba(0,0,0,.14),inset 3px 0 0 rgba(255,255,255,.2),0 4px 0 rgba(0,0,0,.22);
  transition:left .22s ease,top .22s ease,transform .22s ease,opacity .3s,filter .3s}
#s3 .item:hover{transform:scale(1.15) rotate(var(--r,0deg));z-index:3}
#s3 .item:focus-visible,#s3 .btn:focus-visible,#s3 .close:focus-visible{outline:3px solid #fff6ea;outline-offset:3px}
#s3 .item svg{width:26px;height:26px;display:block;pointer-events:none}
#s3 .item.read{opacity:.5;filter:saturate(.5)}
#s3 .item.pick{animation:pick .6s ease;z-index:4}
@keyframes pick{50%{transform:scale(1.5) rotate(10deg)}}
#s3 .shaking{animation:shake .12s linear infinite}
@keyframes shake{0%{transform:translate(0,0) rotate(0)}25%{transform:translate(-9px,-4px) rotate(-6deg)}50%{transform:translate(7px,3px) rotate(5deg)}75%{transform:translate(-6px,-3px) rotate(-4deg)}100%{transform:translate(0,0) rotate(0)}}
#s3 .btn{margin-top:26px;font:inherit;font-weight:700;font-size:1.3rem;color:#fff6ea;background:var(--accent);border:0;border-radius:999px;padding:12px 30px;cursor:pointer;box-shadow:0 5px 0 rgba(0,0,0,.22)}
#s3 .btn:active{transform:translateY(3px);box-shadow:0 2px 0 rgba(0,0,0,.22)}
#s3 .btn:disabled{opacity:.6;cursor:wait}
#s3 .count{margin-top:14px;color:#ffe3ec;font-size:1.15rem}
#s3 .overlay{position:fixed;inset:0;background:rgba(50,15,30,.55);display:none;align-items:center;justify-content:center;padding:20px;z-index:10}
#s3 .overlay.open{display:flex}
#s3 .modal{background:var(--card);color:#3f4c18;width:min(380px,100%);border-radius:22px;padding:30px 26px 26px;box-shadow:0 24px 60px var(--shadow);position:relative;animation:rise .3s ease}
@keyframes rise{from{transform:translateY(24px) scale(.94);opacity:0}}
#s3 .modal .emoji{width:64px;height:64px;border-radius:18px;background:var(--c);display:grid;place-items:center;margin:0 auto 14px;box-shadow:inset 0 3px 0 rgba(255,255,255,.45),inset 0 -5px 0 rgba(0,0,0,.14),0 4px 0 rgba(0,0,0,.2)}
#s3 .modal .emoji svg{width:44px;height:44px}
#s3 .modal h3{font-family:'Lora',Georgia,serif;font-weight:500;margin-bottom:10px;font-size:1.5rem;color:#67792d}
#s3 .modal p{margin-bottom:20px;line-height:1.5;color:#55603a;font-size:1.3rem}
#s3 .modal .btn{margin-top:0}
#s3 .close{position:absolute;top:10px;right:12px;border:0;background:none;font-size:26px;color:#a8456a;cursor:pointer;line-height:1}
@media (prefers-reduced-motion:reduce){#s3 .shaking,#s3 .item.pick,#s3 .modal{animation:none}#s3 .item{transition:none}}

/* ===== Responsive ===== */
/* HP kecil (target 360px) */
@media (max-width:480px){
  section{min-height:600px;padding:20px}
  h1{font-size:clamp(1.5rem,7.6vw,2.2rem)}
  .sub{font-size:clamp(1.5rem,7vw,2rem)}
  .stage{width:76vw;margin-top:10px;margin-bottom:56px}
  .hint{bottom:-54px;font-size:1rem}
  .hint svg{width:44px;height:44px}
  #s2{padding:36px 18px 48px;gap:24px}
  .row{gap:10px}
  .row img{width:38vw}
  .txt h2{font-size:clamp(1.7rem,9.4vw,2.4rem)}
  .letter{font-size:1.05rem;line-height:1.55;padding:0}
  #s3{padding:44px 16px 52px}
  #s3 h2{font-size:clamp(1.4rem,7vw,1.8rem)}
  #s3 .sub3{font-size:1.05rem;margin-bottom:14px}
  #s3 .stage3{width:min(190px,54vw)}
  #s3 .item{width:38px;height:38px}
  #s3 .item svg{width:24px;height:24px}
  #s3 .btn{font-size:1.15rem;padding:10px 26px;margin-top:22px}
  #s3 .count{font-size:1rem}
  #s3 .modal{padding:26px 20px 22px}
  #s3 .modal h3{font-size:1.35rem}
  #s3 .modal p{font-size:1.15rem}
}
/* Tablet (target 768px) */
@media (min-width:481px) and (max-width:1023px){
  .stage{width:min(62vw,430px)}
  #s2{padding:56px 48px 64px}
  .row img{width:min(36vw,300px)}
  .txt h2{font-size:clamp(3rem,9vw,5rem)}
  .letter{max-width:720px;margin:0 auto;font-size:1.3rem}
  #s3 .stage3{width:min(230px,34vw)}
}
/* Desktop (target 1024px ke atas) */
@media (min-width:1024px){
  .stage{width:min(40vw,430px)}
  #s2{padding:72px 120px 80px}
  .row img{width:340px}
  .txt h2{font-size:clamp(4.5rem,8vw,6.5rem)}
  .letter{max-width:820px;margin:0 auto;font-size:1.5rem}
  #s3 .stage3{width:240px}
  #s3 .item{width:46px;height:46px}
  #s3 .item svg{width:28px;height:28px}
}

/* ===== Efek muncul (fade) + typewriter + drip antar section ===== */
body{--dh:max(140px,9.72vw)}
.js .fx{opacity:0;transform:translateY(24px);transition:opacity .9s ease var(--d,0s),transform .9s ease var(--d,0s)}
.js .fx-l{transform:translateX(-60px)}
.js .fx-r{transform:translateX(60px)}
.js .fx.in{opacity:1;transform:none}
.js .w{opacity:0;transition:opacity .3s ease}
.js .w.on{opacity:1}
#s2,#s3{position:relative}
.drip{position:absolute;top:-1px;left:0;right:0;height:var(--dh);overflow:hidden;pointer-events:none}
.drip svg{display:block;width:100%;height:100%}
.js .drip svg{transform:scaleY(.15);transform-origin:top;transition:transform 1.6s cubic-bezier(.25,1.35,.5,1)}
.js .drip.in svg{transform:none}
#s2,#s3{padding-top:calc(var(--dh) + 16px)}
@media (prefers-reduced-motion:reduce){.js .fx,.js .w,.js .drip svg{transition:none;opacity:1;transform:none}}

/* ===== Pemutar musik (kiri bawah) ===== */
.player{position:fixed;left:14px;bottom:calc(14px + env(safe-area-inset-bottom,0px));z-index:5;display:flex;align-items:center;gap:12px;
  padding:8px 10px 8px 8px;border-radius:999px;background:#2c3813;border:1px solid rgba(255,246,234,.22);
  box-shadow:0 8px 22px rgba(0,0,0,.3);color:#fff6ea;font-family:'Gaegu','Comic Sans MS',cursive}
.player .disc{width:44px;height:44px;flex:0 0 auto;border-radius:50%;
  background:radial-gradient(circle,#f4a7bd 0 9%,#d6708e 10% 21%,#15150f 22% 100%);
  box-shadow:inset 0 0 0 3px #232b0f,0 0 0 1px rgba(255,246,234,.18);animation:spin 4s linear infinite;animation-play-state:paused}
.player.playing .disc{animation-play-state:running}
@keyframes spin{to{transform:rotate(360deg)}}
.player .meta{min-width:62px;line-height:1.05}
.player .ttl{font-weight:700;font-size:1.2rem}
.player .art{font-size:.95rem;color:#f4a7bd;letter-spacing:.05em}
.player .eq{display:flex;align-items:flex-end;gap:3px;height:22px}
.player .eq i{display:block;width:4px;height:8px;border-radius:2px;background:#f4a7bd;animation:eq .9s ease-in-out infinite alternate;animation-play-state:paused}
.player .eq i:nth-child(2){height:14px;animation-delay:-.3s}
.player .eq i:nth-child(3){height:10px;animation-delay:-.6s}
.player .eq i:nth-child(4){height:6px;animation-delay:-.15s}
.player.playing .eq i{animation-play-state:running}
@keyframes eq{from{transform:scaleY(.45);transform-origin:bottom}to{transform:scaleY(1.5);transform-origin:bottom}}
.player .pbtn{width:40px;height:40px;flex:0 0 auto;border:0;border-radius:50%;background:#f4a7bd;display:grid;place-items:center;cursor:pointer;padding:0}
.player .pbtn:focus-visible{outline:3px solid #fff6ea;outline-offset:2px}
.player .pbtn svg{width:20px;height:20px;fill:#2c3813}
.player .i-play{display:block}.player .i-pause{display:none}
.player.playing .i-play{display:none}.player.playing .i-pause{display:block}
@media (max-width:480px){
  .player{left:10px;gap:8px;padding:6px 8px 6px 6px}
  .player .disc{width:36px;height:36px}
  .player .meta{min-width:46px}
  .player .ttl{font-size:1.05rem}.player .art{font-size:.85rem}
  .player .pbtn{width:34px;height:34px}.player .pbtn svg{width:17px;height:17px}
}
@media (prefers-reduced-motion:reduce){.player .disc,.player .eq i{animation:none}}

/* Pemutar: muncul sendiri saat halaman dibuka (tidak lewat observer fade) */
.player{animation:playerIn .8s ease .5s both}
@keyframes playerIn{from{opacity:0;transform:translateY(20px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.player{animation:none}}
