@media (min-width: 768px) {
  .mobile-card-slot {
    display: contents;
  }
}

@media (max-width: 767px) {
  /* Prevent automatic text inflation on mobile browsers. */
  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  html,
  body {
    width: 100%;
    min-width: 0;
  }

  body {
    overflow-x: hidden;
  }

  .brown-button {
    min-width: 106px;
    height: 36px;
    padding: 0 18px;
    font-size: 14px;
  }

  .clinical,
  .trial {
    min-height: 675px;
    aspect-ratio: 390 / 675;
    background-repeat: no-repeat;
    background-position: center top;
    background-size: cover;
  }

  .hero > img,
  .trial > img {
    display: none;
  }

  /* 01  KV：整張 390 × 675 等比縮放 */
  .hero {
    background-image: url('images/kv_bg-mobile.jpg');
    width: 390px;
    height: 675px;
    background-size: 390px 675px;
    transform: scale(var(--mobile-design-scale, 1));
    transform-origin: top left;
  }

  .hero-content {
    inset: 0;
    width: 100%;
  }

  .hero-content .brand-logo {
    position: absolute;
    top: 20px;
    right: 21px;
    width: 96px;
    margin: 0;
  }

  .hero-content h1 {
    position: absolute;
    top: 384px;
    left: 38px;
    margin: 0;
    font-size: 54px;
    line-height: 1.13;
    letter-spacing: -.055em;
    white-space: nowrap;
  }

  .hero-subtitle {
    position: absolute;
    top: 526px;
    left: 38px;
    color: var(--light-brown);
    font-size: 22px;
    line-height: 1.25;
    text-shadow: none;
    white-space: nowrap;
  }

  .hero-caption {
    position: absolute;
    top: 557px;
    left: 38px;
    right: 15px;
    margin: 0;
    color: var(--light-brown);
    font-size: 14px;
    line-height: 1.4;
    white-space: nowrap;
    text-shadow: none;
  }

  .hero-content .brown-button {
    position: absolute;
    bottom: 37px;
    left: 50%;
    transform: translateX(-50%);
    min-width: 106px;
    height: 29px;
    padding: 0 12px;
    font-size: 12px;
  }

  .hero-content .brown-button:hover {
    transform: translateX(-50%) translateY(-2px);
  }

  .hero-product-label {
    font-size: 8px;
    line-height: 1.3;
  }

  .serum-name {
    left: 204px;
    top: 130px;
  }

  .cream-name {
    left: 281px;
    top: 216px;
  }

  .hero-product-line {
    left: 51.5%;
    top: 339px;
    bottom: auto;
    width: 174px;
    font-size: 10px;
    line-height: 1.4;
    text-align: left;
  }

  .hero-product-line b {
    padding: 1px 4px;
  }

  /* 02  肌膚困擾：三張卡片改為直排 */
  .concerns {
    aspect-ratio: auto;
    padding: 54px 18px 64px;
    background-size: cover;
  }

  .concerns-heading,
  .concern-grid {
    position: static;
    width: 100%;
  }

  .concerns-heading h2 {
    font-size: 30px;
    line-height: 1.35;
  }

  .concerns-heading p {
    margin-top: 14px;
    font-size: 18px;
  }

  .concern-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 36px;
  }

  .concern-card {
    min-height: 158px;
    aspect-ratio: auto;
  }

  .concern-card > img {
    width: 40%;
    object-fit: cover;
  }

  .concern-copy {
    width: 60%;
    padding: 17px 12px 15px;
  }

  .problem-label {
    padding: 2px 9px;
    font-size: 11px;
  }

  .concern-copy h3 {
    margin: 7px 0;
    font-size: 14px;
    white-space: normal;
  }

  .concern-copy p {
    font-size: 12px;
    line-height: 1.5;
  }

  /* 03  成分：兩張背景在 440px 交界，金色精華跨越接縫 */
  .ingredients {
    height: auto;
    padding: 60px 22px 48px;
    background: none;
    isolation: isolate;
  }

  .ingredients::before,
  .ingredients::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    z-index: 0;
    background-repeat: no-repeat;
    background-position: center top;
  }

  .ingredients::before {
    top: 0;
    height: 410px;
    background-image: url('images/bg_section2-1-1-mobile.webp');
    background-size: cover;
  }

  .ingredients::after {
    top: 410px;
    bottom: 0;
    background-color: #fff;
    background-image: url('images/bg_section2-1-2-mobile.webp');
    background-size: cover;
  }

  .ingredients-heading,
  .key-ingredient-wrap,
  .ingredient-grid,
  .ingredient-cue {
    position: relative;
    z-index: 1;
    top: auto;
    bottom: auto;
    left: auto;
    transform: none;
  }

  .ingredients-heading {
    width: 100%;
  }

  .ingredients-heading h2 {
    max-width: 100%;
    font-size: 20px;
    line-height: 1.45;
  }

  .ingredients-heading strong {
    font-size: 24px;
    white-space: normal;
  }

  .key-ingredient-wrap {
    width: min(100%, 260px);
    margin: 24px auto 24px;
  }

  .ingredient-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    width: 100%;
  }

  .ingredient-card {
    min-height: 0;
    padding: 0 0 28px;
    margin: 0;
    border: 0;
  }

  .ingredient-kicker {
    width: 54%;
    font-size: 21px;
  }

  .ingredient-card > img {
    right: 5px;
    top: 0;
    width: 114px;
    height: 96px;
  }

  .ingredient-card:nth-child(2) > img {
    right: 20px;
    width: 70px;
  }

  .ingredient-card:nth-child(3) > img {
    right: 16px;
    width: 97px;
  }

  .ingredient-card h3 {
    margin: 32px 0 14px;
    font-size: 27px;
    white-space: normal;
  }

  .ingredient-card p {
    font-size: 15px;
    line-height: 1.65;
    text-align: justify;
  }

  .ingredient-cue {
    display: block;
    margin: 24px auto 0;
  }

  /* 04  臨床實證：照片與文字共用 390 × 675 定位基準 */
  .clinical {
    background-image: url('images/bg_section2-2-mobile.jpg');
  }

  .clinical-copy {
    top: 46px;
    left: 0;
    width: 100%;
    text-align: center;
  }

  .clinical-copy h2 {
    font-size: 33px;
    line-height: 1.35;
    white-space: nowrap;
  }

  .clinical-copy > p {
    margin-top: 8px;
    font-size: 27px;
    line-height: 1.25;
  }

  .clinical-copy > p strong {
    font-size: 31px;
    font-weight: 500;
  }

  .clinical-pills {
    justify-content: center;
    gap: 18px;
    margin-top: 31px;
  }

  .clinical-pills span {
    padding: 3px 8px;
    gap: 3px;
    font-size: 14px;
    line-height: 1.15;
    white-space: nowrap;
  }

  .clinical-pills span:first-child {
    order: 2;
  }

  .clinical-pills span:last-child {
    order: 1;
  }

  .clinical-pills img {
    width: 11px;
    height: 11px;
  }

  .clinical-results {
    left: 69%;
    top: 47.5%;
    font-size: 12px;
  }

  .clinical-results p {
    margin-bottom: 42px;
  }

  .clinical-results strong {
    font-size: 23px;
  }

  .clinical-results small {
    font-size: 11px;
  }

  .face-curve {
    top: -1px;
    right: calc(100% - 10px);
    width: 100%;
    height: 180px;
  }

  /* 05–07  雙步驟與產品卡：以 390px 畫布定位 */
  .routine {
    height: auto;
    background-size: cover;
    padding: 58px 14px 68px;
  }

  .routine-heading {
    position: static;
    padding: 0 16px;
  }

  .routine-heading h2 {
    font-size: 28px;
  }

  .routine-heading h2 span {
    font-size: 45px;
  }

  .routine-heading p {
    margin: 12px auto 0;
    max-width: 340px;
    font-size: 16px;
    line-height: 1.5;
  }

  .benefit-number small {
    font-size: 12px;
  }

  .mobile-card-slot {
    position: relative;
    width: 100%;
    margin-top: 32px;
  }

  .product-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 390px;
    margin: 0;
    display: block;
    background: #fbfcff;
    overflow: hidden;
    transform: scale(var(--mobile-card-scale, 1));
    transform-origin: top left;
  }

  .serum-card {
    height: calc(842px + var(--serum-text-shift, 0px) + var(--mobile-card-tail, 0px));
  }

  .cream-card {
    height: calc(799px + var(--cream-text-shift, 0px) + var(--mobile-card-tail, 0px));
  }

  .product-card .product-main,
  .product-card .product-visual {
    position: static;
    width: 390px;
    height: auto;
    padding: 0;
    overflow: visible;
  }

  .step-label,
  .cream-card .step-label {
    position: absolute;
    top: 34px;
    left: 32px;
    gap: 12px;
    white-space: nowrap;
  }

  .step-label span {
    width: 36px;
    height: 36px;
    font-size: 27px;
    line-height: 1;
    border-width: 1px;
  }

  .step-label b,
  .cream-card .step-label b {
    width: auto;
    max-width: none;
    padding: 5px 9px;
    font-size: 16px;
    line-height: 1.4;
    white-space: nowrap;
  }

  .product-main h3,
  .cream-card .product-main h3 {
    position: absolute;
    top: 85px;
    left: 32px;
    width: 338px;
    margin: 0;
    font-size: 30px;
    line-height: 1.2;
    white-space: nowrap;
  }

  .product-description,
  .cream-card .product-description {
    position: absolute;
    top: 140px;
    left: 32px;
    width: 335px;
    max-width: none;
    padding: 0;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.48;
    text-align: justify;
    border: 0;
  }

  .serum-card .product-description {
    padding-bottom: 15px;
    border-bottom: 1px dotted #9ab1d3;
  }

  .serum-card .safety {
    position: absolute;
    top: calc(226px + var(--serum-text-shift, 0px));
    left: 32px;
    width: 335px;
    height: 54px;
    min-height: 0;
    margin: 0;
    padding: 0;
    align-items: end;
    gap: 4px;
    flex-wrap: nowrap;
    border: 0;
  }

  .serum-card .safety strong {
    font-size: 21px;
    line-height: 1;
  }

  .serum-card .safety strong span {
    font-size: 55px;
    line-height: .9;
  }

  .serum-card .safety > span {
    font-size: 14px;
    white-space: nowrap;
  }

  .serum-card .safety-tags {
    position: absolute;
    top: calc(284px + var(--serum-text-shift, 0px));
    left: 32px;
    width: 335px;
    margin: 5px 0 0;
    flex-wrap: nowrap;
    gap: 7px;
    white-space: nowrap;
  }

  .safety-tags span {
    min-height: 11px;
    padding: 3px 4px;
    gap: 1px;
    font-size: 10px;
    line-height: 1;
  }

  .safety-tags img {
    width: 7px;
    height: 7px;
  }

  .serum-card .product-visual {
    position: absolute;
    top: calc(345px + var(--serum-text-shift, 0px));
    left: 27px;
    width: 340px;
    height: 351px;
    min-height: 0;
    overflow: visible;
  }

  .serum-benefits {
    position: absolute;
    top: 0;
    left: 108px;
    width: 210px;
    gap: 4px;
  }

  .serum-benefit {
    height: 112px;
    padding: 17px 24px 4px 45px;
  }

  .serum-benefit-third {
    padding-top: 37px;
  }

  .serum-benefit .benefit-number {
    font-size: 29px;
  }

  .serum-benefit b {
    font-size: 14px;
  }

  .serum-benefit p {
    font-size: 10px;
  }

  .serum-bottle {
    top: -25px;
    left: -70px;
    width: 280px;
  }

  .serum-card .user-results {
    position: absolute;
    top: calc(725px + var(--serum-text-shift, 0px));
    bottom: auto;
    left: 32px;
    width: 335px;
    height: 105px;
    margin: 0;
    padding: 55px 0 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 0;
    border-top: 1px dotted #9ab1d3;
  }

  .serum-card .user-results .results-caption {
    top: 15px;
    left: 0;
    padding: 2px 7px;
    font-size: 10px;
  }

  .serum-card .user-results > div:not(.results-caption) {
    display: block;
  }

  .serum-card .user-results > div:not(.results-caption) + div {
    padding-left: 20px;
  }

  .user-results strong,
  .cream-card .cream-user-results strong {
    font-size: 26px;
  }

  .user-results strong small {
    font-size: 10px;
  }

  .user-results span {
    margin-top: 3px;
    font-size: 13px;
    white-space: nowrap;
  }

  .cream-card .product-description {
    top: 139px;
    padding-bottom: 28px;
    border-bottom: 1px dotted #9ab1d3;
  }

  .cream-card .product-visual {
    position: absolute;
    top: calc(233px + var(--cream-text-shift, 0px));
    left: 27px;
    width: 340px;
    height: 309px;
    min-height: 0;
    overflow: visible !important;
  }

  .cream-benefits {
    position: absolute;
    top: 20px;
    left: 0;
    width: 340px;
    height: 310px;
    transform: none;
  }

  .cream-curve {
    left: 0;
    width: 340px;
  }

  .cream-benefit {
    left: 4px;
    width: 180px;
  }

  .cream-benefit-second {
    top: 116px;
  }

  .cream-benefit-third {
    top: 221px;
  }

  .cream-benefit-title {
    height: 36px;
    gap: 5px;
  }

  .cream-benefit-title > strong {
    font-size: 32px;
  }

  .cream-benefit-title > strong small {
    font-size: 12px;
  }

  .cream-benefit-title > b {
    font-size: 13px;
  }

  .cream-benefit p {
    font-size: 10px;
  }

  .cream-stats {
    width: 190px;
    margin-top: 12px;
  }

  .cream-stats > div {
    padding: 0 7px;
  }

  .cream-stats strong {
    font-size: 23px;
  }

  .cream-stats strong small,
  .cream-stats span {
    font-size: 11px;
  }

  .cream-jar {
    top: 64px;
    left: 146px;
    width: 195px;
  }

  .cream-card .product-main .cream-user-results {
    position: absolute;
    top: calc(601px + var(--cream-text-shift, 0px));
    bottom: auto;
    left: 32px;
    width: 335px;
    height: 130px;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: end;
    gap: 0;
    border-top: 1px dotted #9ab1d3;
  }

  .cream-card .cream-user-results .results-caption {
    top: 20px;
    left: 0;
    padding: 2px 7px;
    font-size: 10px;
  }

  .cream-model {
    position: absolute;
    top: calc(620px + var(--cream-text-shift, 0px));
    left: 282px;
    bottom: auto;
    width: 77px;
    height: auto;
    margin: 0;
  }

  /* 乳霜底排：數字、說明與人物照片共用 760px 底線。 */
  .cream-card .cream-user-results > div:nth-of-type(2) {
    flex: 0 0 140px;
  }

  .cream-card .cream-user-results > div:nth-of-type(3) {
    flex: 0 0 112px;
    padding-left: 14px;
  }

  /* 08  試用募集 */
  .trial {
    min-height: 760px;
    aspect-ratio: auto;
    background-color: #fff6f0;
    background-size: 100% auto;
    background-image: url('images/bg_section_t-mobile.webp');
  }

  .trial-content .brand-logo {
    top: 30px;
    left: 30px;
    width: 128px;
  }

  .trial-content h2 {
    top: 327px;
    left: 30px;
    width: calc(100% - 50px);
    font-size: 11vw;
    line-height: 1.13;
    white-space: normal;
  }

  .trial-rule {
    top: 440px;
    left: 30px;
    width: calc(100% - 60px);
    font-size: 9px;
  }

  .trial-rule span {
    top: -5px;
    padding-right: 7px;
    background: #fff6f0;
  }

  .trial-content dl {
    top: 465px;
    left: 30px;
    width: calc(100% - 60px);
    font-size: 15px;
    line-height: 1.8;
  }

  .trial-content dl > div,
  .trial-content dl > .trial-product-row {
    display: flex;
    height: auto;
    min-height: 24px;
    align-items: baseline;
    white-space: normal;
  }

  .trial-content dl > .trial-product-row {
    display: block;
    min-height: 49px;
  }

  .trial-product-row dt {
    margin-bottom: 4px;
  }

  .trial-content .trial-product {
    font-size: 15px;
    line-height: 1.3;
    white-space: normal;
  }

  .trial-content .trial-product span {
    margin-left: 4px;
    font-size: 10px;
    white-space: nowrap;
  }

  .trial-content .brown-button {
    top: auto;
    bottom: 24px;
    left: 50%;
    min-width: 140px;
    height: 40px;
    padding: 0 14px;
    font-size: 15px;
    transform: translateX(-50%);
  }

  .trial-content .brown-button:hover {
    transform: translateX(-50%) translateY(-2px);
  }
}

/* 窄手機：僅微調自然排版的臨床與募集區，KV 與產品卡由 JS 等比縮放。 */
@media (max-width: 359px) {
  .clinical-copy h2 {
    font-size: 24px;
  }

  .clinical-pills {
    gap: 8px;
  }

  .clinical-results {
    left: 61%;
    font-size: 11px;
  }

  .clinical-results strong {
    font-size: 19px;
  }

  .trial-content h2 {
    font-size: 31px;
  }

  .trial-content dl {
    font-size: 10px;
  }
}
