/* ===== Máy tính bảng và điện thoại ===== */
@media(max-width:1200px){.balloon{display:none}}

@media(max-width:820px){
  main{padding:20px 14px 40px}
  .grid{grid-template-columns:1fr;gap:16px}
  .grid>section{display:contents}
  /* khung bánh dính trên đầu khi cuộn bảng điều khiển */
  .stage{position:sticky;top:calc(8px + env(safe-area-inset-top,0px));z-index:3;padding:6px 8px 10px}
  body.typing .stage,body.gift .stage{position:relative}
  #cake,#ov{height:36vh;min-height:190px}
  body.gift #cake,body.gift #ov{height:auto;min-height:0}
  body[data-phase="edit"]:not(.gift) .stage .hint{display:none}
  .stage .row{gap:6px}
  .stage .btn{font-size:.95rem;padding:6px 14px}
  .stage .btn.big{font-size:1.05rem;padding:7px 18px}
  .extras,.wish{margin-top:0}
  .wish{scroll-margin-top:calc(36vh + 90px)}
  .tipcard{transform:none}
}
/* điện thoại xoay ngang */
@media(max-width:820px) and (max-height:520px){
  .stage{position:relative}
  #cake,#ov{height:62vh;min-height:0}
}

@media(max-width:620px){
  .hero{padding-right:84px}
  .badge{width:88px;height:88px;font-size:.72rem;top:-6px;right:-4px}
  .badge span{font-size:1.2rem}
  .bunting i:nth-child(n+9){display:none}
  .deco{display:none}
  .panel{border-radius:22px;padding:14px}
  .tabs{gap:4px}
  .tab{font-size:.66rem;padding:5px 1px;border-radius:12px}
  .tab svg{width:18px;height:32px}
  .tipcard svg{flex-basis:56px;width:56px;height:56px}
  .wish{padding:18px;transform:rotate(-1deg)}
  .wish .to{font-size:1.8rem}
  label.tg{font-size:.88rem;padding:5px 10px}
  .foot .btn{flex:1}
  .party .row{font-size:22px}
  .rb-card{padding:12px}
  .rb-t{font-size:1.05rem}
  .tk-text{font-size:1.5rem}
  .tk-body{padding:16px 20px 14px}
}
@media(max-width:380px){
  h1{font-size:1.75rem}
  .stage .btn{font-size:.88rem;padding:5px 10px}
  .stage .btn.big{font-size:.98rem;padding:6px 14px}
}

/* Người dùng muốn giảm chuyển động: tắt animation, giữ trạng thái cuối */
@media(prefers-reduced-motion:reduce){
  *{animation:none!important;transition:none!important}
  .half-l{transform:translate(-30px,4px) rotate(-6deg)}
  .half-r{transform:translate(30px,4px) rotate(6deg)}
}
