/* 手機 / 平板版（< 1280px）：依 375px 手機設計稿改為直式流動排版 */
@media (max-width: 1279px) {
  :root { --pad: max(20px, calc((100vw - 720px) / 2)); }
  body { font-size: 16px; }

  .section { height: auto !important; }
  .stage {
    position: relative; left: auto; top: auto; width: 100%; height: auto; margin: 0;
    padding-inline: var(--pad);
  }
  .h2, .partner__h2, .member__head h2, .news__row h2, .platform__lead h2, .contact h2 {
    font-size: 28px; line-height: normal; white-space: normal;
  }
  .tag { font-size: 12px; letter-spacing: .18px; }
  .btn { width: 100%; }

  /* ---------- 導覽列 ---------- */
  .nav { height: 64px; box-shadow: 0 1px 0 rgba(0,0,0,.06); }
  .nav__inner { width: 100%; padding-inline: 20px; }
  .nav .logo { left: 20px; top: 16px; }
  .nav__cta { display: none; }
  .nav__toggle {
    display: block; position: absolute; right: 12px; top: 10px; width: 44px; height: 44px;
    padding: 10px; border: 0; background: none; cursor: pointer;
  }
  .nav__toggle img { width: 24px; height: 24px; }
  .nav__links {
    position: fixed; left: 0; right: 0; top: 64px; transform: none; height: auto;
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px 20px 16px;
    background: #fff; box-shadow: 0 12px 24px rgba(0,0,0,.08);
    display: none;
  }
  .nav.is-open .nav__links { display: flex; }
  .nav__links a { height: 48px; justify-content: flex-start; font-size: 16px; border-bottom: 1px solid #eff4f8; }
  .nav__links a.is-active { font-size: 16px; }
  .nav__links a.is-active::after { display: none; }

  /* ---------- Hero ---------- */
  .hero { --k: .46; background: radial-gradient(circle at 50% 78%, #cdf4ff 0, #fff 62%); }
  .hero .stage { padding-top: 104px; text-align: center; display: flex; flex-direction: column; }
  .hero__art { order: 5; }
  .hero__cta { width: 100%; }
  .hd-map1, .hd-map2, .hd-e1, .hd-e2, .hd-e3, .hd-bg { display: none; }
  .hero__title {
    position: static; transform: none; display: block; font-size: 28px; line-height: 1.4; white-space: normal;
  }
  .hero__title span { display: block; }
  .hero__desc { position: static; transform: none; margin-top: 16px; font-size: 16px; white-space: normal; }
  .hero__cta { position: static; transform: none; flex-direction: column; gap: 12px; margin: 24px auto 0; max-width: 335px; }
  .hero__art {
    display: block; position: relative; height: calc(var(--k) * 930px); overflow: hidden;
    margin: 24px calc(var(--pad) * -1) 0;
  }
  .hero__art-in {
    display: block; position: absolute; left: 50%; top: calc(var(--k) * -540px); width: 1920px; height: 1500px;
    margin-left: -960px; transform: scale(var(--k)); transform-origin: 50% 0;
  }

  /* ---------- 數據 ---------- */
  .stats { gap: 12px; padding: 32px 20px; align-items: flex-start; }
  .stat { flex: 1 1 0; width: auto; gap: 12px; }
  .stat b { font-size: 28px; line-height: normal; }
  .stat span { font-size: 14px; }
  .stats__div { align-self: center; flex: none; }

  /* ---------- 關於我們 ---------- */
  .about { padding: 40px 0; }
  .about .stage { display: flex; flex-direction: column; gap: 24px; }
  .about__head { position: static; }
  .about__text { position: static; width: auto; padding: 0; font-size: 16px; letter-spacing: .48px; }
  .about__text h3 { font-size: 20px; margin-bottom: 12px; }
  .diagram {
    --z: .5; position: relative; left: 50%; top: auto; transform: translateX(-50%);
    zoom: var(--z); flex: none; margin-top: 16px;
  }

  /* ---------- 平台服務 ---------- */
  .platform { background-image: linear-gradient(253.9deg, #007497 4.655%, #1bb5d5 38.253%); }
  .platform .stage { display: flex; flex-direction: column; gap: 64px; padding-top: 40px; padding-bottom: 0; }
  .platform__ellipse { display: none; }
  .platform__lead { position: static; width: auto; gap: 24px; }
  .platform__lead > div { display: flex; flex-direction: column; gap: 12px; }
  .platform__lead h2 { margin-top: 0; }
  .platform__lead p { font-size: 16px; letter-spacing: .48px; }
  .platform__lead .btn { align-self: stretch; }
  .feats { display: flex; flex-direction: column; gap: 40px; }
  .feat { position: static; width: auto; align-items: flex-start; gap: 20px; }
  .feat__cube { width: 60px; height: 60px; }
  .feat__body { width: auto; flex: 1; min-width: 0; }
  .feat__body h3 { font-size: 20px; }
  .feat__body .sub, .feat__body p:last-child { font-size: 14px; letter-spacing: 0; }
  .platform__img {
    position: relative; left: auto; top: auto; order: 3; height: 240px;
    margin: 0 calc(var(--pad) * -1); width: auto;
  }
  .platform__photo { left: 50%; right: auto; bottom: -110px; width: 560px; height: 411px; margin-left: -240px; transform: none; }
  .platform__rect { display: none; }

  /* ---------- 廠商合作 ---------- */
  .partner { padding: 40px 0; }
  .partner .stage { display: flex; flex-direction: column; gap: 24px; }
  .partner__map { left: auto !important; right: 0; top: -47px !important; width: 512px !important; height: 397px !important; transform: rotate(180deg) scaleX(-1) !important; }
  .partner__head, .partner__desc, .partner__btns { position: relative; left: auto; top: auto; padding: 0; }
  .partner__desc { font-size: 16px; letter-spacing: .48px; white-space: normal; }
  .partner__btns { flex-direction: column; gap: 12px; }
  .partner__h2 { font-size: 28px; }
  .partner__h2 .row { gap: 8px; flex-wrap: wrap; }
  .partner__logo { gap: 10.5px; padding-bottom: 1.4px; }
  .partner__logo img:first-child { width: 90px; height: 25.2px; }
  .partner__logo img:last-child { width: 123.8px; height: 18.2px; }
  .partner__cards {
    position: relative; left: auto; top: auto; width: auto; margin: 16px calc(var(--pad) * -1) 0;
    padding: 0 var(--pad); overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--pad);
    scrollbar-width: none;
  }
  .partner__cards::-webkit-scrollbar { display: none; }
  .pcard { flex: 0 0 291px; scroll-snap-align: start; }
  .trust {
    position: relative; left: auto; top: auto; transform: none; margin: 40px auto 0; width: 335px; max-width: 100%;
    display: grid; grid-template-columns: 124px 124px; gap: 48px 28px; justify-content: center; padding: 28px;
  }
  .trust__item { width: 124px; }
  .trust__item img { width: 40px; height: 40px; }
  .trust__line { display: none; }
  .trust__mline { display: block; position: absolute; }
  .trust__mline--h { left: calc(50% - .5px); top: calc(50% - 138px); width: 1px; height: 276px; transform: rotate(90deg); }
  .trust__mline--v { left: calc(50% - .5px); top: 28px; width: 1px; height: calc(100% - 56px); }

  /* ---------- 會員服務 ---------- */
  .member { background-image: linear-gradient(126.1deg, #151c28 7.17%, #1a577b 84.18%); }
  .member .stage { display: flex; flex-direction: column; gap: 64px; padding-block: 40px; }
  .member__map { left: 0 !important; top: auto !important; bottom: 80px; width: 535px !important; height: 416px !important; opacity: .15; transform: scaleY(-1) !important; }
  .member__glow { display: none; }
  .member__head { position: relative; left: auto; top: auto; gap: 12px; }
  .member__head h2 { margin-top: 0; font-size: 28px; white-space: normal; }
  .member__head p { font-size: 16px; letter-spacing: .48px; }
  .member__grid { position: relative; left: auto; top: auto; width: auto; grid-template-columns: 1fr; gap: 40px; }
  .mpanels {
    position: relative; left: auto; top: auto; width: auto; height: 180px; gap: 10px;
    margin: 0 calc(var(--pad) * -1); padding: 0 var(--pad); overflow-x: auto; scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--pad); scrollbar-width: none;
  }
  .mpanels::-webkit-scrollbar { display: none; }
  .mpanel, .mpanel--main { flex: 0 0 min(335px, calc(100vw - 40px)); width: min(335px, calc(100vw - 40px)); height: 180px; scroll-snap-align: start; }
  .mpanel .shade, .mp-oval-d { display: none; }
  .moval { display: block; position: absolute; left: calc(50% - 197.5px); top: 65px; width: 498px; height: 249px; transform: rotate(180deg); }
  .moval img { position: absolute; left: -30.12%; top: -60.24%; width: 160.24%; height: 220.48%; }
  .mpanel .mp-img { opacity: 1; }
  .mpanel:nth-child(3) .ctr { left: calc(50% + 30.5px) !important; top: calc(50% + 20.5px) !important; }
  .mpanel:nth-child(4) .ctr { left: calc(50% + 113.5px) !important; top: calc(50% + 29.5px) !important; width: 570px !important; height: 377px !important; }
  .mpanel:nth-child(5) .ctr { left: 50% !important; top: calc(50% + 9px) !important; width: 537px !important; height: 356px !important; }
  .mpanel:nth-child(2) .mp-dim { background: rgba(0,0,0,.3); }
  .mpanel:nth-child(n+3) .mp-dim { background: rgba(0,0,0,.2); }
  .mcube { left: 24px; top: 50%; transform: translateY(-50%); z-index: 2; }
  .mpanel__text { left: 100px; bottom: auto; top: calc(50% + .5px); transform: translateY(-50%); width: 211px; z-index: 2; }
  .mdots { display: flex; justify-content: center; gap: 8px; margin-top: -48px; }
  .mdots i { width: 6px; height: 6px; border-radius: 5px; background: #007497; transition: width .2s, background .2s; }
  .mdots i.on { width: 12px; background: #2aceed; }
  .member__cta { position: relative; left: auto; top: auto; width: auto; flex-direction: column; gap: 24px; padding-inline: 20px; }
  .member__cta p { display: block; text-align: center; white-space: normal; font-size: 20px; }
  .member__cta p > span { display: block; }
  .member__cta p .nw { display: flex; gap: 4px; align-items: center; justify-content: center; }
  .member__cta p img { width: 16px; height: 16px; }
  .member__cta .btn { width: auto; }

  /* ---------- 最新公告 ---------- */
  .news .stage { display: flex; flex-direction: column; gap: 40px; padding-block: 40px; }
  .news__head { position: relative; left: auto; top: auto; width: auto; }
  .news__row { flex-direction: column; align-items: flex-start; gap: 24px; }
  .news__view {
    position: relative; left: auto; top: auto; width: auto; height: auto;
    margin: 0 calc(var(--pad) * -1); padding-left: var(--pad);
  }
  .news__track { gap: 10px; }
  .ncard { width: min(335px, calc(100vw - 40px)); }

  /* ---------- 聯絡我們 / Footer ---------- */
  .footer .stage { padding-inline: 0; padding-top: 40px; }
  .footer__img { left: calc(100% - 187px); width: 1920px; height: 621px; transform: translateX(-50%); }
  .contact {
    position: relative; left: auto; top: auto; width: auto; margin: 0 max(20px, calc((100vw - 560px) / 2));
    padding: 40px 24px; gap: 32px;
  }
  .contact .btn { width: auto; }
  .footer__info {
    position: relative; left: auto; top: auto; width: 100%; height: auto; margin-top: -76px;
    padding: 140px 20px 64px; background: #172b3c; display: flex; flex-direction: column; align-items: center; gap: 32px;
  }
  .footer__info > img.footer__bg { display: none; }
  .footer__phone, .footer__links, .footer__copy { position: static; }
  .footer__info .logo { position: relative; left: auto; top: auto; width: 120px; height: 37px; }
  .footer__copy { width: 314px; max-width: 100%; }
}

/* 手機寬度：球形圖示縮放比例 */
@media (min-width: 480px) and (max-width: 1279px) { .hero { --k: .7; } }
@media (min-width: 600px) and (max-width: 1279px) { .diagram { --z: .8; } }
@media (min-width: 768px) and (max-width: 1279px) {
  .hero { --k: .9; }
  .hero__title { font-size: 40px; }
  .btn { width: auto; min-width: 200px; }
  .hero__cta { flex-direction: row; justify-content: center; max-width: none; }
  .partner__btns { flex-direction: row; }
}
