/* iPhone / WebKit mobile layout overrides — loaded after bundle.css
 *
 * Short-landscape desktop rebuild (890×626 AND 678×466):
 * - Assets: -m only in portrait; landscape uses desktop artboards/video
 * - JS matchMedia: short landscape (max-height 700 + landscape) = isDesktop
 * - CSS below: same desktop short-land rules for both widths
 *
 * Do NOT set global box-sizing:border-box — bundle uses content-box on
 * .viewport-container (height + padding-top). Border-box shrinks the
 * content area by --headerHeight (e.g. 466→411 at 678x466) vs prod.
 */

/* Global reboot for iPhone overflow */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
  overscroll-behavior-y: none;
  -webkit-text-size-adjust: 100%;
}

/* Overflow clamp only — do NOT set height:auto globally.
 * That overrides img[height] (e.g. navbar .icon img height="20px")
 * and blows desktop header icons up to intrinsic size (~289px). */
img,
video,
canvas {
  max-width: 100%;
}

/* Full-bleed slide artboards: match prod (max-width:none + height:100%). */
.opening__content__title,
.opening__content__tag,
.leadIn__container__image,
.hkNo1__container__image,
.introduction__container__img,
.introduction__container__img__text {
  max-width: none;
}

.navbar .icon img {
  height: 20px;
  width: auto;
  max-width: none;
}

.navbar__btn-cta img {
  width: 24px;
  max-width: 24px;
  height: auto;
}

.navbar__btn-toggler img {
  width: 34px;
  max-width: 34px;
  height: auto;
}

/* Prefer small / dynamic viewport; JS may still set --vh in px */
:root {
  --vh: 100dvh;
  --vh-fallback: 100svh;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
}

/* Prefer dynamic viewport on iPhone so Safari/home bottom bar shortens --vh.
 * JS still overrides with visualViewport.height px when available. */
.is-iphone {
  --vh: 100svh;
}

/* Keep bundle content-box height+padding; only add safe-area on iPhone. */
.viewport-container {
  width: 100%;
  max-width: 100%;
  height: var(--vh, 100svh);
}

/*
 * Match bundle padding-top: headerHeight only on Duo / mid portrait.
 * Adding --sat here made the content pane (and tin CTAs / tryjoin cluster)
 * jump when iOS safe-area changed on the simulator — 30天無憂試飲 looked
 * like it moved up. Notch clearance stays on .navbar padding there.
 *
 * Folded portrait still needs --sat so opening video / in-video headline
 * stay clear of the notch (see max-width:499.98 block below).
 */
.is-iphone .viewport-container {
  padding-top: var(--headerHeight);
}

/* Folded portrait only — restore notch offset for opening headline. */
@media screen and (orientation: portrait) and (max-width: 499.98px) {
  .is-iphone .viewport-container {
    padding-top: calc(var(--headerHeight) + var(--sat));
  }
}

/* 100vw → 100% (scrollbar / overflow). Safe on all breakpoints for these.
 * Do NOT put .hcp__txt__item here alone — parent .hcp__txt has no width, so
 * width:100% collapses items to 0. Give the parent width instead. */
.vital-disclaimer,
.introduction .frame-wrapper {
  width: 100%;
  max-width: 100%;
}

.hcp__txt {
  left: 0;
  right: 0;
  width: 100%;
}

.hcp__txt__item {
  width: 100%;
  max-width: 100%;
}

/* Mobile drawer only (<992 matches bundle desktop nav breakpoint).
 * NEVER apply fullscreen height to .navbar__menu on desktop — that
 * overrides bundle's horizontal bar (height:auto) and covers the page.
 *
 * Padding must match prod/bundle (7.5rem / 1.25rem) + safe-area.
 * Setting padding-*: env(sat) alone wiped bundle padding and jammed
 * menu links under the close/logo row. */
@media screen and (max-width: 991px) {
  .navbar__menu,
  .navbar__menu-overlay {
    width: 100%;
    max-width: 100%;
  }

  .navbar__menu {
    height: 100%;
    min-height: 100svh;
    min-height: 100dvh;
    padding-top: calc(7.5rem + var(--sat));
    padding-bottom: calc(7.5rem + var(--sab));
    padding-left: calc(1.25rem + var(--sal));
    padding-right: calc(1.25rem + var(--sar));
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
  }

  .vital-disclaimer {
    height: 100%;
    min-height: 100svh;
    min-height: 100dvh;
    padding-top: var(--sat);
    padding-bottom: var(--sab);
    padding-left: var(--sal);
    padding-right: var(--sar);
  }

  .navbar {
    padding-top: calc(0.875rem + var(--sat));
    padding-left: calc(0.875rem + var(--sal));
    padding-right: calc(0.875rem + var(--sar));
  }
  /* Portrait: sat padding shrinks when Safari URL bar collapses.
   * iPhone Safari only — other iOS browsers keep env(sat). */
  .is-iphone-safari .navbar {
    padding-top: 0.875rem !important;
    padding-left: calc(0.875rem + var(--sal, 0px)) !important;
    padding-right: calc(0.875rem + var(--sar, 0px)) !important;
  }
  /* Stable on Duo / mid — do not fold --sat into viewport pad (jumps). */
  .is-iphone-safari .viewport-container {
    padding-top: var(--headerHeight) !important;
  }

  /* Folded portrait Safari: keep notch offset (opening headline). */
  @media screen and (orientation: portrait) and (max-width: 499.98px) {
    .is-iphone-safari .viewport-container {
      padding-top: calc(var(--headerHeight) + min(var(--sat), 20px)) !important;
    }
  }
}

/*
 * Portrait nutrient (6th) — match prod ≤818 fan + cascade.
 * Prod initial fan: 001 farthest/smallest → 005 closest/biggest (vw).
 * GSAP buildMobileNutrientTL then sets all to width:60%; left:20% and
 * y peeks -5/90/95/100/105. Do not override left/width/top/overflow in ways
 * that hide cards after the stacked label.
 */
@media screen and (orientation: portrait) and (max-width: 818px) {
  /*
   * Match prod: section crops spill (overflow:hidden); container stays
   * visible so card rounded tops aren’t clipped under the title.
   */
  .nutrientPart {
    overflow: hidden;
  }

  .nutrientPart__container {
    position: relative;
    height: calc(var(--vh) - var(--headerHeight));
    margin-top: 0;
    overflow: visible;
  }

  /* Prod ≤818 initial fan (close=biggest=005) */
  .nutrientPart__card__wrapper-001 {
    z-index: 1;
    left: 20vw;
    width: 60vw;
    max-width: none;
  }

  .nutrientPart__card__wrapper-002 {
    z-index: 2;
    left: 15vw;
    width: 70vw;
    max-width: none;
  }

  .nutrientPart__card__wrapper-003 {
    z-index: 3;
    left: 10vw;
    width: 80vw;
    max-width: none;
  }

  .nutrientPart__card__wrapper-004 {
    z-index: 4;
    left: 5vw;
    width: 90vw;
    max-width: none;
  }

  .nutrientPart__card__wrapper-005 {
    z-index: 5;
    left: 0;
    width: 100vw;
    max-width: none;
  }

  .nutrientPart__card__wrapper,
  .nutrientPart__card__wrapper__inner {
    border-radius: 1.75rem !important;
  }

  .nutrientPart__title {
    margin-bottom: 0.75rem;
  }

  /*
   * Expanded detail card — assets are portrait (654×1040); size below header.
   */
  .nutrientPart__detailCard__wrapper,
  .nutrientPart__detailCard__cell__wrapper {
    --nutrient-detail-max-h: calc(var(--vh) - var(--headerHeight) - 1rem);
    aspect-ratio: 654 / 1040;
    width: auto !important;
    max-width: min(96vw, 640px) !important;
    height: min(
      var(--nutrient-detail-max-h),
      calc(min(96vw, 640px) * 1040 / 654)
    ) !important;
    max-height: var(--nutrient-detail-max-h) !important;
    overflow: hidden;
    top: calc((var(--vh) + var(--headerHeight)) / 2) !important;
    left: 50%;
  }

  .nutrientPart__detailCard,
  .nutrientPart__detailCard__cell {
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    max-height: none !important;
    object-fit: contain;
  }

  /* One tap closes expanded detail */
  .nutrientPart__detailCard__wrapper.active,
  .nutrientPart__detailCard__wrapper.active .nutrientPart__detailCard,
  .nutrientPart__detailCard__wrapper.active .nutrientPart__detailCard__cell {
    cursor: pointer;
  }
}

/* Folded portrait nutrient — initial Y peeks for 001 / 002 */
@media screen and (orientation: portrait) and (max-width: 499.98px) {
  .nutrientPart__card__wrapper-001 {
    transform: translate(0px, 1lvh);
  }

  .nutrientPart__card__wrapper-002 {
    transform: translate(0px, 12lvh);
  }
}

/* Unfolded portrait nutrient — fan peeks (match GSAP entrance) */
@media screen and (min-width: 500px) and (orientation: portrait) {
  .nutrientPart__card__wrapper-001 {
    transform: translate(0px, 8lvh) scale(0.9);
  }

  .nutrientPart__card__wrapper-002 {
    transform: translate(0px, 19lvh) scale(0.9);
  }

  .nutrientPart__card__wrapper-003 {
    transform: translate(0px, 32lvh) scale(0.9);
  }

  .nutrientPart__card__wrapper-004 {
    transform: translate(0px, 42lvh) scale(0.9);
  }

  .nutrientPart__card__wrapper-005 {
    transform: translate(0px, 53lvh) scale(0.9);
  }
}

/*
 * Duo unfolded portrait: cascade cards at 47.16vw (centered). Stack ys recalculated
 * for card height (~20% step gaps so previous titles peek; s clears section title).
 * Crop spill like prod on .nutrientPart only; keep container visible so
 * card tops aren’t cropped. Drop .container gutters for GSAP centering.
 */
@media screen and (min-width: 500px) and (max-width: 818px) and (orientation: portrait) {
  .nutrientPart {
    overflow: hidden;
  }

  /*
  /*
   * First-step title-m.webp (442×197). Numeral "2" is ~138px in-asset;
   * scale so "2" = 106px → height 197*(106/138). Margin 35px; GSAP raises at stacked.
   */
  .nutrientPart__title {
    display: block;
    position: relative;
    z-index: 6;
    width: auto;
    max-width: 85vw;
    height: calc(197px * 106 / 138);
    max-height: none !important;
    margin-top: 35px;
    margin-bottom: 0;
    margin-left: auto;
    margin-right: auto;
    padding-top: 0;
    object-fit: contain;
    object-position: center center;
  }

  .nutrientPart__container.container {
    max-width: none;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
    overflow: visible;
  }

  /* Fan step — 10% smaller than ≤818 60/70/80/90/100vw */
  .nutrientPart__card__wrapper-001 {
    z-index: 1;
    left: 23vw;
    width: 54vw;
    max-width: none;
  }

  .nutrientPart__card__wrapper-002 {
    z-index: 2;
    left: 18.5vw;
    width: 63vw;
    max-width: none;
  }

  .nutrientPart__card__wrapper-003 {
    z-index: 3;
    left: 14vw;
    width: 72vw;
    max-width: none;
  }

  .nutrientPart__card__wrapper-004 {
    z-index: 4;
    left: 9.5vw;
    width: 81vw;
    max-width: none;
  }

  .nutrientPart__card__wrapper-005 {
    z-index: 5;
    left: 5vw;
    width: 90vw;
    max-width: none;
  }

  /* Light nudge only — large top offset + overflow:hidden shaved the card crown. */
  .nutrientPart__card__title--001 {
    top: 0.75rem;
  }

  .nutrientPart__card__wrapper,
  .nutrientPart__card__wrapper__inner {
    border-radius: 2.5rem !important;
  }
}

@media screen and (max-width: 818px) {
  /*
   * Opening (1st):
   * - Portrait → mobile 720×1280 (main_web_mobile) + static-m
   * - Short landscape → desktop 1920×1080 via JS data-src-desktop
   * top:0 fills under the menu (avoids --main-c green strip when the
   * landscape white bar is shorter than --headerHeight for the logo curve).
   */
  .opening__video {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
    max-width: none;
    max-height: none;
    object-fit: cover;
  }

  .opening__bg__static {
    top: 0;
    bottom: 0;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translateX(-50%);
    object-fit: cover;
  }

  .opening {
    background-size: cover;
  }

  /* Spacer only used for portrait scrollable opening canvas */
  .opening__scroll-canvas {
    display: none;
  }

  @media screen and (orientation: landscape) {
    /* Height-fit desktop 16:9 — full section height, width from aspect */
    .opening__video {
      top: 0;
      bottom: 0;
      left: 50%;
      right: auto;
      width: auto;
      height: 100%;
      max-width: none;
      max-height: none;
      transform: translateX(-50%);
      object-fit: contain;
      object-position: center center;
    }

    .opening__bg__static {
      top: 0;
      bottom: 0;
      left: 50%;
      width: auto;
      height: 100%;
      max-width: none;
      transform: translateX(-50%);
      object-fit: contain;
      object-position: center center;
    }

    .opening {
      overflow: hidden;
      background-size: auto 100%;
      background-position: center center;
    }

    /*
     * Folded landscape ~594×368: nudge opening title + video down a bit.
     */
    @media screen and (max-width: 650px) and (max-height: 400px) {
      .opening__video,
      .opening__bg__static {
        top: 14%;
        bottom: auto;
        height: 100%;
      }

      .opening__content__title,
      .opening__content__tag {
        top: calc(2rem + 14%);
      }
    }
  }

  /*
   * Folded portrait ≤818:
   * Title must clear the tall shield logo, with NO green gap under the menu.
   * - Static-m paints sky under the white bar + logo (fills the top).
   * - Video starts just below the logo so in-video title is fully visible.
   * - Hide HTML title artboard (full-frame black) — title lives in the video.
   * Do NOT use inner-scroll on opening (breaks section 2 + dots).
   */
  @media screen and (orientation: portrait) {
    .opening {
      background: var(--main-c, #083e14) !important;
      background-image: none !important;
      padding-top: 0 !important;
      overflow: hidden;
    }

    /* Width-fit, nudged down 5% of section height */
    .opening__video {
      top: 5%;
      right: 0;
      bottom: auto;
      left: 50%;
      width: 100% !important;
      max-width: 100% !important;
      height: auto !important;
      max-height: none !important;
      aspect-ratio: auto;
      transform: translateX(-50%);
      object-fit: unset;
      object-position: center top;
      z-index: 2;
    }

    .opening__bg__static,
    .opening__bg__static--m {
      top: 5% !important;
      right: 0;
      bottom: auto !important;
      left: 50%;
      width: 100% !important;
      max-width: 100% !important;
      height: auto !important;
      max-height: none !important;
      aspect-ratio: 720 / 1280 !important;
      transform: translateX(-50%);
      object-fit: cover !important;
      object-position: center top !important;
      z-index: 1;
    }

    .opening__bg__static--m {
      display: block !important;
    }

    .opening__bg__static--d {
      display: none !important;
    }

    .opening__content__title,
    .opening__content__tag {
      opacity: 0 !important;
      visibility: hidden !important;
      pointer-events: none !important;
    }

    /* +33% vs bundle calc(vh * 0.15) — three +10% bumps */
    .rtbUpgrade-title {
      height: calc(var(--vh) * 0.19965);
    }

    .rtbUpgrade-slide-content__img {
      width: auto;
      height: auto;
      max-width: 100%;
      max-height: var(--rtb-video-max-height, calc(var(--vh) * 0.4));
      object-fit: contain;
    }

    .rtbUpgrade-slide-content__text {
      width: auto;
      max-width: 100%;
      height: auto;
      object-fit: contain;
    }

    .rtbUpgrade-slide-content picture {
      display: flex;
      justify-content: center;
      align-items: center;
      max-width: 100%;
    }
  }
}

/*
 * rtbUpgrade (2nd) — short landscape: match prod ≥819 desktop carousel
 * (title 0.2vh, img 0.6vh, overlay text 0.4vh, arrows 40px @ ±10rem).
 * Beat ≤818 mobile tokens (bg-m, stacked text, hidden arrows, 1rem gap).
 */
@media screen and (max-width: 1024px) and (max-height: 700px) and (orientation: landscape) {
  :root {
    --rtb-upgrade-gap: 8vh;
    --rtb-nav-height: calc(var(--vh) * 0.1657);
    --rtb-video-max-height: calc(var(--vh) * 0.4);
    --rtb-slide-content-img-mv: -5rem;
    --rtbUpgrade_bg: url("../images/img_webp/rtbUpgrade/intro_bg.webp") 0 0
      no-repeat;
  }

  .rtbUpgrade-wrapper {
    background: var(--rtbUpgrade_bg);
    background-size: cover !important;
  }

  .rtbUpgrade-container {
    justify-content: center;
    align-items: center;
    gap: var(--rtb-upgrade-gap);
    padding-top: 0;
    padding-bottom: var(--rtb-nav-height);
    height: auto;
    max-height: none;
    overflow: visible;
  }

  /* Prod ≥819 sizing; lift title for short landscape vh */
  .rtbUpgrade-title {
    height: calc(var(--vh) * 0.2);
    max-height: none;
    max-width: none;
    width: auto;
    object-fit: contain;
    mix-blend-mode: lighten;
    margin-top: -6vh;
  }

  .rtbUpgrade-slide-wrapper {
    position: relative;
    flex: none;
    width: auto;
    max-width: 100%;
  }

  /* Prod ≥819 arrows */
  .rtbUpgrade-slide-wrapper__prev,
  .rtbUpgrade-slide-wrapper__next {
    display: block;
    top: 50%;
    width: 40px;
    height: 40px;
    transform: translateY(-50%);
  }

  /* Short-land: arrows closer than desktop ±10rem, slightly out from item. */
  .rtbUpgrade-slide-wrapper__prev {
    left: -5.5rem;
  }

  .rtbUpgrade-slide-wrapper__next {
    right: -5.5rem;
  }

  .rtbUpgrade-slide-content {
    position: relative;
    gap: var(--rtb-upgrade-gap);
  }

  /*
   * Match prod ≥819 cascade + lift global img max-width:100% so overlay text
   * can be wider than the item (prod ~627px text vs ~485px item @900vh).
   */
  .rtbUpgrade-title,
  .rtbUpgrade-slide-content__img,
  .rtbUpgrade-slide-content__text {
    max-width: none !important;
  }

  .rtbUpgrade-slide-content__img {
    width: auto;
    height: calc(var(--vh) * 0.6) !important;
    max-height: var(--rtb-video-max-height) !important;
    margin-top: var(--rtb-slide-content-img-mv);
    margin-bottom: calc(var(--rtb-slide-content-img-mv) * 1.5);
    object-fit: fill;
  }

  /* Prod ≥819: text overlay centered on item (not beside / below) */
  .rtbUpgrade-slide-content__text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: auto;
    max-width: none;
    height: calc(var(--vh) * 0.4);
    margin: 0;
    margin-bottom: 0;
    object-fit: contain;
    opacity: 0;
  }

  .is-current .rtbUpgrade-slide-content__text,
  .rtbUpgrade-slide.active .rtbUpgrade-slide-content__text {
    opacity: 1;
  }

  /* Prod ≥819: hide mobile bottom disclaimer / down cue */
  .rtbUpgrade-slide-content__disclaimer,
  .rtbUpgrade-slide-content__down {
    display: none !important;
  }

  .rtbUpgrade-nav .nav-dot {
    margin-left: 1rem;
  }

  .rtbUpgrade-nav .nav-dot img {
    height: var(--rtb-nav-height);
  }

  /*
   * Folded landscape ~594×368: keep desktop overlay layout from parent;
   * only scale/position relatively for short vh (title, item, overlay, arrows).
   */
  @media screen and (max-width: 650px) and (max-height: 400px) {
    .rtbUpgrade-title {
      height: calc(var(--vh) * 0.16);
      margin-top: 0;
    }

    .rtbUpgrade-slide-wrapper {
      margin-top: 0;
    }

    .rtbUpgrade-slide-content__img {
      height: calc(var(--vh) * 0.48) !important;
      max-height: calc(var(--vh) * 0.36) !important;
      margin-top: -2rem;
      margin-bottom: -3rem;
      object-fit: contain;
    }

    .rtbUpgrade-slide-content__text {
      position: absolute;
      top: 50%;
      left: 50%;
      bottom: auto;
      transform: translate(-50%, -50%) !important;
      height: calc(var(--vh) * 0.32);
      max-width: none !important;
      margin: 0;
      object-fit: contain;
    }

    .rtbUpgrade-slide-wrapper__prev,
    .rtbUpgrade-slide-wrapper__next {
      display: block;
      top: 50%;
      width: 14px;
      height: 14px;
      transform: translateY(-50%);
    }

    /* Closer to center than short-land −5.5rem */
    .rtbUpgrade-slide-wrapper__prev {
      left: -3.5rem;
    }

    .rtbUpgrade-slide-wrapper__next {
      right: -3.5rem;
    }

    .rtbUpgrade-slide-content__disclaimer,
    .rtbUpgrade-slide-content__down {
      display: none !important;
    }
  }
}

/*
 * Portrait mobile only (≤818) — match prod stack (text under image).
 * Do NOT apply to ≥819 desktop portrait — prod keeps overlay text there.
 */
/*
 * Folded + unfolded portrait: art ignores pointer; pan-y so section scroll
 * still works when leaving rtb (touch-action:none was trapping mid-transition).
 */
@media screen and (orientation: portrait) {
  .rtbUpgrade-wrapper {
    touch-action: pan-y;
  }

  .rtbUpgrade-title,
  .rtbUpgrade-slide-content__img,
  .rtbUpgrade-slide-content__text,
  .rtbUpgrade-slide-content__disclaimer,
  .rtbUpgrade-slide-content__down {
    pointer-events: none !important;
  }

  .rtbUpgrade-slide-wrapper__prev,
  .rtbUpgrade-slide-wrapper__next,
  .rtbUpgrade-nav .nav-dot {
    pointer-events: auto !important;
  }
}

@media screen and (orientation: portrait) and (max-width: 818px) {
  .rtbUpgrade-slide-content {
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .rtbUpgrade-slide-content__text {
    position: static;
    top: auto;
    left: auto;
    transform: none;
    width: auto;
    max-width: 100%;
    height: auto !important;
    max-height: none;
    margin: 0 0 2vh !important;
    object-fit: contain;
    opacity: 1;
  }

  .rtbUpgrade-slide-wrapper__prev,
  .rtbUpgrade-slide-wrapper__next {
    display: none;
  }
}

/*
 * introduction (5th) — mobile portrait: art must not eat vertical swipes
 * while the PT gate steps slides.
 */
@media screen and (orientation: portrait) {
  .introduction {
    touch-action: pan-y;
  }

  .introduction__container__img,
  .introduction__container__img img,
  .introduction__container__img__text {
    pointer-events: none !important;
  }

  .introduction .center-content__prev,
  .introduction .center-content__next,
  .introduction .intro-pagination__dot {
    pointer-events: auto;
  }
}

/*
 * introduction title.webp @ Duo unfolded portrait only (≥500px portrait).
 * 180vw glyphs; crop to the top title band so empty artboard doesn’t create
 * a huge gap under the text. Folded/desktop unchanged.
 */
@media screen and (min-width: 500px) and (orientation: portrait) {
  .introduction__container__img--title {
    top: calc(var(--headerHeight) + 1rem) !important;
    left: 50% !important;
    right: auto;
    width: 180vw !important;
    max-width: 180vw !important;
    /* ~title band at 180vw scale (full 16:9 would be ~101vw tall) */
    height: 22vw !important;
    max-height: 22vw !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: translateX(-50%);
    object-fit: cover !important;
    object-position: center top;
  }

  /* intro_txt-003: nudge copy up a bit on unfolded portrait */
  .introduction__container__img--003 .introduction__container__img__text {
    top: -2% !important;
  }
}

/*
 * introduction (5th): hide prev on first slide / next on last.
 * Short-landscape uses display:block !important; these + JS important beat it.
 */
.introduction:has(.intro-pagination__dot.is-active:first-child) .center-content__prev,
.introduction:not(:has(.intro-pagination__dot.is-active)) .center-content__prev {
  display: none !important;
  pointer-events: none !important;
}

.introduction:has(.intro-pagination__dot.is-active:last-child) .center-content__next {
  display: none !important;
  pointer-events: none !important;
}

/*
 * introduction arrows: force-hide on mobile (portrait + folded phone).
 * Short-landscape Duo keeps dens display:block; JS may set inline important.
 */
@media screen and (orientation: portrait),
  screen and (max-width: 818px) and (min-height: 701px) {
  .introduction .center-content__prev,
  .introduction .center-content__next {
    display: none !important;
  }
}


/*
 * introduction (5th) @ short landscape — title + intro_txt full-frame contain
 * (both 3840×2160). Do not apply unfolded-portrait 70vw here.
 */
@media screen and (max-width: 1024px) and (max-height: 700px) and (orientation: landscape) {
  .introduction__container__img--title {
    top: 0 !important;
    left: 0 !important;
    right: auto;
    width: 100% !important;
    max-width: none;
    height: 100% !important;
    max-height: none;
    transform: none !important;
    object-fit: contain !important;
    object-position: center center;
  }

  .introduction .center-content__prev,
  .introduction .center-content__next {
    display: block !important;
    /* Smaller + outer vs calc(10% + 90px); keep ≥0 so overflow:hidden doesn’t clip */
    width: 26px;
    height: 26px;
  }

  .introduction .center-content__prev {
    left: calc(6% + 48px);
  }

  .introduction .center-content__next {
    right: calc(6% + 48px);
  }

  .introduction .intro-pagination {
    display: flex !important;
    bottom: 2.5rem;
  }

  .introduction__container__img--001 img,
  .introduction__container__img--002 img,
  .introduction__container__img--003 img {
    object-fit: cover;
    object-position: center center;
  }

  .introduction__container__img__text {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain !important;
    object-position: center center;
  }

  /* Unfolded short landscape (e.g. 890×626 / 678×466): nudge title.webp down. */
  @media screen and (min-width: 651px) {
    .introduction__container__img--title {
      top: 8vh !important;
      height: calc(100% - 8vh) !important;
      object-position: center top;
    }
  }

  /* Folded landscape ~594×368: nudge title.webp down a bit. */
  @media screen and (max-width: 650px) and (max-height: 400px) {
    .introduction__container__img--title {
      top: 8vh !important;
      height: calc(100% - 8vh) !important;
      object-position: center top;
    }
  }
}

/* Desktop: restore horizontal nav bar if any leftover mobile rules linger */
@media screen and (min-width: 992px) {
  .navbar__menu {
    position: relative;
    height: auto;
    min-height: 0;
    max-height: none;
    width: 100%;
    max-width: none;
    overflow: initial;
    padding-top: 0;
    padding-bottom: 0;
    padding-left: 0;
    padding-right: 0;
    background-color: transparent;
  }

  .navbar__menu-overlay {
    display: none;
    width: auto;
    height: auto;
    min-height: 0;
  }
}

/* Phone / folded: safe-area right. Tall desktop keeps prod right:20px. */
@media screen and (max-width: 818px) {
  .global-progress-bar {
    right: max(10px, var(--sar));
    bottom: auto;
  }
}

/* Landscape (folded): nudge right dots down; keep them small for short height */
@media screen and (max-width: 818px) and (orientation: landscape) {
  .global-progress-bar {
    top: 50%;
    transform: translateY(calc(-50% + 1.5rem));
  }

  .global-progress-dot {
    width: 5px;
    height: 5px;
    border-width: 1.5px;
  }

  .global-progress-bar .nav {
    gap: 7px;
  }
}

/*
 * Short landscape only (Duo / max-height ≤700): pin dots in the band below
 * the header. Do NOT apply to tall normal desktop — prod is top:50% / right:20px / gap:12.
 */
@media screen and (max-height: 700px) and (orientation: landscape) {
  .global-progress-bar {
    top: calc(var(--headerHeight) + 0.5rem) !important;
    bottom: max(0.5rem, env(safe-area-inset-bottom, 0px)) !important;
    transform: none !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: flex-end !important;
    height: auto !important;
    max-height: none !important;
  }

  .global-progress-bar .nav {
    gap: 9px;
  }

  .is-iphone-safari .global-progress-bar {
    top: calc(var(--headerHeight) + 0.75rem + env(safe-area-inset-top, 0px)) !important;
  }
}

/*
 * Right dots menu — mid portrait (e.g. 626×890):
 * bundle ≤819 shrinks dots to 6px; enlarge a bit for wider frames.
 * Phones (<500) stay on 6px.
 *
 * Also drop translateY(-50%) centering — fixed + transform can leave the
 * painted dots a few px above the real hit targets (cursor must sit lower).
 * Flex-center the column instead (same approach as short-land).
 */
@media screen and (min-width: 500px) and (orientation: portrait) {
  .global-progress-bar {
    top: 0 !important;
    bottom: 0 !important;
    transform: none !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: flex-end !important;
    height: auto !important;
    max-height: none !important;
    /* Full-height flex shell must not eat clicks — only nav/dots/cta. */
    pointer-events: none !important;
  }

  .global-progress-bar .nav,
  .global-progress-bar .topcta,
  .global-progress-dot {
    pointer-events: auto !important;
  }

  .global-progress-dot {
    width: 10px;
    height: 10px;
  }

  .global-progress-bar .nav {
    gap: 11px;
  }
}

/*
 * iPhone / simulator: full-height flex progress bar (top:0/bottom:0) jumps
 * when Safari chrome / visualViewport changes — 30天無憂試飲 (.topcta) looks
 * like it moves up. Keep a compact prod-style cluster (top:50% + translateY)
 * so dots + tryjoin stay locked together.
 */
@media screen and (min-width: 500px) and (orientation: portrait) {
  .is-iphone .global-progress-bar,
  .is-iphone-safari .global-progress-bar {
    top: 50% !important;
    bottom: auto !important;
    transform: translateY(-50%) !important;
    justify-content: flex-start !important;
    height: auto !important;
    max-height: none !important;
  }
}

@media screen and (max-height: 700px) and (orientation: landscape) {
  .is-iphone .global-progress-bar,
  .is-iphone-safari .global-progress-bar {
    top: 50% !important;
    bottom: auto !important;
    transform: translateY(-50%) !important;
    justify-content: flex-start !important;
    height: auto !important;
    max-height: none !important;
  }
}

/* topcta (non-phase2) — mid portrait tall (e.g. 626×890): bundle ≤818 is 47px */
@media screen and (min-width: 560px) and (max-width: 700px) and (min-height: 820px) and
  (orientation: portrait) {
  .topcta.non-phase2 {
    max-width: 58px;
  }
}

body.lock,
body.navbar-open {
  overflow: hidden !important;
  position: relative;
  height: 100%;
  touch-action: none;
}

/* HCP boy bleed (376–440px) */
@media (max-width: 440px) {
  .hcp__boy {
    width: 100% !important;
    max-width: 100%;
  }
}

/* Tin CTAs — keep prod mobile 138×40 (do not inherit desktop 250px) */
@media screen and (orientation: portrait) {
  /* Bundle uses height:100% + object-fit:cover — crops can bottoms */
  .tin {
    overflow: visible;
  }

  .tin .swiper-slide {
    height: auto;
  }

  .tin .swiper-slide img {
    width: 100%;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
    object-position: center bottom;
  }

  .tin__btns__item {
    max-width: calc(276px + 0.4375rem);
    gap: 0.4375rem;
    grid-template-columns: repeat(auto-fit, minmax(138px, max-content));
    margin-bottom: 1.6875rem;
  }

  .tin__btns__btn {
    width: 138px;
    height: 40px;
    min-height: 40px;
    padding: 8px 0;
    font-size: var(--f-body-medium-size);
  }

  .tin__btns__btn--small {
    font-size: var(--f-body-xsmall-size);
  }
}

/*
 * Duo unfolded portrait (~669×825): still ≤818 / portrait, so bundle keeps
 * slide max-width:50vw (~335px) + 138×40 CTAs. Shrink cans; enlarge name + btns.
 * Height = area under top menu (PT leaves section top at --headerHeight).
 */
@media screen and (min-width: 500px) and (max-width: 818px) and (orientation: portrait) {
  .tin {
    height: calc(var(--vh) - var(--headerHeight));
    min-height: calc(var(--vh) - var(--headerHeight));
    max-height: calc(var(--vh) - var(--headerHeight));
    box-sizing: border-box;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    padding-top: 0;
    padding-bottom: 0.35rem;
  }

  .tin > picture,
  .tin__title {
    flex: 0 0 auto;
  }

  /* Desktop title.webp (folded-only -m); keep compact under header */
  .tin__title {
    max-height: 1.75rem !important;
    max-width: 61vw !important;
    width: auto !important;
    height: auto !important;
    margin-top: 0.75rem !important;
    margin-bottom: 0 !important;
    object-fit: contain;
  }

  .tin .swiper {
    flex: 0 0 auto;
    min-height: 0;
    width: 100%;
    margin-bottom: 0;
    padding-bottom: 0;
    overflow: visible !important;
    display: flex !important;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
  }

  .tin .swiper-wrapper {
    flex: 0 0 auto;
    order: 1;
    height: auto !important;
  }

  .tin .swiper-slide {
    max-width: 36vw; /* was 50vw ≈ 335 @ 669 */
    height: auto;
  }

  .tin .swiper-slide img {
    height: auto !important;
    object-fit: contain !important;
  }

  .tin__content {
    flex: 0 0 auto;
    order: 2;
    align-self: center;
    height: calc(1.5rem * 2.2);
    margin-top: 0.75rem;
    margin-bottom: 0.2rem;
  }

  .tin__content p {
    font-size: 1.375rem; /* ~22px — product name under carousel */
    line-height: 1.25;
    width: max-content;
    max-width: 92vw;
  }

  .tin .swiper-pagination {
    position: relative !important;
    top: auto !important;
    bottom: auto !important;
    left: auto !important;
    order: 3;
    width: 100%;
    margin-top: 0 !important;
  }

  .tin__btns {
    flex: 0 0 auto;
    margin-top: 0 !important;
  }

  .tin__btns__item {
    max-width: calc(420px + 0.85rem);
    gap: 0.6rem;
    grid-template-columns: repeat(auto-fit, minmax(196px, max-content));
    margin-bottom: 0.35rem;
  }

  .tin__btns__btn {
    width: 196px;
    height: 54px;
    min-height: 54px;
    /* Vertical padding + flex-direction:column made 30天無憂試飲 label sit high on iOS. */
    padding: 0 0.5rem !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1.15 !important;
    font-size: 1.0625rem;
  }

  .tin__btns__btn span {
    display: block;
    line-height: 1.15 !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .tin__btns__btn--small {
    font-size: 0.9375rem;
    flex-direction: column !important;
  }

  /* 輕鬆訂 two-line label was 0.6rem — unreadable on Duo unfolded */
  .tin__btns__btn.tin__btns__btn--small span {
    font-size: 0.8125rem;
    line-height: 1.2;
  }
}

/*
 * Folded portrait only (<500px): tin cans sized to leave room; space-evenly
 * spreads leftover vh equally around title / cans+name+dots / CTAs so gaps
 * grow but the stack still fits one screen. Name+dots stay a tight pair.
 * Height = under top menu (footer snap parks tin at menu bottom — full vh +
 * header padding overflowed by ~headerHeight).
 */
@media screen and (orientation: portrait) and (max-width: 499.98px) {
  .tin {
    --tin-gap: clamp(1rem, 2.8vh, 1.5rem);
    margin-top: 0 !important;
    height: calc(var(--vh) - var(--headerHeight, 55px));
    min-height: calc(var(--vh) - var(--headerHeight, 55px));
    max-height: calc(var(--vh) - var(--headerHeight, 55px));
    box-sizing: border-box;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    gap: 0;
    /* No header pad — section already sits under the menu */
    padding-top: 0.2rem;
    padding-bottom: 0.35rem;
  }

  .tin > picture,
  .tin__title {
    flex: 0 0 auto;
  }

  .tin__title {
    max-height: 2.75rem !important;
    max-width: 68vw !important;
    width: auto !important;
    height: auto !important;
    margin-top: 0.15rem !important;
    margin-bottom: 0 !important;
    object-fit: contain;
  }

  .tin .swiper {
    flex: 0 0 auto;
    min-height: 0;
    width: 100%;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    overflow: visible !important;
    display: flex !important;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 0;
  }

  .tin .swiper-wrapper {
    flex: 0 0 auto;
    order: 1;
    height: auto !important;
  }

  .tin .swiper-slide {
    max-width: 41.31vw !important; /* 45.9vw × 0.9 */
    height: auto !important;
  }

  .tin .swiper-slide img {
    width: 100% !important;
    height: auto !important;
    max-height: min(38.88vh, 13.365rem) !important; /* prior × 0.9 */
    object-fit: contain !important;
    object-position: center bottom;
  }

  /* Same gap cans → name as title ↔ cans ↔ CTAs; dots stay tight under name */
  .tin__content {
    flex: 0 0 auto;
    order: 2;
    align-self: center;
    width: max-content !important;
    max-width: 92vw;
    height: auto !important;
    min-height: 1.2rem;
    margin-top: var(--tin-gap) !important;
    margin-bottom: 0.2rem !important;
  }

  .tin__content p {
    font-size: 0.9375rem;
    line-height: 1.25;
    white-space: nowrap;
  }

  .tin .swiper-pagination {
    position: relative !important;
    top: auto !important;
    bottom: auto !important;
    left: auto !important;
    order: 3;
    width: 100%;
    margin-top: 0 !important;
  }

  .tin__btns {
    flex: 0 0 auto;
    margin-top: 0 !important;
  }

  .tin__btns__item {
    margin-bottom: 0.35rem !important;
  }

  /* Same iOS label-centering fix as unfolded (padding was lifting 30天無憂試飲). */
  .tin__btns__btn {
    padding: 0 0.35rem !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1.15 !important;
  }

  .tin__btns__btn span {
    display: block;
    line-height: 1.15 !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .tin__btns__btn--small {
    flex-direction: column !important;
  }
}

/* faq / milkProcess / tin / trackeasy: portrait ≤818 = mobile; short-land = desktop below */

/*
 * milkProcess (title.webp / title-m) — all portrait: shrink bottom cells
 * (videos + desc) so title + 4 rows fit one screen height.
 */
@media screen and (orientation: portrait) {
  .milkProcess {
    height: var(--vh);
    min-height: var(--vh);
    max-height: var(--vh);
    justify-content: flex-start;
    padding-top: calc(var(--headerHeight) + 0.75rem);
    padding-bottom: 0.75rem;
    box-sizing: border-box;
    overflow: hidden;
  }

  .milkProcess__container {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    width: 100%;
    max-width: calc(100% - 3.5rem);
    margin: 0 auto;
  }

  .milkProcess__title,
  img.milkProcess__title {
    flex: 0 0 auto;
    display: block;
    max-height: 3.25rem;
    max-width: 70%;
    width: auto;
    height: auto;
    margin: 0.25rem auto 0.5rem;
    object-fit: contain;
  }

  /* Folded portrait — today’s stacked rows (desc left / video right), not 2×2 */
  .milkProcess__grid {
    flex: 1 1 auto;
    display: flex !important;
    flex-direction: column;
    justify-content: space-evenly;
    gap: 0.35rem;
    min-height: 0;
    width: 100%;
  }

  .milkProcess__cell {
    flex: 1 1 0;
    display: flex !important;
    flex-direction: row-reverse !important;
    align-items: center;
    gap: 0.5rem;
    min-height: 0;
    max-height: 100%;
    width: 100%;
  }

  .milkProcess__cell + .milkProcess__cell {
    margin-top: 0 !important;
  }

  .milkProcess__cell > picture {
    flex: 1 1 auto;
    min-width: 0;
    max-width: calc(100% - 0.5rem);
    height: auto;
    max-height: 100%;
    display: flex;
    align-items: center;
  }

  .milkProcess__desc,
  img.milkProcess__desc {
    display: block;
    width: auto !important;
    max-width: 100%;
    max-height: min(7.25rem, 14vh);
    height: auto;
    margin-top: 0 !important;
    object-fit: contain;
    object-position: left center;
    transform: none;
  }

  .milkProcess__video {
    flex: 0 0 auto;
    align-self: center;
    width: auto !important;
    max-width: min(58%, 11rem) !important;
    height: auto !important;
    max-height: min(7.25rem, 14vh);
    aspect-ratio: 16 / 11;
    transform: none !important;
    object-fit: cover;
    margin: 0 !important;
  }
}

/*
 * Folded portrait only (<500px): lay out milkProcess as the 402×714 reference
 * (prod mobile video↔text align), then scale the WHOLE container by
 * min(vw/402, vh/714) so smaller folded devices (e.g. 382×580) match that look.
 */
@media screen and (orientation: portrait) and (max-width: 499.98px) {
  .milkProcess {
    --mp-ref-w: 402;
    --mp-ref-h: 714;
    --mp-fit: min(calc(100vw / 402px), calc(var(--vh, 100vh) / 714px));
    justify-content: flex-start;
    align-items: center;
    overflow: hidden;
  }

  /* 402-wide column; title pinned top, grid vertically centered below */
  .milkProcess__container {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: 100%;
    min-height: 0;
    width: calc(402px - 4.375rem); /* same content column as at 402vw */
    max-width: calc(402px - 4.375rem);
    margin: 0 auto;
    transform: none;
  }

  .milkProcess__title,
  img.milkProcess__title {
    flex: 0 0 auto;
    max-height: 3.25rem;
    margin: 0.15rem auto 0.35rem;
  }

  /* Ref-sized stacked grid, fit-scaled, centered in space under title */
  .milkProcess__grid {
    flex: 0 0 auto;
    display: block !important;
    width: 100%;
    min-height: 0;
    gap: 0;
    justify-content: unset;
    margin-top: auto;
    margin-bottom: auto;
    transform: scale(var(--mp-fit));
    transform-origin: center center;
  }

  .milkProcess__cell {
    flex: none !important;
    display: flex !important;
    flex-direction: row-reverse !important;
    align-items: flex-start !important; /* prod */
    gap: 0.5rem;
    min-height: 0;
    max-height: none;
    width: 100%;
  }

  .milkProcess__cell + .milkProcess__cell {
    margin-top: 2rem !important; /* prod */
  }

  .milkProcess__cell > picture {
    flex: 1 1 auto;
    min-width: 0;
    max-width: calc(100% - 0.5rem);
    max-height: none;
    display: block;
    align-items: unset;
  }

  /* Prod mobile desc pull-up — no dens max-height clamps */
  .milkProcess__desc,
  img.milkProcess__desc {
    display: block;
    width: calc(100% - 0.5rem) !important;
    max-width: 100%;
    max-height: none !important;
    height: auto !important;
    margin-top: -1.2rem !important;
    object-fit: contain;
    object-position: left top;
    transform: none !important;
  }

  .milkProcess__cell--taste .milkProcess__desc,
  .milkProcess__cell--taste img.milkProcess__desc {
    max-height: none !important;
  }

  /* Prod mobile video align — scale(1.35) crops to desc */
  .milkProcess__video {
    flex: 0 0 auto;
    align-self: flex-start;
    display: block;
    width: 100% !important;
    max-width: 8.125rem !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 !important;
    aspect-ratio: 16 / 11;
    border-radius: 0.5rem;
    transform: translateX(0) scale(1.35) !important;
    transform-origin: center center;
    object-fit: cover;
  }
}

/*
 * Mid portrait (466×678 / 626×890) — milkProcess fills exactly one viewport
 * height (header clearance + modest bottom pad inside the vh box). Rows flex
 * evenly so content fits the screen without overflowing or leaving a large gap.
 */
/*
 * Mid / unfolded portrait only (e.g. Duo 669×825). Folded ~382×580 stays on
 * the stacked rules above (min-width 430 + min-height 600 excludes folded).
 */
@media screen and (min-width: 430px) and (min-height: 600px) and (orientation: portrait) {
  /*
   * Do not add padding-bottom on this white slide — with height:var(--vh) and
   * border-box it reserves a white strip at the viewport bottom under
   * trackeasy / tin (prod keeps pb:0).
   */
  .normal-content-slide {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    box-sizing: border-box;
  }

  .trackeasy {
    background-color: #083e14;
  }

  /* Do not force .tin min-height here — milkProcess vh-fit was spilling onto tin CTAs */

  /*
   * Unfolded mid portrait: desktop milkProcess align (60vh container, 2×2 gap,
   * video scale(1.45) / margin -1rem, desc mt 0.75rem), then whole-grid scale.
   */
  .milkProcess {
    --mp-grid-scale: 0.95;
    height: var(--vh);
    min-height: var(--vh);
    max-height: var(--vh);
    justify-content: flex-start;
    align-items: center;
    padding-top: calc(var(--headerHeight) + 0.85rem);
    padding-bottom: 0.75rem;
    box-sizing: border-box;
    overflow: hidden;
  }

  .milkProcess__container {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: 100%;
    min-height: 0;
    width: 60vh; /* prod desktop */
    max-width: 90vw;
    margin: 0 auto;
  }

  .milkProcess__title,
  img.milkProcess__title {
    flex: 0 0 auto;
    display: block;
    max-height: 5.125rem; /* prod desktop */
    max-width: 100%;
    width: auto;
    height: auto;
    margin: 0 auto 0.75rem;
    object-fit: contain;
  }

  /* Desktop 2×2 grid scaled, vertically centered under title */
  .milkProcess__grid {
    flex: 0 0 auto;
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    justify-content: center;
    align-content: center;
    gap: 1.6875rem 2.5rem; /* prod desktop */
    min-height: 0;
    width: 100%;
    margin-top: auto;
    margin-bottom: auto;
    margin-inline: auto;
    transform: scale(var(--mp-grid-scale));
    transform-origin: center center;
  }

  .milkProcess__cell {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important; /* prod desktop */
    justify-content: flex-start;
    gap: 0;
    width: 100%;
    min-height: 0;
    margin: 0 !important;
    overflow: visible !important;
  }

  .milkProcess__cell + .milkProcess__cell {
    margin-top: 0 !important;
  }

  .milkProcess__cell > picture {
    display: block;
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    position: relative;
    z-index: 1;
  }

  .milkProcess__desc,
  img.milkProcess__desc {
    display: block;
    width: auto !important;
    max-width: 100%;
    max-height: none !important;
    height: auto !important;
    margin: 0.75rem auto 0 !important; /* prod desktop */
    padding: 0 !important;
    object-fit: contain;
    object-position: center top;
    transform: none !important;
  }

  .milkProcess__cell--taste .milkProcess__desc,
  .milkProcess__cell--taste img.milkProcess__desc {
    max-height: none !important;
  }

  /* Prod desktop video align — scale(1.45) crops L/R pad to desc width */
  .milkProcess__video {
    display: block;
    flex: 0 0 auto;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0;
    margin: -1rem 0 !important;
    aspect-ratio: 16 / 11;
    border-radius: 0.5rem;
    transform: translateX(0) scale(1.45) !important;
    transform-origin: center center;
    object-fit: cover;
  }

  /* trackeasy desktop layers — see ≥500px portrait block below */
}

/*
 * Duo unfolded portrait: milkProcess under sticky menu like trackeasy/tin
 * backward stops. PT clamps the slide at y=0 near 11vh, so use margin-top
 * (not scroll) to match the under-menu flush.
 */
@media screen and (min-width: 500px) and (max-width: 818px) and (orientation: portrait) {
  .milkProcess {
    margin-top: var(--headerHeight);
    height: calc(var(--vh) - var(--headerHeight));
    min-height: calc(var(--vh) - var(--headerHeight));
    max-height: calc(var(--vh) - var(--headerHeight));
    padding-top: 0.85rem;
  }
}

/*
 * LeadIn (3rd) — all mobile portrait: match prod title weight + video clearance.
 * Prod mid-portrait uses --imgTop:5rem so video sits lower and title has room.
 * Use leadIn-title-m (via HTML source ≤818 portrait) — desktop 16:9 was tiny.
 */
@media screen and (orientation: portrait) {
  .leadIn {
    --background: var(--Sky-blue)
      url("../images/img_webp/leadIn/leadIn-bg-t.webp") center top no-repeat;
    --backgroundSize: cover;
    --borderWidth: 40px;
    /* Video flush to section top */
    --imgTop: 0;
  }

  .leadIn__container::before {
    display: block;
  }

  .leadIn video,
  .leadIn__container__video {
    top: 0 !important;
    object-fit: cover !important;
  }

  /*
   * title-m is a full portrait artboard (750×1356). Do NOT max-height-cap
   * it — that shrunk glyphs. Fill the section like prod (height:100% contain).
   */
  .leadIn__container__image--title {
    top: calc(var(--headerHeight) + 1.25rem - 5%) !important;
    left: 0 !important;
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    max-height: none !important;
    margin-top: 0 !important;
    transform: none !important;
    object-fit: contain !important;
    object-position: center top !important;
  }
}

/* LeadIn short landscape — keep desktop cover; enlarge 16:9 title */
@media screen and (max-width: 1024px) and (max-height: 700px) and (orientation: landscape) {
  .leadIn {
    --background: var(--Sky-blue)
      url("../images/img_webp/leadIn/leadIn-bg.webp") center center no-repeat;
    --backgroundSize: cover;
    --borderWidth: 40px;
    --imgTop: 0;
  }

  .leadIn__container::before {
    display: none;
  }

  .leadIn video,
  .leadIn__container__video {
    top: var(--imgTop);
    object-fit: cover !important;
  }

  .leadIn__container__image--title {
    width: 130%;
    max-width: none;
    left: 50%;
    transform: translateX(-50%);
    height: auto;
    max-height: none;
    margin-top: 0;
    top: var(--imgTop, 0);
    object-fit: contain !important;
  }

  /*
   * Folded landscape ~594×368: title + bg/video sit a bit higher.
   */
  @media screen and (max-width: 650px) and (max-height: 400px) {
    .leadIn {
      --background: var(--Sky-blue)
        url("../images/img_webp/leadIn/leadIn-bg.webp") center 18% no-repeat;
      background-position: center 18% !important;
    }

    .leadIn__container__image--title {
      top: calc(var(--headerHeight, 38px) - 2.15rem);
    }

    .leadIn video,
    .leadIn__container__video {
      top: 12%;
    }
  }
}

/* Unfolded / large phone portrait (819–1024): video flush to section top */
@media screen and (min-width: 819px) and (max-width: 1024px) and (orientation: portrait) {
  .leadIn {
    --imgTop: 0;
  }

  .leadIn video,
  .leadIn__container__video {
    top: 0 !important;
  }

  .leadIn__container__image--title {
    top: calc(var(--headerHeight) + 1.25rem - 5%) !important;
    left: 0 !important;
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    max-height: none !important;
    margin-top: 0 !important;
    transform: none !important;
    object-fit: contain !important;
    object-position: center top !important;
  }
}

/*
 * hkNo1 (4th) — mobile portrait: top-align under navbar (beat bundle
 * center bottom). Short landscape keeps desktop cover below.
 */
@media screen and (orientation: portrait) {
  .hkNo1 {
    --imgTop: var(--headerHeight);
    --background: var(--Sky-blue) url("../images/img_webp/hkno1/bg-m.webp")
      center top no-repeat;
    --backgroundSize: 100% auto;
    background-position: center top !important;
    touch-action: pan-y;
  }

  .hkNo1 img,
  .hkNo1__container__image {
    top: var(--headerHeight) !important;
    height: calc(100% - var(--headerHeight)) !important;
    object-fit: contain !important;
    object-position: center top !important;
    /* Full-bleed art must not eat touch swipes (blocks section advance). */
    pointer-events: none !important;
  }

  .hkNo1__container__image--txt3 {
    margin-top: 0;
    height: calc(100% - var(--headerHeight)) !important;
  }
}

/*
 * rtbUpgrade (2nd) — folded portrait only: smaller section title + item text
 * (both are images). Beat the ≤818 portrait title height bump (0.19965vh).
 */
@media screen and (orientation: portrait) and (max-width: 499.98px) {
  .rtbUpgrade-title {
    height: calc(var(--vh) * 0.14) !important;
    max-height: calc(var(--vh) * 0.14) !important;
    width: auto !important;
    max-width: 78vw !important;
    margin-inline: auto;
    object-fit: contain;
  }

  .rtbUpgrade-slide-content__text {
    width: auto !important;
    max-width: 78vw !important;
    height: auto !important;
    max-height: calc(var(--vh) * 0.075) !important;
    margin-inline: auto;
    object-fit: contain;
  }

  .rtbUpgrade-slide-content picture:has(.rtbUpgrade-slide-content__text),
  .rtbUpgrade-slide-content__text {
    display: block;
  }
}

/*
 * rtbUpgrade (2nd) — unfolded portrait only (≥500px): shrink section title +
 * carousel item text vs the ≤818 portrait bump (title was ~0.19965vh).
 */
@media screen and (min-width: 500px) and (orientation: portrait) {
  .rtbUpgrade-title {
    height: calc(var(--vh) * 0.155) !important;
    max-height: calc(var(--vh) * 0.155) !important;
    width: auto !important;
    max-width: 72vw !important;
    margin-inline: auto;
    object-fit: contain;
  }

  .rtbUpgrade-slide-content__text {
    width: auto !important;
    max-width: 78vw !important;
    height: auto !important;
    max-height: calc(var(--vh) * 0.085) !important;
    margin-inline: auto;
    object-fit: contain;
  }

  .rtbUpgrade-slide-content picture:has(.rtbUpgrade-slide-content__text),
  .rtbUpgrade-slide-content__text {
    display: block;
  }
}

/*
 * hkNo1 title1 (brown 「全港唯1」) @ folded portrait only:
 * Match intro title-m brown glyph height. intro title-m is 890×78 with
 * ink_h≈60 → glyph ≈ 100vw×60/890. title1-m chinese ink_h≈61/750 → width
 * 100vw×(60/890)×(750/61) ≈ 82.9vw. Crop tall artboard to the title band.
 */
@media screen and (orientation: portrait) and (max-width: 499.98px) {
  .hkNo1__container__image--title {
    top: calc(var(--headerHeight) + 11.94dvh) !important;
    left: 50% !important;
    right: auto !important;
    width: 82.9vw !important;
    max-width: 82.9vw !important;
    /* ink band ~y120–251 of 1328 → ~14% from top; keep tall「1」 */
    height: calc(82.9vw * 132 / 750) !important;
    max-height: none !important;
    margin: 0 !important;
    transform: translateX(-50%) !important;
    object-fit: cover !important;
    object-position: center 14% !important;
  }
}

/* nutrientPart (6th) — allow vertical swipe; keep prod overflow:hidden */
@media screen and (orientation: portrait) and (max-width: 818px) {
  .nutrientPart {
    touch-action: pan-y;
  }

  .nutrientPart__card__wrapper,
  .nutrientPart__card__wrapper-001,
  .nutrientPart__card__wrapper-002,
  .nutrientPart__card__wrapper-003,
  .nutrientPart__card__wrapper-004,
  .nutrientPart__card__wrapper-005 {
    touch-action: pan-y;
    opacity: 1;
  }
}

/* Tablet portrait: bg-t, still top-aligned */
@media screen and (min-width: 641px) and (max-width: 1024px) and (orientation: portrait) {
  .hkNo1 {
    --background: var(--Sky-blue) url("../images/img_webp/hkno1/bg-t.webp")
      center top no-repeat;
    --backgroundSize: 100% auto;
    background-position: center top !important;
  }
}

/*
 * 626×842 / 626×890 mid-portrait: full-width bg-m (100% auto), top pin.
 */
@media screen and (min-width: 600px) and (max-width: 640px) and (min-height: 800px) and
  (orientation: portrait) {
  .hkNo1 {
    --background: var(--Sky-blue) url("../images/img_webp/hkno1/bg-m.webp")
      center top no-repeat;
    --backgroundSize: 100% auto;
    background-size: 100% auto !important;
    background-position: center top !important;
  }
}

/*
 * Short landscape ≤818 (e.g. 678×466) — desktop hkNo1:
 * desktop bg.webp + cover (beat any leftover mobile tokens).
 */
@media screen and (max-width: 818px) and (max-height: 700px) and (orientation: landscape) {
  .hkNo1 {
    --background: var(--Sky-blue) url("../images/img_webp/hkno1/bg.webp")
      center center no-repeat;
    --backgroundSize: cover;
    --imgTop: 0;
  }

  .hkNo1 img,
  .hkNo1__container__image {
    object-fit: cover !important;
    object-position: center center;
  }

  /*
   * Folded landscape ~594×368: pin art to top (center was mid-framed on stop/dot).
   */
  @media screen and (max-width: 650px) and (max-height: 400px) {
    .hkNo1 {
      --background: var(--Sky-blue) url("../images/img_webp/hkno1/bg.webp")
        center top no-repeat;
      --imgTop: var(--headerHeight, 55px);
      background-position: center top !important;
    }

    .hkNo1 img,
    .hkNo1__container__image {
      top: calc(var(--headerHeight, 55px) + -2%) !important;
      height: calc(100% - var(--headerHeight, 55px) - 6%) !important;
      object-fit: contain !important;
      object-position: center top !important;
    }
  }
}

/*
 * All portrait opening: static-m + hide HTML title/tag (title is in the video).
 * Folded keeps width-fit (nested ≤818 rules above).
 * Duo unfolded / wide portrait: height-fit so the full tin isn’t cropped.
 */
@media screen and (orientation: portrait) {
  .opening {
    background: var(--main-c, #083e14) !important;
    background-image: none !important;
    padding-top: 0 !important;
    overflow: hidden !important;
  }

  .opening__bg__static--m {
    display: block !important;
  }

  .opening__bg__static--d {
    display: none !important;
  }

  .opening__content__title,
  .opening__content__tag {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}

/*
 * Unfolded portrait (~669+): desktop 16:9 opening video, enlarge to fit
 * height (full vh). Sides crop; PT still advances to section 2.
 */
@media screen and (min-width: 500px) and (orientation: portrait) {
  .opening {
    overflow: hidden !important;
  }

  .opening__scroll-canvas {
    display: none !important;
  }

  .opening__video {
    top: 0 !important;
    right: auto !important;
    bottom: 0 !important;
    left: 50% !important;
    width: auto !important;
    max-width: none !important;
    height: 100% !important;
    max-height: 100% !important;
    aspect-ratio: 16 / 9 !important;
    transform: translateX(-50%) !important;
    object-fit: cover !important;
    object-position: center center !important;
    z-index: 2;
  }

  /* Prefer desktop static with desktop video */
  .opening__bg__static--m {
    display: none !important;
  }

  .opening__bg__static--d,
  .opening__bg__static {
    display: block !important;
    top: 0 !important;
    right: auto !important;
    bottom: 0 !important;
    left: 50% !important;
    width: auto !important;
    max-width: none !important;
    height: 100% !important;
    max-height: 100% !important;
    aspect-ratio: 16 / 9 !important;
    transform: translateX(-50%) !important;
    object-fit: cover !important;
    object-position: center center !important;
    z-index: 1;
  }

  .opening__bg__static--m {
    display: none !important;
  }
}

/*
 * Opening (1st section) dark-green strip under navbar @ 819–991px (e.g. 890x626):
 * bundle sets --headerHeight:60px from 819px up, but .navbar is height:55px until 992px.
 * Video/slide offsets use --headerHeight, so ~5px of --main-c (#083e14) peeks out.
 */
@media screen and (min-width: 819px) and (max-width: 991.98px),
  screen and (min-width: 901px) and (max-width: 991.98px) and (max-height: 700px) and
    (orientation: landscape) {
  :root {
    --headerHeight: 55px;
  }
}

/* Folded short-land (≤900px) compact menu sets --headerHeight: 38px below. */

/*
 * Desktop layout system — also for short landscape (890×626 and 678×466):
 * rtbUpgrade item images, nutrient fan, HCP boy.
 */
@media screen and (min-width: 819px) and (orientation: landscape),
  screen and (max-height: 700px) and (orientation: landscape) {
  /*
   * Tall desktop rtbUpgrade — match prod measured layout (1440×900):
   * global img{max-width:100%} was clamping overlay text (~495px) while prod
   * text is intrinsic (~627px, max-width:none). Same lift for item + title.
   */
  @media screen and (min-width: 819px) and (min-height: 701px) {
    .rtbUpgrade-title,
    .rtbUpgrade-slide-content__img,
    .rtbUpgrade-slide-content__text {
      max-width: none !important;
    }

    .rtbUpgrade-slide-content__img {
      width: auto;
      height: calc(var(--vh) * 0.6) !important;
      max-height: var(--rtb-video-max-height, calc(var(--vh) * 0.4)) !important;
      margin-top: var(--rtb-slide-content-img-mv, -5rem);
      margin-bottom: calc(var(--rtb-slide-content-img-mv, -5rem) * 1.5);
      object-fit: fill;
    }

    .rtbUpgrade-slide-content__text {
      position: absolute;
      top: 50%;
      left: 50%;
      height: calc(var(--vh) * 0.4);
      width: auto;
      margin: 0;
      transform: translate(-50%, -50%);
      object-fit: fill;
    }
  }

  /* nutrientPart desktop end state (GSAP):
   * left:50% + xPercent [-175,-112.5,-50,12.5,75], yPercent:-50
   * Middle card (-50) is viewport-centered; do NOT add translateX(-50%) —
   * that fights GSAP transforms and shifts the fan. Equal auto widths required.
   * At 678×466 bundle still applies ≤818 mobile stack + click-lightbox —
   * override those so short landscape matches 890×626 desktop. */
  .nutrientPart {
    align-items: center;
    justify-content: center;
    padding: var(--headerHeight) 1rem;
    flex-direction: column;
  }

  /* Desktop title: full-vh artboard (bundle ≥819). Beats mobile max-height:15vh. */
  .nutrientPart__title {
    display: block;
    margin: 0;
    max-height: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: auto;
    height: var(--vh);
    object-fit: contain;
  }

  .nutrientPart__card__title {
    display: none !important;
  }

  .nutrientPart__container {
    height: auto;
    margin-top: 20vh;
  }

  .nutrientPart__container.container {
    margin-left: auto;
    margin-right: auto;
  }

  /* Desktop: no mobile click-lightbox / blur (detail stays display:none ≥819). */
  .nutrientPart__detailCard,
  .nutrientPart__detailCard__cell {
    display: none !important;
  }

  .nutrientPart__detailCard__wrapper,
  .nutrientPart__detailCard__wrapper.active {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  .nutrientPart.active .nutrientPart__container,
  .active .nutrientPart__container {
    filter: none;
    pointer-events: auto;
  }

  .nutrientPart__card__wrapper,
  .nutrientPart__card__wrapper-001,
  .nutrientPart__card__wrapper-002,
  .nutrientPart__card__wrapper-003,
  .nutrientPart__card__wrapper-004,
  .nutrientPart__card__wrapper-005 {
    left: 50%;
    width: auto;
    max-width: none;
    /* No z-index transition — delayed stacking left expanded card under neighbors. */
    transition: box-shadow 0.3s, margin-top 0.3s;
  }

  .nutrientPart__card__wrapper-001 { z-index: 5; }
  .nutrientPart__card__wrapper-002 { z-index: 4; }
  .nutrientPart__card__wrapper-003 { z-index: 3; }
  .nutrientPart__card__wrapper-004 { z-index: 2; }
  .nutrientPart__card__wrapper-005 { z-index: 1; }

  /*
   * Only .active uncovers a card. :hover + .active on different cards used to
   * highlight two at once (cover opacity 0 on both).
   */
  .nutrientPart__card__wrapper:hover {
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.5);
  }

  .nutrientPart__card__wrapper.active {
    /* Beat numbered z-index + neighbor covers sliding over the fan. */
    z-index: 50 !important;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.5);
    margin-top: -1rem;
  }

  .nutrientPart__card__wrapper.prev,
  .nutrientPart__card__wrapper.next {
    z-index: 1;
  }

  /*
   * Exclusive expand (short-land / desktop landscape):
   * - Covers stay z-index:2 above card art (bundle).
   * - Peek via transform (not width:130%) so unhighlighted cover art /
   *   top text keep aspect ratio. Hide inner art when covered so a peek
   *   gap never shows stretched dual content.
   * - Do NOT set position:relative on .card-cell — it is absolute in
   *   bundle; relative inflated the wrapper and painted over the fan.
   * Inter-card order is wrapper z-index only (active = 50).
   */
  .nutrientPart__card__cover {
    z-index: 2 !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    transition: opacity 0.2s ease, transform 0.45s ease !important;
  }

  .nutrientPart__card__cover img {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: contain !important;
    object-position: center top !important;
  }

  .nutrientPart__card__wrapper:hover .nutrientPart__card__cover {
    opacity: unset;
  }

  .nutrientPart__card__wrapper.active .nutrientPart__card__cover {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: none !important;
  }

  .nutrientPart__card__wrapper:not(.active) .nutrientPart__card__cover {
    opacity: 1 !important;
  }

  .nutrientPart__card__wrapper:not(.active) .nutrientPart__card__wrapper__inner {
    visibility: hidden !important;
  }

  /* Right neighbors: cover slides right → top text moves. */
  .next .nutrientPart__card__cover {
    filter: brightness(0.75);
    transform: translateX(15%);
  }

  /* Left neighbors: cover slides left → top text moves. */
  .prev .nutrientPart__card__cover {
    filter: brightness(0.75);
    transform: translateX(-15%);
  }

  /* Do not set transform here — desktop TL ends at
   * top:50%; yPercent:-50; xPercent:[-175,-112.5,-50,12.5,75]
   * Middle card (-50) is viewport-centered. CSS transform overrides break the fan. */

  /* Restore bundle sizing: global img{height:auto} was overriding height:65vh */
  .nutrientPart__card__wrapper img {
    width: auto;
    height: 65vh;
    max-width: none;
  }

  /* Short landscape: keep fan readable without blowing card width */
  @media screen and (max-height: 700px) {
    .nutrientPart__card__wrapper img {
      height: 55vh;
    }
  }

  /*
   * Folded landscape ~594×368 nutrient (6th): title slightly below center;
   * cards nudged down; less-round corners.
   */
  @media screen and (max-width: 650px) and (max-height: 400px) {
    .nutrientPart__title {
      top: 59%;
    }

    .nutrientPart__card__wrapper,
    .nutrientPart__card__wrapper-001,
    .nutrientPart__card__wrapper-002,
    .nutrientPart__card__wrapper-003,
    .nutrientPart__card__wrapper-004,
    .nutrientPart__card__wrapper-005 {
      margin-top: 6% !important;
    }

    /* Only the exclusive .active card lifts — not :hover (avoids dual highlight). */
    .nutrientPart__card__wrapper:hover {
      margin-top: 6% !important;
    }

    .nutrientPart__card__wrapper.active {
      margin-top: calc(6% - 0.5rem) !important;
    }

    .nutrientPart__card__wrapper,
    .nutrientPart__card__wrapper__inner {
      border-radius: 1rem !important;
    }
  }

  /*
   * Sections 9 / 12–13 @ short landscape (esp. 678×466):
   * bundle ≤818 still applies mobile organic/brain/milk/tin layout.
   * Mirror ≥819 desktop so they match 890×626.
   * (7 — farm stays mobile ≤818 like prod; desktop overrides ≥819 below.)
   */

  /* 9 — organic + zeroAdditive (inner-scroll) */
  .organic {
    align-items: flex-start;
    background: var(--main-c) url("../images/img_webp/organic/bg.webp") center center
      no-repeat;
    background-size: cover !important;
    padding-top: 0;
    padding-bottom: 0;
    /*
     * Under-menu pane (slide already has padding-top:headerHeight). Pair with
     * full-vh zeroAdditive below so maxScroll / organicZeroScrollTop match —
     * zero at vh−header made organic→zero snap no-op (esp. folded short-land).
     */
    height: calc(var(--vh) - var(--headerHeight)) !important;
    min-height: calc(var(--vh) - var(--headerHeight)) !important;
    max-height: calc(var(--vh) - var(--headerHeight)) !important;
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
  }

  .organic__title {
    position: absolute;
    top: 0;
    left: 50%;
    right: auto;
    width: auto;
    max-width: 100%;
    height: 100%;
    max-height: var(--sectionHeight);
    margin: 0;
    transform: translateX(-50%);
    object-fit: contain;
    object-position: center top;
  }

  .organic__point--002 {
    margin-top: 0;
    margin-bottom: 0;
  }

  /* 678 only — beat ≤818 mobile margins; do not shift drop down; leave 890 to bundle ≥819 */
  @media screen and (max-width: 818px) {
    .organic__milk-drop,
    .organic__point {
      position: absolute;
      top: 0;
      right: 0;
      bottom: auto;
      width: 100%;
      height: 100%;
      max-height: var(--sectionHeight);
      margin: 0;
      object-fit: contain;
      object-position: center center;
    }
  }

  /*
   * Folded landscape ~594×368: point-003 artboard was right-biased (right:0).
   * Center horizontally like the other organic layers.
   */
  @media screen and (max-width: 650px) and (max-height: 400px) {
    .organic__point--003 {
      left: 50% !important;
      right: auto !important;
      width: auto !important;
      max-width: 100%;
      height: 100%;
      max-height: var(--sectionHeight);
      margin: 0 !important;
      transform: translateX(-50%);
      object-fit: contain !important;
      object-position: center center !important;
    }
  }

  /*
   * Full vh (not vh−header). PT floors children at vh; locking zero to
   * vh−header made ideal scrollTop ≠ reachable maxScroll so organic→zero
   * no-op’d on folded / short landscape. Match unfolded-portrait pairing.
   */
  .zeroAdditive {
    height: var(--vh) !important;
    min-height: var(--vh) !important;
    max-height: var(--vh) !important;
    background: url("../images/img_webp/zeroAdditive/bg.webp") center center no-repeat !important;
    background-size: auto 100% !important;
    box-sizing: border-box;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
    position: relative;
  }

  .zeroAdditive img {
    max-width: none;
  }

  .zeroAdditive__title {
    position: absolute;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: translateX(-50%);
  }

  .zeroAdditive__content {
    position: absolute;
    top: 0;
    left: 50%;
    width: 100%;
    height: 100%;
    margin-top: 0;
    transform: translateX(-50%);
  }

  .zeroAdditive__content__points {
    top: 0;
    right: auto;
    left: 50%;
    transform: translateX(-50%);
  }

  .zeroAdditive__content img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  /* brainEyesDev (between 9–11) — desktop bg + absolute titles */
  .brainEyesDev {
    --bg: url("../images/img_webp/brainEyesDev/bg.webp") center center no-repeat;
    --bgs: auto 100%;
  }

  .brainEyesDev img {
    max-width: none;
  }

  .brainEyesDev__title,
  .brainEyesDev__subtitle {
    position: absolute;
    top: var(--headerHeight);
    left: 50%;
    /* 80% size without scale() — keeps true horizontal center */
    height: 80%;
    width: auto;
    margin-top: 0;
    margin-left: 0;
    margin-right: 0;
    transform: translateX(-50%);
    object-fit: contain;
  }

  /*
   * 12 — milkProcess
   * Default in this MQ = prod ≥819 (normal desktop must match prod).
   * Duo/short-land compact styles ONLY in max-height:700 / folded nests below.
   */
  .milkProcess {
    --milkBg: url("../images/img_webp/milkProcess/bg.webp") no-repeat center center / cover;
    padding: 3.75rem 5rem;
  }

  .milkProcess__container {
    width: 60vh;
    max-width: 90vw;
    margin: 0 auto;
  }

  .milkProcess__title,
  img.milkProcess__title {
    display: block;
    max-width: 100%;
    max-height: 5.125rem;
    width: auto;
    height: auto;
    margin: 0 auto 2.25rem;
    object-fit: contain;
  }

  .milkProcess__title img {
    max-width: 25rem;
  }

  .milkProcess__grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 1.6875rem 2.5rem;
  }

  .milkProcess__cell {
    align-items: stretch !important;
    flex-direction: column !important;
  }

  .milkProcess__cell + .milkProcess__cell {
    margin-top: 0 !important;
  }

  /* Prod desktop video/text align: scale(1.45) crops L/R pad to desc width */
  .milkProcess__video {
    display: block;
    width: 100%;
    max-width: none;
    margin: -1rem 0;
    aspect-ratio: 16 / 11;
    border-radius: 0.5rem;
    transform: translateX(0) scale(1.45);
    object-fit: cover;
  }

  .milkProcess__desc,
  img.milkProcess__desc {
    width: auto;
    max-width: 100%;
    margin-top: 0.75rem;
  }

  /* Short-land ≤818: beat mobile stack; widen narrow 60vh container */
  @media screen and (max-width: 818px) {
    .milkProcess {
      padding: 2.5rem 3rem;
    }

    .milkProcess__container {
      width: min(72vw, 26rem);
      max-width: 90vw;
    }

    .milkProcess__title {
      margin-top: 1.75rem;
    }
  }

  /*
   * Short landscape only (max-height ≤700, ≥651) — not tall normal desktop.
   * Keep prod video scale(1.45) + grid gap; only nudge title for short vh.
   */
  @media screen and (max-height: 700px) and (min-width: 651px) {
    .milkProcess__title,
    img.milkProcess__title {
      max-height: 3.5rem;
      margin-top: -1.75rem;
      margin-bottom: 2rem;
    }
  }

  /*
   * Folded landscape ~594×368: same layout as unfolded short-land (60vh
   * container, grid gap, scale(1.45) video) — scale whole block to fit vh.
   */
  @media screen and (max-width: 650px) and (max-height: 400px) {
    .milkProcess {
      height: var(--vh);
      min-height: var(--vh);
      max-height: var(--vh);
      /* Match desktop pad ratio; header clearance only */
      padding: calc(var(--headerHeight, 38px) + 0.35rem) 2.5rem 0.5rem;
      box-sizing: border-box;
      overflow: hidden;
      justify-content: flex-start;
      align-items: center;
      display: flex;
    }

    .milkProcess__container {
      /* Same width as short-land ≤818 unfolded; scale whole block to fit vh */
      width: min(72vw, 26rem) !important;
      max-width: 92vw !important;
      height: auto !important;
      min-height: 0;
      margin: 0 auto;
      display: block !important;
      transform: translateY(1.75rem) scale(0.62);
      transform-origin: top center;
    }

    /* Same title treatment as unfolded (≥651 short-land) */
    .milkProcess__title,
    img.milkProcess__title {
      max-height: 3.5rem !important;
      max-width: 100% !important;
      width: auto !important;
      margin-top: -1.75rem !important;
      margin-bottom: 2rem !important;
    }

    .milkProcess__grid {
      display: grid !important;
      grid-template-columns: 1fr 1fr;
      grid-template-rows: 1fr 1fr;
      gap: 1.6875rem 2.5rem !important;
      height: auto !important;
      flex: none !important;
      min-height: 0;
      align-content: unset;
    }

    .milkProcess__cell {
      align-items: stretch !important;
      flex-direction: column !important;
      overflow: visible !important;
      min-height: 0;
    }

    /* Identical to unfolded/desktop video align — no max-height clamp */
    .milkProcess__video {
      display: block;
      width: 100% !important;
      max-width: none !important;
      height: auto !important;
      max-height: none !important;
      margin: -1rem 0 !important;
      aspect-ratio: 16 / 11;
      border-radius: 0.5rem;
      transform: translateX(0) scale(1.45) !important;
      object-fit: cover;
    }

    .milkProcess__desc,
    img.milkProcess__desc {
      display: block;
      width: auto !important;
      max-width: 100% !important;
      height: auto !important;
      max-height: none !important;
      margin-top: 0.75rem !important;
      object-fit: contain !important;
      position: static;
      z-index: auto;
    }

    .milkProcess__cell--taste .milkProcess__desc,
    .milkProcess__cell--taste img.milkProcess__desc {
      max-height: none !important;
    }
  }

  /* 13 — tin (bundle ≤818 still forces .swiper-slide max-width:50vw) */
  .tin__title {
    max-width: none;
    max-height: 2.1875rem;
    margin-top: 4.5rem;
    margin-bottom: 4.5rem;
  }

  .tin__content {
    margin-top: 4.5rem;
  }

  .tin__content p {
    font-size: var(--f-title4-size);
  }

  .tin__btns__item {
    max-width: calc(750px + 2rem);
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(250px, max-content));
    margin-bottom: 4.5rem;
  }

  .tin__btns__btn {
    width: 250px;
  }

  .tin .swiper {
    padding-bottom: 3.25rem;
  }

  .tin .swiper-slide {
    max-width: 300px;
  }

  /*
   * Short landscape (e.g. 951×618 / 890×626): fit tin under top menu
   * (vh − headerHeight). Desktop 4.5rem gaps overflow short frames.
   * Exclude folded (~594×368) — that uses the tighter block below.
   */
  @media screen and (max-height: 700px) and (min-width: 651px) {
    .tin {
      height: calc(var(--vh) - var(--headerHeight));
      min-height: calc(var(--vh) - var(--headerHeight));
      max-height: calc(var(--vh) - var(--headerHeight));
      box-sizing: border-box;
      overflow: hidden;
      padding-top: 0.35rem;
      padding-bottom: 0.25rem;
      display: flex;
      flex-direction: column;
      justify-content: space-evenly;
      align-items: center;
    }

    .tin > picture,
    .tin__title {
      flex: 0 0 auto;
    }

    .tin__title {
      max-height: 1.75rem !important;
      margin-top: 1.85rem !important;
      margin-bottom: 0.75rem !important;
      transform: scale(0.7);
      transform-origin: center top;
    }

    .tin .swiper {
      flex: 1 1 auto;
      min-height: 0;
      width: 100%;
      margin-top: 1.15rem !important;
      margin-bottom: 0 !important;
      padding-bottom: 0.35rem !important;
      display: flex;
      flex-direction: column;
      justify-content: flex-start;
      align-items: center;
    }

    .tin .swiper-wrapper {
      flex: 0 0 auto;
      order: 1;
      height: auto !important;
    }

    .tin .swiper-slide {
      max-width: min(32vw, 15rem) !important;
      height: auto !important;
      align-self: center;
    }

    /* Pull side tins closer (bundle spaceBetween:100 @ ≥819). */
    .tin .swiper-slide-prev {
      transform: scale(0.85) translateX(48%) !important;
    }

    .tin .swiper-slide-next {
      transform: scale(0.85) translateX(-48%) !important;
    }

    .tin .swiper-slide img {
      height: auto !important;
      max-height: min(44vh, 16.5rem) !important;
      object-fit: contain !important;
    }

    /*
     * DOM: wrapper → pagination → tin__content. Reorder to cans → name → dots.
     * align-items:center would make Chinese min-content = 1 glyph — force row.
     */
    .tin__content {
      flex: 0 0 auto;
      order: 2;
      align-self: center;
      width: max-content !important;
      max-width: 92vw;
      height: auto !important;
      min-height: 1.35rem;
      margin-top: 0.35rem !important;
      margin-bottom: 0.2rem !important;
    }

    .tin .swiper-pagination {
      position: relative !important;
      top: auto !important;
      bottom: auto !important;
      left: auto !important;
      order: 3;
      width: 100%;
      margin-top: 0.1rem !important;
      margin-bottom: 0.15rem !important;
      transform: none !important;
      visibility: visible !important;
      opacity: 1 !important;
      z-index: 5;
    }

    .tin__content p {
      width: max-content !important;
      max-width: 92vw;
      white-space: nowrap !important;
      font-size: 0.9375rem !important;
      line-height: 1.2 !important;
      writing-mode: horizontal-tb !important;
    }

    .tin__btns {
      flex: 0 0 auto;
      width: 100%;
      margin-top: 0 !important;
      margin-bottom: 2rem !important;
    }

    .tin__btns__item {
      flex: 0 0 auto;
      gap: 0.5rem 0.75rem !important;
      margin-top: 0 !important;
      margin-bottom: 0 !important;
      max-width: min(782px, calc(100% - 1.5rem)) !important;
      grid-template-columns: repeat(3, max-content) !important;
    }

    .tin__btns__btn {
      width: clamp(7.5rem, 18vw, 11rem) !important;
      height: 2.25rem !important;
      min-height: 2.25rem !important;
      padding: 0 0.5rem !important;
      flex-direction: row !important;
      align-items: center !important;
      justify-content: center !important;
      line-height: 1.15 !important;
      font-size: 0.8125rem !important;
    }

    .tin__btns__btn span {
      line-height: 1.15 !important;
      padding: 0 !important;
      margin: 0 !important;
    }

    .tin__btns__btn--small {
      font-size: 0.6875rem !important;
      flex-direction: column !important;
    }
  }

  /*
   * Folded landscape ~594×368: fit under top menu (vh − headerHeight).
   * Must not inherit short-land (≥651) title/btn spacing — that overflows here.
   */
  @media screen and (max-width: 650px) and (max-height: 400px) {
    .tin {
      height: calc(var(--vh) - var(--headerHeight));
      min-height: calc(var(--vh) - var(--headerHeight));
      max-height: calc(var(--vh) - var(--headerHeight));
      box-sizing: border-box;
      overflow: hidden;
      padding-top: 0.25rem;
      padding-bottom: 0.35rem;
      display: flex;
      flex-direction: column;
      justify-content: space-evenly;
      align-items: center;
    }

    .tin > picture,
    .tin__title {
      flex: 0 0 auto;
    }

    .tin__title {
      max-height: 1.05rem !important;
      margin-top: 0.85rem !important;
      margin-bottom: 0.45rem !important;
      transform: scale(0.8);
      transform-origin: center top;
    }

    .tin .swiper {
      flex: 1 1 auto;
      min-height: 0;
      width: 100%;
      margin-top: 0.45rem !important;
      margin-bottom: 0 !important;
      padding-bottom: 0.25rem !important;
      display: flex;
      flex-direction: column;
      justify-content: flex-start;
      align-items: center;
    }

    .tin .swiper-wrapper {
      flex: 0 0 auto;
      order: 1;
      height: auto !important;
    }

    .tin .swiper-slide {
      max-width: min(42vw, 11.25rem) !important;
      height: auto !important;
      align-self: center;
    }

    .tin .swiper-slide-prev {
      transform: scale(0.85) translateX(40%) !important;
    }

    .tin .swiper-slide-next {
      transform: scale(0.85) translateX(-40%) !important;
    }

    .tin .swiper-slide img {
      height: auto !important;
      max-height: min(38vh, 8.5rem) !important;
      object-fit: contain !important;
    }

    /* Same stack as unfolded short-land: cans → name → indicator. */
    .tin__content {
      flex: 0 0 auto;
      order: 2;
      align-self: center;
      width: max-content !important;
      max-width: 92vw;
      height: auto !important;
      min-height: 1rem;
      margin-top: 0.25rem !important;
      margin-bottom: 0.1rem !important;
    }

    .tin .swiper-pagination {
      position: relative !important;
      top: auto !important;
      bottom: auto !important;
      left: auto !important;
      order: 3;
      width: 100%;
      margin-top: 0.05rem !important;
      margin-bottom: 0.1rem !important;
      transform: none !important;
      visibility: visible !important;
      opacity: 1 !important;
      z-index: 5;
    }

    .tin__content p {
      left: 50% !important;
      right: auto !important;
      width: max-content !important;
      max-width: 92vw;
      white-space: nowrap !important;
      font-size: 0.75rem !important;
      line-height: 1.2 !important;
      writing-mode: horizontal-tb !important;
      text-align: center !important;
      /* keep absolute center — scale alone would drop translate(-50%,-50%) */
      transform: translate(-50%, -50%) scale(0.8) !important;
      transform-origin: center center;
    }

    .tin__btns {
      flex: 0 0 auto;
      width: 100%;
      margin-top: 0 !important;
      margin-bottom: 0 !important;
    }

    .tin__btns__item {
      flex: 0 0 auto;
      gap: 0.35rem !important;
      margin-top: 0 !important;
      margin-bottom: 0 !important;
      max-width: 96vw !important;
      grid-template-columns: repeat(3, max-content) !important;
    }

    .tin__btns__btn {
      width: auto !important;
      min-width: 5.5rem;
      max-width: 7.5rem;
      height: 1.75rem !important;
      min-height: 1.75rem !important;
      padding: 0 0.45rem !important;
      flex-direction: row !important;
      align-items: center !important;
      justify-content: center !important;
      line-height: 1.15 !important;
      font-size: 0.625rem !important;
    }

    .tin__btns__btn span {
      line-height: 1.15 !important;
      padding: 0 !important;
      margin: 0 !important;
    }

    /* 荷蘭皇家美素佳兒 / 輕鬆訂 — folded landscape only */
    .tin__btns__btn--small {
      font-size: 0.45rem !important;
      flex-direction: column !important;
    }

    .tin__btns__btn.tin__btns__btn--small,
    .tin__btns__btn.tin__btns__btn--small span {
      font-size: 0.45rem !important;
      line-height: 1.15 !important;
    }
  }

  /* trackeasy — restore desktop hand (≤818 uses 65% mobile hand) */
  .trackeasy__hand {
    right: 50%;
    width: 31.3%;
    bottom: 0;
  }

  /* faq */
  .faq {
    --faq-font-size: 0.75rem;
  }

  .faq td:first-child {
    width: 50px;
  }

  /*
   * 678 only — bundle ≤818 still swaps mobile type tokens + auto-fit
   * collapses tin CTAs to 2 cols; 890 keeps native ≥819 (3×250).
   */
  @media screen and (max-width: 818px) {
    :root {
      --f-body-large-size: 18px;
      --f-body-medium-size: 16px;
      --f-body-small-size: 14px;
      --f-body-xlarge-size: 22px;
      --f-body-xsmall-size: 12px;
      --f-title1-size: 34px;
      --f-title2-size: 30px;
      --f-title3-size: 26px;
      --f-title4-size: 24px;
      --f-title5-size: 20px;
    }

    .tin__content {
      height: calc(var(--f-body-small-size) * 2);
    }

    .tin__content p {
      font-size: 24px;
    }

    /* Only the active tin's CTA set is visible (4 product groups in DOM). */
    .tin__btns__item {
      display: none;
      grid-template-columns: repeat(3, max-content);
      justify-content: center;
      justify-items: center;
      gap: 0.75rem 1rem;
      max-width: min(782px, calc(100% - 1.5rem));
      margin-inline: auto;
    }

    .tin__btns__item.active {
      display: grid;
    }

    .tin__btns__btn {
      width: clamp(148px, 28vw, 250px);
      font-size: 16px;
    }

    .tin__btns__btn--small {
      font-size: 12px;
    }
  }
}

/*
 * brainEyesDev subtitle — mobile portrait: tighten top gap
 * (bundle ≤818 uses margin-top: 1rem).
 */
@media screen and (orientation: portrait) {
  .brainEyesDev {
    align-items: center;
  }

  .brainEyesDev picture {
    display: flex;
    justify-content: center;
    width: 100%;
  }

  .brainEyesDev__title,
  .brainEyesDev__subtitle {
    display: block;
    width: 80%;
    max-width: 80%;
    height: auto;
    margin-left: auto;
    margin-right: auto;
    object-fit: contain;
  }

  .brainEyesDev__subtitle {
    margin-top: 0.35rem;
  }

  /*
   * Organic (9th) — folded portrait only: shrink milk drop + point boxes.
   * Unfolded portrait uses desktop organic layout below.
   */
  @media screen and (max-width: 499.98px) {
    .organic {
      align-items: center;
    }

    .organic__milk-drop {
      display: block;
      width: 80%;
      max-width: 80%;
      max-height: min(45dvh, 50vh);
      height: auto;
      margin-top: -1rem;
      margin-bottom: -2rem;
      margin-left: auto;
      margin-right: auto;
      object-fit: contain;
    }

    .organic__point {
      display: block;
      width: 78%;
      max-width: 78%;
      height: auto;
      margin-left: auto;
      margin-right: auto;
      object-fit: contain;
    }

    .organic__point--002 {
      margin-top: -1rem;
      margin-bottom: -1rem;
    }
  }
}

/*
 * Organic reveal-item — Duo unfolded portrait:
 * Desktop assets are full 16:9 artboards (title/drop/points composited in
 * frame). Stack as absolute layers, height-fit + centered — do NOT treat
 * them like mobile cropped strips (that made the title tiny / drop huge).
 */
@media screen and (min-width: 500px) and (orientation: portrait) {
  .organic {
    position: relative !important;
    display: block !important;
    overflow: hidden !important;
    background: var(--main-c) url("../images/img_webp/organic/bg.webp") center center
      no-repeat !important;
    background-size: cover !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    /*
     * Under-menu fit: slide already has padding-top:headerHeight, so this pane
     * must be vh−header or it overflows the fold. zeroAdditive stays full vh so
     * PT's per-child vh floor still matches scrollHeight/maxScroll for swipe.
     */
    height: calc(var(--vh) - var(--headerHeight)) !important;
    min-height: calc(var(--vh) - var(--headerHeight)) !important;
    max-height: calc(var(--vh) - var(--headerHeight)) !important;
    box-sizing: border-box !important;
  }

  .organic > picture {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    pointer-events: none;
  }

  .organic__title,
  .organic__milk-drop,
  .organic__point {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    display: block !important;
    width: auto !important;
    max-width: none !important;
    height: 100% !important;
    max-height: 100% !important;
    margin: 0 !important;
    transform: translate(-50%, -50%) !important;
    object-fit: contain !important;
    object-position: center center !important;
  }

  .organic__point--002 {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }
}

/*
 * TrackEasy — Duo unfolded portrait:
 * Desktop assets (folded-only -m ≤499.98). Lock to the visible area under
 * the header (PT leaves section top at --headerHeight — full vh clipped
 * hand/tin). Height-fit layers (cover) so the composition fills the screen.
 * Leave title/content transforms alone so GSAP fade + rotate-hand work.
 */
@media screen and (min-width: 500px) and (orientation: portrait) {
  .trackeasy {
    position: relative;
    display: block;
    /*
     * Full vh at y=0 — navbar overlays pale sky (same as unfolded landscape).
     * vh−header + menu snap left a sky strip that looked like a white gap.
     */
    height: var(--vh);
    min-height: var(--vh);
    max-height: var(--vh);
    overflow: hidden;
    background-color: #083e14;
    box-sizing: border-box;
    z-index: 0;
  }

  .trackeasy > picture {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    pointer-events: none;
  }

  .trackeasy__title,
  .trackeasy__content,
  .trackeasy__bg {
    position: absolute;
    top: 0;
    left: 50%;
    display: block;
    width: auto;
    max-width: none;
    height: 100%;
    max-height: 100%;
    margin: 0;
    transform: translateX(-50%);
    object-fit: cover;
    /* Under-menu park (matches dots) — no 32% sky crop (that hid titles). */
    object-position: center center;
  }

  .trackeasy__title,
  .trackeasy__content {
    z-index: 2;
  }

  .trackeasy__bg {
    z-index: 0;
    /* nudge farm plate a bit left (title/content stay centered) */
    transform: translateX(calc(-50% - 11vw));
    object-position: center center;
  }

  .trackeasy__hand {
    position: absolute;
    right: calc(50% + 11vw);
    bottom: 0;
    left: auto;
    width: auto;
    height: auto;
    max-height: 52%;
    object-fit: contain;
    object-position: right bottom;
    transform-origin: left bottom;
    z-index: 1;
  }

  /* Tin green covers overflowing / waving hand (desktop behavior) */
  .tin {
    position: relative;
    z-index: 2;
    overflow: hidden;
  }
}

/*
 * TrackEasy — Duo unfolded landscape (excl. folded ≤650×≤400):
 * PT lands this section at top:0 (header overlays sky). Use full vh so
 * hand/tin reach the screen bottom — vh−header left a green gap under the menu.
 * Height-fit layers to fill the frame.
 */
@media (horizontal-viewport-segments: 2) and (orientation: landscape),
  screen and (min-width: 680px) and (max-width: 1024px) and (max-height: 700px) and
    (orientation: landscape) {
  .trackeasy {
    position: relative;
    display: block;
    height: var(--vh);
    min-height: var(--vh);
    max-height: var(--vh);
    overflow: hidden;
    background-color: #083e14;
    box-sizing: border-box;
    z-index: 0;
  }

  .trackeasy > picture {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    pointer-events: none;
  }

  .trackeasy__title,
  .trackeasy__content,
  .trackeasy__bg {
    position: absolute;
    top: 0;
    display: block;
    height: 100%;
    max-height: 100%;
    margin: 0;
    object-position: center center;
  }

  /*
   * Title/content: full-width + contain centers without translateX(-50%).
   * Bundle + GSAP still bake x≈−50% — index.html clearTrackEasyTitleX()
   * forces x:0 on this MQ so the plate is not shifted left.
   */
  .trackeasy__title,
  .trackeasy__content {
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    object-fit: contain;
    z-index: 2;
  }

  .trackeasy__bg {
    left: 50%;
    width: auto;
    max-width: none;
    transform: translateX(-50%);
    object-fit: cover;
    z-index: 0;
  }

  .trackeasy__hand {
    position: absolute;
    right: 50%;
    bottom: 0;
    left: auto;
    width: auto;
    height: auto;
    max-height: 62%;
    object-fit: contain;
    object-position: right bottom;
    transform-origin: left bottom;
    z-index: 1;
  }

  .tin {
    position: relative;
    z-index: 2;
    overflow: hidden;
  }
}

/*
 * Footer bottom — match friso.com.hk first-purchase-offer:
 * FCP logo ~48px (3rem), copyright 16px Noto Sans TC.
 * Beat global img{height:auto} that was blowing the logo up.
 */
.footer__wrapper--bottom,
.footer__wrapper--bottom .footer__wrapper {
  font-family: "Noto Sans TC", "Noto Sans", Arial, sans-serif;
  font-size: 1rem;
  line-height: normal;
}

.footer__wrapper--bottom img,
.footer__wrapper--bottom .responsive-image {
  height: 3rem !important;
  width: auto !important;
  max-height: 3rem !important;
  max-width: none;
  padding: 0;
  object-fit: contain;
}

.footer__wrapper--bottom .footer__bottom--right p {
  font-family: "Noto Sans TC", "Noto Sans", Arial, sans-serif;
  font-size: 1rem !important;
  font-weight: 400;
  line-height: normal;
  color: #000;
  margin-bottom: 0;
}

@media screen and (max-width: 768px) {
  /* Reference uses 4.8rem at 10px root (=48px); keep 3rem at 16px root. */
  .footer__wrapper--bottom img,
  .footer__wrapper--bottom .responsive-image {
    height: 3rem !important;
    max-height: 3rem !important;
  }

  .footer__wrapper--bottom .footer__bottom--right p {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
}

/*
 * Promotion video (8th) — top-fit under navbar (bundle centers in the slide
 * and leaves --main-c gaps / crops from the middle).
 */
.promotion-video-slide {
  align-items: flex-start;
  justify-content: center;
  padding-top: 0;
  touch-action: pan-y;
}

@media screen and (orientation: portrait) and (max-width: 818px) {
  .promotion-video-slide,
  .promotion-video {
    touch-action: pan-y;
  }
}

.promotion-video {
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  object-position: center top;
}

@media screen and (min-width: 819px) and (orientation: landscape),
  screen and (max-height: 700px) and (orientation: landscape) {
  .promotion-video-slide {
    align-items: flex-start;
    padding-top: 0;
    /* Video fills under the menu — no --main-c strip */
    background: transparent;
  }

  .promotion-video {
    width: 100%;
    height: 100%;
    margin-top: 0;
    object-fit: cover;
    object-position: center top;
  }
}

/*
 * Farm — mobile portrait:
 * viewport-container already pads --headerHeight; bundle also pads farm →
 * double gap under the navbar. Zero farm padding; keep prod height:auto video.
 */
@media screen and (orientation: portrait) {
  .farmSuperiority {
    touch-action: pan-y;
    padding-top: 0 !important;
  }

  .farmSuperiority-video {
    top: 5% !important;
    bottom: auto !important;
    left: 50% !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center top !important;
    transform: translate(-50%, 0) !important;
  }

  .farmSuperiority-video,
  .farmSuperiority-item,
  .farmSuperiority-item img {
    pointer-events: none !important;
  }
}

/*
 * Farm — Duo unfolded portrait only (≥500px).
 * Desktop KD5 is ultra-wide (~3.55:1); width:100% + height:auto leaves a large
 * empty band. Height-fit like opening: fill vh, crop sides.
 */
@media screen and (min-width: 500px) and (orientation: portrait) {
  .farmSuperiority {
    overflow: hidden !important;
  }

  .farmSuperiority-container {
    align-items: stretch !important;
    justify-content: stretch !important;
    height: 100% !important;
  }

  .farmSuperiority-video {
    top: 0 !important;
    right: auto !important;
    bottom: 0 !important;
    left: 50% !important;
    width: auto !important;
    max-width: none !important;
    height: 100% !important;
    max-height: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
    transform: translateX(-50%) !important;
  }
}

/*
 * Farm (7th) — short landscape only (≤700). Tall normal desktop keeps prod
 * padding-top: headerHeight + centered video (do not pin/zero-pad here).
 * Portrait ≤818 keeps bundle mobile: height:auto video, -m card art.
 */
@media screen and (max-height: 700px) and (orientation: landscape) {
  /* Pin under navbar (bundle short-desktop center+headerHeight left a gap). */
  .farmSuperiority {
    padding-top: 0;
  }

  .farmSuperiority-container {
    align-items: flex-start;
    justify-content: flex-start;
  }

  .farmSuperiority-video {
    top: calc(50% + var(--headerHeight) / 2);
    left: 50%;
    width: 100%;
    height: calc(100% - var(--headerHeight));
    object-fit: cover;
    object-position: center center;
    filter: contrast(1.025);
    transform: translate(-50%, -50%);
  }

  .farmSuperiority-item {
    align-items: flex-start;
    justify-content: flex-start;
    background-size: auto 100% !important;
    background-position: center top;
    padding-top: 0;
  }

  .farmSuperiority-item-title {
    position: relative;
    left: 50%;
    width: auto;
    height: 100%;
    transform: translateX(-50%);
  }

  .farmSuperiority-item img {
    height: 100%;
    object-position: center top;
  }

  #card0 {
    background-image: url("../images/img_webp/farmSuperiority/demo-farm-superiority-bg-000.webp");
  }
  #card1 {
    background-image: url("../images/img_webp/farmSuperiority/demo-farm-superiority-bg-001.webp");
  }
  #card2 {
    background-image: url("../images/img_webp/farmSuperiority/demo-farm-superiority-bg-002.webp");
  }
  #card3 {
    background-image: url("../images/img_webp/farmSuperiority/demo-farm-superiority-bg-003.webp");
  }
  #card4 {
    background-image: url("../images/img_webp/farmSuperiority/demo-farm-superiority-bg-004.webp");
  }
  #card5 {
    background-image: url("../images/img_webp/farmSuperiority/demo-farm-superiority-bg-005.webp");
  }
}

/*
 * HCP title-m is tight-cropped (~100% ink); brainEyesDev title-m is only
 * ~54% ink (side transparency). At the same 80% box, HCP reads much larger.
 * Size HCP so inked width matches brainEyesDev at 80%:
 *   80% * 0.544 / 0.998 ≈ 43.5%
 */
@media screen and (orientation: portrait) {
  .hcp__title img {
    display: block;
    width: 43.5% !important;
    max-width: 43.5% !important;
    height: auto !important;
    max-height: none !important;
    margin-left: auto;
    margin-right: auto;
    object-fit: contain !important;
    aspect-ratio: 438 / 164;
  }
}

/*
 * HCP (11th) — mobile portrait: pin boy to section bottom (same as desktop /
 * short-land). Cover + bottom crops empty sky at top so the boy reads higher
 * and the asset bottom sits flush with the section bottom.
 */
@media screen and (orientation: portrait) {
  .hcp {
    overflow: hidden;
    touch-action: pan-y;
  }

  .hcp__boy {
    /* Fit width only; height from aspect ratio. Bottom-pin; top may crop. */
    top: auto !important;
    bottom: 0 !important;
    left: 50%;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    transform: translateX(-50%);
    object-fit: unset !important;
    pointer-events: none !important;
  }

  .hcp__boy img,
  .hcp__title,
  .hcp__title img,
  .hcp__txt__item img {
    pointer-events: none !important;
  }

  .hcp__title {
    top: 2.25rem;
  }

  .hcp__txt {
    top: calc(var(--headerHeight) + 9.5rem);
  }

  /* Bottom texts at 90% of prior size (80%×0.9 → 72%); data also ×0.9 */
  .hcp__txt__item__title {
    display: block !important;
    width: 72% !important;
    max-width: 72% !important;
    height: auto !important;
    max-height: none !important;
    margin-left: auto;
    margin-right: auto;
    object-fit: contain !important;
  }

  .hcp__txt__item__data {
    transform: scale(0.9);
    transform-origin: top center;
    /* scale() keeps full layout box — pull rows together */
    margin-bottom: -0.85rem;
  }

  .hcp__txt__item__data + .hcp__txt__item__data {
    margin-top: -0.35rem;
  }

  .hcp__txt__item__data__img,
  .hcp__txt__item__data__number img {
    object-fit: contain !important;
  }

  /*
   * item--003 data rows: match item--002 spacing + img box (002a/b are equal
   * height; 003b-m is shorter — lock both 003 imgs to the same max-height as
   * sibling data so gaps match 002).
   */
  .hcp__txt__item--002 .hcp__txt__item__data,
  .hcp__txt__item--003 .hcp__txt__item__data {
    margin-bottom: -0.85rem;
  }

  .hcp__txt__item--002 .hcp__txt__item__data + .hcp__txt__item__data,
  .hcp__txt__item--003 .hcp__txt__item__data + .hcp__txt__item__data {
    margin-top: -0.35rem;
  }

  .hcp__txt__item--003 .hcp__txt__item__data__img {
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 12vh !important;
    object-fit: contain !important;
    object-position: center center;
  }
}

/*
 * HCP — folded portrait only (<500px).
 * Item titles: 002/003 -m canvases are 750px vs 001’s 852px — scale width by
 * 750/852 so glyph size matches item 1 at the shared 72% box.
 */
@media screen and (orientation: portrait) and (max-width: 499.98px) {
  .hcp__txt {
    top: calc(var(--headerHeight) + 6.8rem);
  }

  .hcp__txt__item--002 .hcp__txt__item__title,
  .hcp__txt__item--003 .hcp__txt__item__title {
    width: calc(72% * 750 / 852) !important;
    max-width: calc(72% * 750 / 852) !important;
  }

  .hcp__txt__item--003 .hcp__txt__item__data + .hcp__txt__item__data .hcp__txt__item__data__img {
    max-height: 7.5vh !important;
    margin-top: 2vh !important;
  }
}

/*
 * HCP — Duo unfolded portrait only (≥500px).
 */
@media screen and (min-width: 500px) and (orientation: portrait) {
  .hcp__boy {
    bottom: -56px !important;
  }
}

/*
 * HCP — Duo unfolded portrait only.
 * Shrink section title; enlarge txt titles (+ data) vs shared portrait 72%/0.9.
 * Item titles: 002/003 -m canvases are 750px vs 001’s 852px — scale by 750/852
 * so glyph size matches 001 after the shared width bump.
 * 003b: desktop asset has empty right pad; nudge left (+4.5%).
 */
@media screen and (min-width: 500px) and (orientation: portrait) {
  .hcp__title img {
    width: 36% !important;
    max-width: 36% !important;
  }

  .hcp__txt__item {
    gap: 0;
  }

  .hcp__txt__item__title {
    width: 64% !important;
    max-width: 64% !important;
    /* Slight pull only — leave room above data */
    margin-bottom: -0.35rem !important;
  }

  .hcp__txt__item--002 .hcp__txt__item__title,
  .hcp__txt__item--003 .hcp__txt__item__title {
    width: calc(64% * 750 / 852) !important;
    max-width: calc(64% * 750 / 852) !important;
  }

  .hcp__txt__item__data {
    transform: scale(1);
    margin-top: 0.45rem;
    margin-bottom: -0.95rem;
  }

  .hcp__txt__item__data + .hcp__txt__item__data {
    margin-top: -0.75rem;
  }

  .hcp__txt__item__data__img {
    max-height: min(10.5vh, 6rem) !important;
    max-width: min(86vw, 24rem) !important;
  }
}

/*
 * HCP txt items — mid portrait (466×678 / 626×890):
 * Shrink txt item art — bundle 4.5vh/12vh reads large on these taller mid frames.
 * Folded phones (<500) keep these shared rules only (no 003b override).
 */
@media screen and (min-width: 430px) and (min-height: 600px) and (orientation: portrait) {
  /* Titles keep 80% = brainEyesDev subtitle; only shrink data art */
  .hcp__txt__item__data__img {
    max-height: min(9vh, 5.25rem);
    max-width: min(78vw, 22rem);
    width: auto;
    height: auto;
    object-fit: contain;
  }

  /* Keep 003 data imgs on the same mid-portrait cap as 002 */
  .hcp__txt__item--003 .hcp__txt__item__data__img {
    max-height: min(9vh, 5.25rem) !important;
    max-width: min(78vw, 22rem) !important;
  }

  .hcp__txt__item__data__number img {
    height: 2.25rem;
    width: auto;
  }

  /* Narrower mid portrait only (e.g. 466×678) */
  @media screen and (max-width: 520px) {
    .hcp__txt__item__data__img {
      max-height: min(6.75vh, 3.75rem);
      max-width: min(72vw, 18rem);
    }

    .hcp__txt__item--003 .hcp__txt__item__data__img {
      max-height: min(6.75vh, 3.75rem) !important;
      max-width: min(72vw, 18rem) !important;
    }

    .hcp__txt__item__data__number img {
      height: 1.75rem;
    }
  }
}

/*
 * HCP — Duo unfolded portrait (≥500): beat mid-portrait 003-only shrink so
 * item--003 data text matches item--001 / --002 (same max box + -m assets).
 * 003b-m canvas is 104h vs siblings’ 166h — scale max-height by 104/166 so
 * glyph size matches at the shared display scale.
 * 003b-m padT is 14 vs siblings’ ~40 — translateY by that delta so row gap
 * matches item--002; also nudge ~4px right.
 */
@media screen and (min-width: 500px) and (orientation: portrait) {
  .hcp__txt__item--002 .hcp__txt__item__data,
  .hcp__txt__item--003 .hcp__txt__item__data {
    margin-bottom: -0.95rem;
  }

  .hcp__txt__item--002 .hcp__txt__item__data + .hcp__txt__item__data,
  .hcp__txt__item--003 .hcp__txt__item__data + .hcp__txt__item__data {
    margin-top: -0.75rem;
  }

  .hcp__txt__item--003 .hcp__txt__item__data__img {
    max-height: min(10.5vh, 6rem) !important;
    max-width: min(86vw, 24rem) !important;
    width: auto !important;
    height: auto !important;
    transform: none;
    object-fit: contain !important;
    object-position: center center;
  }

  .hcp__txt__item--003 .hcp__txt__item__data + .hcp__txt__item__data .hcp__txt__item__data__img {
    max-height: calc(min(10.5vh, 6rem) * 104 / 166) !important;
    max-width: min(86vw, 24rem) !important;
    /* padT 40→14 compensation + 4px right (003b content) */
    transform: translate(4px, calc((40 - 14) * min(10.5vh, 6rem) / 166));
  }
}

/*
 * HCP (11th) — desktop layout ≥819 AND short landscape (890×626 / 678×466).
 * Bundle ≤818 mobile uses top:1rem + width:100% (not full height) — override.
 */
@media screen and (min-width: 819px) and (orientation: landscape),
  screen and (max-height: 700px) and (orientation: landscape) {
  /* boy = height:100% + width:auto (ultra-wide, centered via translateX(-50%))
   * Global img{max-width:100%} must be lifted or width clamps and layout breaks. */
  .hcp__boy {
    top: auto !important;
    bottom: 0 !important;
    left: 50%;
    width: auto !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none;
    transform: translateX(-50%);
  }

  /*
   * Short landscape only — absolute title artboard + txt top 0.32.
   * Tall normal desktop keeps prod relative title + txt top 0.26.
   */
  @media screen and (max-height: 700px) {
    /*
     * hcp-title.webp is a full artboard like brainEyesDev/title.webp.
     * Size the WRAPPER like .brainEyesDev__title (absolute + % height).
     * Ink-match: brainEyes ink_h 262/2160 vs hcp 282/2160 → 80% × 262/282.
     */
    .hcp__title {
      position: absolute !important;
      z-index: 3;
      top: var(--headerHeight);
      left: 50%;
      width: auto;
      height: 74.33%;
      margin: 0;
      padding: 0;
      transform: translateX(-50%);
      opacity: 1;
      visibility: visible;
      pointer-events: none;
    }

    .hcp__title picture {
      display: block;
      height: 100%;
      width: auto;
    }

    .hcp__title img {
      display: block !important;
      position: relative !important;
      top: auto !important;
      left: auto !important;
      width: auto !important;
      height: 100% !important;
      max-width: none !important;
      max-height: none !important;
      margin: 0 !important;
      transform: none !important;
      object-fit: contain !important;
    }

    .hcp__txt {
      top: calc(var(--vh) * 0.32);
    }

    .hcp__txt__item {
      gap: 0;
    }

    .hcp__txt__item__title {
      max-height: 5.75vh;
      width: auto;
      max-width: 100%;
      height: auto;
      object-fit: contain;
    }

    /*
     * Unfolded short landscape only — txt-003__title.webp 1px shorter.
     * Folded ≤650×≤400 keeps its own ink-match heights below.
     */
    @media screen and (min-width: 651px) {
      .hcp__txt__item--003 .hcp__txt__item__title {
        max-height: calc(5.75vh - 1px);
      }
    }

    .hcp__txt__item__data__img {
      max-width: 100%;
      max-height: 13.24vh;
      width: auto;
      height: auto;
      object-fit: contain;
    }

    .hcp__txt__item__data__number {
      margin-right: 1rem;
    }

    .hcp__txt__item__data__number img {
      height: 2.9rem;
      width: auto;
    }
  }

  /*
   * Folded landscape ~594×368: keep absolute title, but clear short-land
   * left:50% + translateX(-50%) when using left:0 — otherwise the artboard
   * sits at x≈-297 (half off-screen).
   */
  @media screen and (max-width: 650px) and (max-height: 400px) {
    .hcp__title {
      position: absolute !important;
      top: 20vh !important;
      left: 0 !important;
      right: auto !important;
      width: 100% !important;
      height: 72% !important;
      margin: 0 !important;
      padding: 0 !important;
      transform: none !important;
      z-index: 3;
      opacity: 1 !important;
      visibility: visible !important;
      pointer-events: none;
    }

    .hcp__title picture {
      display: block;
      height: 100%;
      width: auto;
    }

    .hcp__title img {
      display: block !important;
      position: relative !important;
      top: auto !important;
      left: auto !important;
      width: auto !important;
      height: 100% !important;
      max-width: none !important;
      max-height: none !important;
      margin: 0 !important;
      transform: none !important;
      object-fit: contain !important;
      object-position: left top !important;
    }
  }

  /*
   * Folded landscape ~594×368: must come AFTER short-land .hcp__txt top/spacing
   * or cascade keeps 0.32 / 5.75vh / 13.24vh.
   */
  @media screen and (max-width: 650px) and (max-height: 400px) {
    :root {
      --brain-sub-w: 110vw;
    }

    .hcp__txt {
      top: calc(var(--vh) * 0.37);
    }

    .hcp__txt__item {
      gap: 0;
    }

    /*
     * Match brainEyesDev__subtitle glyph ink on folded landscape.
     * Subtitle width = --brain-sub-w (86vw); artboard 4560×2160, ink h 72.
     * HCP item titles share ink h 72 but smaller canvases (146 / 138 / 128).
     */
    .hcp__txt__item__title {
      width: auto !important;
      max-width: none !important;
      max-height: none !important;
      height: calc(var(--brain-sub-w, 110vw) * 146 / 4560) !important;
      margin-bottom: -0.25rem;
      object-fit: contain !important;
    }

    .hcp__txt__item--002 .hcp__txt__item__title {
      height: calc(var(--brain-sub-w, 110vw) * 138 / 4560) !important;
    }

    .hcp__txt__item--003 .hcp__txt__item__title {
      height: calc(var(--brain-sub-w, 110vw) * 128 / 4560) !important;
    }

    .hcp__txt__item__data {
      margin-top: -0.25rem;
      margin-bottom: -0.2rem;
    }

    .hcp__txt__item__data + .hcp__txt__item__data {
      margin-top: -0.25rem;
    }

    .hcp__txt__item__data__img {
      max-height: 12vh;
    }

    .hcp__txt__item__data__number {
      margin-right: 0.75rem;
    }

    .hcp__txt__item__data__number img {
      height: 2.4rem;
    }
  }
}


/* Prevent under-slide flash (milkProcess/tin) through brainEyesDev.
 * Tall desktop keeps prod --bgs:auto 100%; cover only on short landscape. */
.brainEyesDev {
  background-color: #d7e4f2; /* matches bg.webp sky */
}
@media screen and (max-height: 700px) and (orientation: landscape) {
  .brainEyesDev {
    --bgs: cover;
    background-color: #d7e4f2;
  }
}


/* Prefer large viewport fill so iOS Safari can collapse the bottom bar over content. */
@supports (-webkit-touch-callout: none) {
  html.is-iphone,
  html.is-iphone body {
    min-height: 100vh;
    min-height: -webkit-fill-available;
  }
  html.is-iphone .viewport-container {
    min-height: var(--vh, 100vh);
  }
}


/* navbar-scroll-jump-fix (all iPhone): keep fixed bar, no transform pin. */
.is-iphone .navbar {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 450 !important;
  transform: none !important;
  -webkit-transform: none !important;
  background-color: var(--text-white, #fff);
}

/*
 * Landscape menu height lock — iPhone Safari ONLY.
 * Safari collapses top chrome / safe-area; Chrome/Firefox on iOS skip this.
 */
@media screen and (orientation: landscape) {
  .is-iphone-safari .navbar {
    /* Solid white full --headerHeight (no transparent gap → no --main-c
     * green hairline). Logo overflows below into the section. */
    box-sizing: border-box !important;
    height: var(--headerHeight) !important;
    min-height: var(--headerHeight) !important;
    max-height: var(--headerHeight) !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: calc(0.5rem + var(--sal, 0px)) !important;
    padding-right: calc(0.5rem + var(--sar, 0px)) !important;
    display: flex !important;
    align-items: flex-start !important;
    overflow: visible !important;
    background-color: var(--text-white, #fff) !important;
  }
  /* Kill leftover ::before from prior shorter-bar experiment */
  .is-iphone-safari .navbar::before {
    content: none !important;
    display: none !important;
  }
  .is-iphone-safari .navbar__wrapper,
  .is-iphone-safari .navbar__header {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    align-items: center !important;
  }
  .is-iphone-safari .navbar__logo {
    top: 0;
    transform: translateX(-50%);
  }
  .is-iphone-safari .viewport-container {
    padding-top: var(--headerHeight) !important;
  }

  /* Opening media: height-fit under menu (no green gap; no width-cover crop) */
  .is-iphone-safari .opening__video {
    top: 0 !important;
    bottom: 0 !important;
    left: 50% !important;
    right: auto !important;
    width: auto !important;
    height: 100% !important;
    max-width: none !important;
    transform: translateX(-50%) !important;
    object-fit: contain !important;
    object-position: center center !important;
  }

  .is-iphone-safari .opening__bg__static {
    top: 0 !important;
    bottom: 0 !important;
    left: 50% !important;
    width: auto !important;
    height: 100% !important;
    max-width: none !important;
    transform: translateX(-50%) !important;
    object-fit: contain !important;
    object-position: center center !important;
  }

  .is-iphone-safari .opening {
    overflow: hidden !important;
    background-size: auto 100% !important;
    background-position: center center !important;
  }
}

.is-iphone {
  --vh: 100svh;
}

/*
 * Folded landscape compact menu — iPhone Safari ONLY.
 * Bare .navbar used to match desktop Chrome in a short/narrow window
 * (≤900×≤700 landscape) and pinned buttons to the top (padding-top:0).
 */
@media screen and (max-width: 900px) and (max-height: 700px) and (orientation: landscape) {
  html.is-iphone-safari {
    --headerHeight: 38px;
  }

  .is-iphone-safari .navbar {
    box-sizing: border-box !important;
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: calc(0.5rem + var(--sal, 0px)) !important;
    padding-right: calc(0.5rem + var(--sar, 0px)) !important;
    overflow: visible !important;
  }

  .is-iphone-safari .navbar__logo {
    top: 0 !important;
    transform: translateX(-50%) !important;
  }

  .is-iphone-safari .navbar__logo img {
    width: 6.25rem !important;
    max-width: 6.25rem !important;
    height: auto !important;
  }

  .is-iphone-safari .navbar__btn-toggler img {
    width: 24px !important;
    max-width: 24px !important;
    height: auto !important;
  }

  .is-iphone-safari .navbar__btn-cta img {
    width: 18px !important;
    max-width: 18px !important;
    height: auto !important;
  }

  .is-iphone-safari .navbar .icon img {
    height: 16px !important;
    width: auto !important;
  }

  .is-iphone-safari .viewport-container {
    padding-top: 38px !important;
  }
}

/* Dual-screen / unfolded: never use the compact folded menu */
@media (horizontal-viewport-segments: 2) and (orientation: landscape) {
  :root {
    --headerHeight: 55px;
  }

  .navbar,
  .is-iphone .navbar {
    height: var(--headerHeight) !important;
    min-height: var(--headerHeight) !important;
    max-height: var(--headerHeight) !important;
  }

  .navbar__logo img {
    width: 10em !important;
    max-width: none !important;
  }

  .navbar__btn-toggler img {
    width: 34px !important;
    max-width: 34px !important;
  }

  .navbar__btn-cta img {
    width: 24px !important;
    max-width: 24px !important;
  }

  .navbar .icon img {
    height: 20px !important;
  }

  .viewport-container,
  .is-iphone .viewport-container {
    padding-top: var(--headerHeight) !important;
  }
}

/*
 * Duo unfolded landscape — right progress dots + tryjoin CTA a bit smaller
 * than desktop (14px / 70px). Spans dual-screen landscape + short-land Duo
 * (e.g. ~717×512); excludes folded short landscape (≤650×≤400).
 */
@media (horizontal-viewport-segments: 2) and (orientation: landscape),
  screen and (min-width: 680px) and (max-width: 1024px) and (max-height: 700px) and
    (orientation: landscape) {
  .global-progress-dot {
    width: 10px;
    height: 10px;
    border-width: 2px;
  }

  .global-progress-bar .nav {
    gap: 9px;
  }

  .topcta,
  .topcta.non-phase2 {
    max-width: 54px;
  }
}

/*
 * Duo unfolded portrait — free PT sections must allow vertical pan so swipe
 * can continue through organic → brain → footer and reverse back to top.
 * Gated slides keep their own touch-action:none from JS while locked.
 */
@media screen and (min-width: 500px) and (orientation: portrait) {
  .opening,
  .hkNo1,
  .inner-scroll-section,
  .brainEyesDev,
  .normal-content-slide {
    touch-action: pan-y;
  }

  /* Survive GSAP .from / reverse races after free-snap 8→9. */
  .brainEyesDev.is-revealed .brainEyesDev__title,
  .brainEyesDev.is-revealed .brainEyesDev__subtitle {
    opacity: 1 !important;
    visibility: visible !important;
  }

  /* Free-snap 7→8 skips bundle organic.play — force visible after reveal. */
  .organic.is-revealed .organic__title,
  .organic.is-revealed .organic__milk-drop,
  .organic.is-revealed .organic__point--001,
  .organic.is-revealed .organic__point--002,
  .organic.is-revealed .organic__point--003,
  .zeroAdditive.is-revealed .zeroAdditive__title,
  .zeroAdditive.is-revealed .zeroAdditive__content__zero,
  .zeroAdditive.is-revealed .zeroAdditive__content__points {
    opacity: 1 !important;
    visibility: visible !important;
  }
}

/*
 * Duo / short-tablet landscape — pan-y for free-snap.
 * Unfolded short-land: restore pre-swipe (0f50fd5) height:80% title sizing
 * (bigger than the later width:80% clamp). Folded nest stays tighter below.
 */
@media screen and (orientation: landscape) and (max-height: 700px),
       screen and (orientation: landscape) and (min-width: 500px) and (max-width: 1024px),
       screen and (horizontal-viewport-segments: 2) and (orientation: landscape) {
  .opening,
  .hkNo1,
  .inner-scroll-section,
  .brainEyesDev,
  .normal-content-slide {
    touch-action: pan-y;
  }

  .brainEyesDev {
    align-items: center;
  }

  .brainEyesDev picture {
    display: flex;
    justify-content: center;
    width: 100%;
  }

  /* Unfolded landscape — same as desktop short-land @ 0f50fd5 */
  .brainEyesDev__title,
  .brainEyesDev__subtitle {
    position: absolute;
    top: var(--headerHeight, 3.5rem);
    left: 50%;
    right: auto;
    display: block;
    height: 80%;
    width: auto;
    max-width: none;
    max-height: none;
    margin: 0;
    margin-top: 0;
    transform: translateX(-50%);
    object-fit: contain;
  }

  .brainEyesDev__subtitle {
    margin-top: 0.25rem;
  }

  .brainEyesDev.is-revealed .brainEyesDev__title,
  .brainEyesDev.is-revealed .brainEyesDev__subtitle {
    opacity: 1 !important;
    visibility: visible !important;
  }

  .organic.is-revealed .organic__title,
  .organic.is-revealed .organic__milk-drop,
  .organic.is-revealed .organic__point--001,
  .organic.is-revealed .organic__point--002,
  .organic.is-revealed .organic__point--003,
  .zeroAdditive.is-revealed .zeroAdditive__title,
  .zeroAdditive.is-revealed .zeroAdditive__content__zero,
  .zeroAdditive.is-revealed .zeroAdditive__content__points {
    opacity: 1 !important;
    visibility: visible !important;
  }

  /*
   * Folded landscape ~594×368: match HCP title font-level (ink size).
   * Title = height artboard × ink ratio; subtitle stays width-based
   * so height:80% from unfolded above does not blow up here.
   */
  @media screen and (max-width: 650px) and (max-height: 400px) {
    :root {
      --brain-sub-w: 110vw;
    }

    .brainEyesDev__title {
      top: calc(var(--headerHeight, 3.5rem) + 1.5vh) !important;
    }

    .brainEyesDev__subtitle {
      top: calc(var(--headerHeight, 3.5rem) + 0.5vh) !important;
      /* Was 80vw — bump a bit; HCP item titles use the same --brain-sub-w. */
      width: min(var(--brain-sub-w, 110vw), 110%) !important;
      max-width: min(var(--brain-sub-w, 110vw), 110%) !important;
      height: auto !important;
      max-height: 72% !important;
    }

    /* Title is the first picture in .brainEyesDev */
    .brainEyesDev > picture:first-of-type {
      position: absolute;
      top: calc(var(--headerHeight, 3.5rem) + 1.5vh);
      left: 0;
      width: 100%;
      height: calc(72% * 282 / 262);
      margin: 0;
      pointer-events: none;
    }

    .brainEyesDev__title {
      position: relative !important;
      top: auto !important;
      left: auto !important;
      right: auto !important;
      display: block !important;
      width: auto !important;
      max-width: none !important;
      height: 100% !important;
      max-height: none !important;
      margin: 0 !important;
      transform: none !important;
      object-fit: contain !important;
      object-position: left top !important;
    }
  }
}

/*
 * zeroAdditive — folded portrait only (≤499.98px):
 * Bundle pads 6.375rem / 9.8125rem + content margin-top 5.75rem, so the
 * stack sits high. Flex-center in the under-menu visible band (pb=header so
 * box stays full vh for PT/swipe). Leave unfolded (≥500) alone.
 */
@media screen and (orientation: portrait) and (max-width: 499.98px) {
  .zeroAdditive {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding-top: 0 !important;
    padding-bottom: var(--headerHeight) !important;
  }

  .zeroAdditive__title {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }

  .zeroAdditive__content {
    margin-top: 0 !important;
  }
}

/*
 * zeroAdditive — Duo unfolded portrait (~669×825):
 * Full vh pane (matches PT metrics / organic sibling). Swipe parks the pane
 * under the menu; flex-center the scaled stack in that vh.
 */
@media screen and (min-width: 500px) and (orientation: portrait) {
  .zeroAdditive {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    height: var(--vh) !important;
    min-height: var(--vh) !important;
    max-height: var(--vh) !important;
    box-sizing: border-box !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    overflow: hidden;
    background: url("../images/img_webp/zeroAdditive/bg.webp") center center no-repeat !important;
    background-size: cover !important;
  }

  .zeroAdditive > picture {
    flex: 0 0 auto;
    scale: 0.75;
  }

  .zeroAdditive__content {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: calc(100% - 28px) !important;
    height: auto !important;
    margin-top: 0 !important;
    transform: none !important;
    scale: 0.75;
    flex: 0 0 auto;
  }
}

/* FAQ list — portrait: allow vertical pan (footer ladder was eating swipes). */
@media screen and (orientation: portrait) {
  .faq,
  .faq__content,
  .slide.inner-scroll-section.normal-content-slide {
    touch-action: pan-y;
  }
}

