/* ===== Tablet ===== */
@media (max-width:820px){
 :root{--maxw:680px}
}

/* ===== Mobile (<=640px) ===== */
@media (max-width:640px){
 .hero{padding-top:calc(env(safe-area-inset-top,0px) + 74px)}
 .hero__title{max-width:13ch}
 /* countdown: 4 across but compact */
 .countdown__grid{gap:8px}
 .cd-box{padding:14px 6px;border-radius:14px}
 .gallery__stage{gap:6px}
 .gallery__nav{position:absolute;top:50%;transform:translateY(-50%)}
 .gallery__nav--prev{left:8px}
 .gallery__nav--next{right:8px}
 .gallery__frame{width:100%;aspect-ratio:3/4;max-height:74vh}
 .wishes__list{grid-template-columns:1fr}
 .share-row{flex-direction:column;align-items:stretch}
 .share-row .btn-ghost{width:100%}
 .music-controls{top:calc(env(safe-area-inset-top,0px) + 10px);right:10px}
 .music-toggle{width:40px;height:40px}
}

/* ===== Small phones (<=380px) ===== */
@media (max-width:380px){
 .countdown__grid{grid-template-columns:repeat(2,1fr);max-width:260px}
 .cd-num{font-size:32px}
 .gate__btn{padding:15px 22px}
 .section-title{font-size:26px}
}

/* ===== Landscape short screens ===== */
@media (max-height:520px) and (orientation:landscape){
 .hero{min-height:auto;padding-top:90px;padding-bottom:50px}
 .hero__cake{display:none}
}

/* ===== Large screens ===== */
@media (min-width:1200px){:root{--maxw:1120px}}

/* Remove hover lift on touch devices to avoid sticky states */
@media (hover:none){
 .btn-primary:hover,.btn-ghost:hover,.gallery__nav:hover,.gate__btn:hover{transform:none}
}
