@media (max-width: 820px) {
  .is-mobile{
    display: block !important;
  }
  .is-desktop{
    display: none !important;
  }
  #carousel-section-content-wrapper{
    margin-top: 0;
  }
  #burgerBtn, #closeMenuBtn{
    width: 70px;
    border-radius: 100px;
  }
  #burgerBtn svg, #closeMenuBtn svg{
    background-color: #fff;
    border-radius: 3px;
  }
  #mobileMenu { perspective: 900px; }
  .mobile-menu-panel{
    width: 100%;
    background-color: #0f0f0f;
    background-image: url(assets/images/noise-bg.png);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
.menu3d{
    position: relative;
    width: 320px;                 
    height: calc(var(--item-h) * var(--visible));
    margin: 24px auto;
    overflow: visible;
    perspective: var(--perspective);
    touch-action: pan-y;          
    user-select: none;
      perspective-origin: left center;  

  }
  .menu3d-list{
    position: absolute;
    inset: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    transform-style: preserve-3d;
    pointer-events: auto;
    touch-action:auto;
  }

  .menu3d-list li{
  position: absolute;      
  top: 0;
  left: 0;     
  right: auto;                       /* ✅ 防止舊樣式影響 */
  margin: 0;                         /* ✅ 防止 auto 居中 */
  width: 100%;                  /* 滿闊 */
  text-align: left;             /* 文字靠左 */
  padding-left: 0;           /* 左側內距 */
  padding-right: 12px;          /* 防止文字被裁 */
        font-size: 3rem;
  color: #fff;
  will-change: transform, opacity, filter;
  transform-origin: left center !important;
  transform-box: border-box;   /* 確保以邊框盒為基準 */
  box-sizing: border-box;      
  transition: box-shadow 0.2s ease;
          font-family: Manrope, sans-serif;
        font-weight: 100;
  }

  .menu3d, .menu3d-list, .menu3d-list li { pointer-events: auto; }
.menu3d { position: relative; z-index: 60; }
.menu3d-list li { position: relative; }
  .language-switcher ul {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 25px;
  }
  .language-switcher li{
    position: relative;
  }
  .language-switcher li:after {
    content: '|';
    position: relative;
    padding: 10px;
  }

  .language-switcher li:last-child:after{
    content: '';
  }
  #top{
    height: auto;
  }
      #hero-third-headline {
        margin-top: -70%;
        position: relative;
        min-height: 500px;
        top:0%;
        height: auto;

    }
      #top-second-section {
    min-height: 100vh;
    margin-top: -5vh;
    height: auto;
  }
  #sub-headline{
    top:0; 
    opacity:0;
  }
.star-night-ctn-mobile {
        width: 150px;
        height: 40px;
  border-radius: 50px;
  overflow: hidden;           /* 關鍵：讓圖片被裁切 */
  position: relative;
}

.star-night-ctn-mobile img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;          /* 令圖片等比例覆蓋整個容器 */
}
/* Mobile：直向列表本身就由 CSS 排版；GSAP 只改 margin/scale/opacity */
  .card-slider {
    overflow: visible;   /* 交回原生直向捲動 */
    height: auto;
  }
  .cards-wrapper {
    display: flex;
    flex-direction: column;      
    transform: none !important;
    height: auto;
    padding: 40px 0;
    width: 100%;
    gap: 0;            
  }
  .cards-wrapper > * {
    content-visibility: auto;
    contain-intrinsic-size: 600px 400px;
  }
  .card {
    flex: 1 1 auto;
    width: 90%;
    border-radius: 30px;
    margin-left: auto;
    margin-right: auto;
    align-items: start;
    justify-content: space-between;
    height: calc(100vw * 2.5 / 2);
    will-change: transform; 
    padding: 40px 40px;
    margin-bottom: 25px;
  }


  .card:nth-child(1) { transform: rotate(0); }
  .card:nth-child(2) { transform: rotate(0); }
  .card:nth-child(3) { transform: rotate(0); }
  .card:nth-child(4) { transform: rotate(0); }
  .marquee-item img{
    width: 60px;
  }
  .get-started-btn{
    display: block;
    left: 0;
    right: 0;
    margin: 0 auto;
    text-align: center;
    z-index: 3;
  }

}
/* @media (max-width: 820px){
  #carousel-section-content-ctn { position: static; }
} */
@media (max-width: 480px){
  main{
    padding-bottom: 50px;
  }
  button#storeBtn{
    padding-left: 1rem;
    padding-right: 1rem;
  }
  #headline h1{
    line-height: 1.4;
    font-size: 4rem;
  }
  #sub-headline h2{
    font-size: 1.2rem;
  }
  .image-group {
    width: 40%;
    height: 50%;
  }
  .rewards-description{
    max-width: 75% !important;
  }
  #carousel-section-content-ctn{
    position: relative;
    margin-bottom: 200px;
    padding-right: 4rem;
  }
  .feature-tag{
    margin-right: 0;
    margin-bottom: 60px;
  }
  /* #registration{
    height:80vh;
    padding-top: 20px;
    margin-top: 0px;
  } */
  #progress-bar{
    left: 0;
    right: 0;
    bottom: 43%;
    margin:0 auto;
    width: 70%;
    display: inline-block;
  }
  /* .registration-left-control{
    content:'<';
    position: absolute;
    top: -11px;
    left: -18px;
  }
  .registration-right-control{
    content:'>';
            position: absolute;
        top: -11px;
        right: -20px;
  } */
  #progress-bar .bar{
    position: absolute;
    top: 0;
  }
  .cube-bg{
    top: 35%;
    border-radius: 30px;
  }
  #registration h5{
    font-size: 1.2rem;
  }
  #registration h2{
    font-size: 2rem;
  }
  .phone img{
    width: 40%;
  }
  .download-ctn{
    margin-top:10px;
  }
  .download-ctn img {
    height: 30px;
  }
    .card-slider {
    overflow-x: auto;                /* 原生橫向滑動 */
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;   /* 可選：Scroll Snap */
    scrollbar-width: none;           /* Firefox 隱藏捲軸 */
  }
  .card-slider::-webkit-scrollbar { display: none; } /* WebKit 隱藏捲軸 */

  .cards-wrapper > * {
    scroll-snap-align: start;        /* 每張卡貼齊開始位 */
  }
}
@media (max-width: 375px)  and (max-height: 670px) {
  #registration h5 {
    font-size: 0.8rem;
  }
  #registration h2 {
    font-size: 1.5rem;
  }
  .phone img {
      width: 30%;
  }
  .download-ctn img {
    height: 25px;
  }
}