/* Desktop keeps the original bitmap and original absolute-positioning context. */
.cyx-mobile-system, .cyx-mobile-nav, .cyx-mobile-detail, .cyx-mobile-closing { display: none; }
.cyx-body-art, .cyx-detail-frame { display: contents; }

@media (max-width: 768px) {
  .cyx-page .cyx-mobile-system {
    display: block;
    position: relative;
    box-sizing: border-box;
    padding: 36px 5% 26px;
    background: #fff;
    color: #292929;
    font-family: Arial, "Microsoft YaHei", sans-serif;
    font-size: 14px;
    line-height: 1.85;
    text-align: center;
    word-break: normal;
    overflow-wrap: break-word;
  }
  /* Reuse only the original upper-edge decoration; no image is edited. */
  .cyx-mobile-system::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 24px;
    background: url('../images/cyx-body-stable.jpg') left top / 100% auto no-repeat;
    pointer-events: none;
  }
  .cyx-system-heading { position: relative; padding: 4px 0; }
  .cyx-system-heading > span {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    background: linear-gradient(180deg,
      #fbfafd 0%,
      #f2eef7 52%,
      #e8e1f0 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    pointer-events: none;
  }
  .cyx-page .cyx-system-heading h2 {
    position: relative;
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.5;
  }
  .cyx-mobile-system p { margin: 0; padding: 0; }
  .cyx-mobile-system .cyx-system-subtitle {
    margin-top: 4px;
    font-weight: 500;
  }
  .cyx-mobile-system .cyx-system-intro { margin-top: 24px; text-wrap: balance; }
  .cyx-system-columns {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 22px;
  }
  .cyx-system-columns > div { position: relative; min-width: 0; }
  .cyx-system-columns > div + div::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -6.5px;
    width: 1px;
    background: #d8d1e3;
    pointer-events: none;
  }
  .cyx-page .cyx-system-columns h3 {
    min-height: 2.8em;
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    text-wrap: balance;
  }
  .cyx-system-columns p { text-wrap: balance; }
  .cyx-page .cyx-mobile-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    box-sizing: border-box;
    padding: 18px 8%;
    background: #aa94b4 url('../images/cyx/mobile-nav-v43/background.webp') center / 100% 100% no-repeat;
    font-family: Arial, "Microsoft YaHei", sans-serif;
    font-size: 16px;
    line-height: 1.2;
  }
  .cyx-mobile-nav > div { position: relative; display: flex; justify-content: center; }
  .cyx-mobile-nav > div + div::before {
    content: "";
    position: absolute;
    top: 50%;
    left: -0.5px;
    width: 1px;
    height: 32px;
    background: rgba(255, 255, 255, 0.65);
    transform: translateY(-50%);
    pointer-events: none;
  }
  .cyx-page .cyx-mobile-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: clamp(64px, 18vw, 80px);
    aspect-ratio: 1;
    border-radius: 50%;
    background: url('../images/cyx/mobile-nav-v43/ring.webp') center / 100% 100% no-repeat;
    color: #795493;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    touch-action: manipulation;
  }
  .cyx-page .cyx-mobile-nav a:focus-visible { outline: 2px solid #795493; outline-offset: 3px; }
  .cyx-page .cyx-button-area { display: none; }
  .cyx-page .cyx-detail-frame { display: block; position: relative; }
  .cyx-page .cyx-detail-frame > .cyx-anchor { top: 30px; }
  .cyx-page .cyx-mobile-detail {
    display: block;
    container-type: inline-size;
    box-sizing: border-box;
    padding: 30px 0 32px;
    background: #fff var(--cyx-detail-background) center / 100% 100% no-repeat;
    color: #000;
    font-family: Arial, "Microsoft YaHei", sans-serif;
    text-align: center;
  }
  /* Original artwork uses 2x PSB text on a 3838px-wide canvas. Detection and
     transplantation add 6px; health/nutrition independently add 4px. */
  .cyx-page .cyx-mobile-detail h2 {
    margin: 0;
    font-size: calc(2.37969255cqw + var(--cyx-font-increase, 6px));
    font-weight: 700;
    line-height: 1.4;
  }
  .cyx-page .cyx-detail-subtitle {
    margin: 3px 0 0;
    font-size: calc(1.08563314cqw + var(--cyx-font-increase, 6px));
    line-height: 1.4;
  }
  .cyx-page .cyx-detail-product {
    display: block;
    width: var(--cyx-product-width);
    height: auto;
    max-width: none;
    margin: 20px 0 22px var(--cyx-product-left);
    object-fit: contain;
  }
  .cyx-detail-copy { width: 84%; margin: 0 auto; }
  .cyx-page .cyx-detail-copy h3 {
    margin: 0 0 10px;
    color: #714f9d;
    font-size: calc(1.73701407cqw + var(--cyx-font-increase, 6px));
    font-weight: 400;
    line-height: 1.5;
  }
  .cyx-page .cyx-detail-copy p {
    margin: 0;
    font-size: calc(1.30276186cqw + var(--cyx-font-increase, 6px));
    font-weight: 400;
    line-height: 1.85;
    word-break: normal;
    overflow-wrap: break-word;
    text-wrap: balance;
  }
  /* Keep clauses together, but let adjacent clauses share a line when they fit.
     Only sentence endings force a new line. Oversized clauses wrap by words. */
  .cyx-page .cyx-detail-copy p { text-wrap: wrap; }
  .cyx-detail-copy p > span { display: inline; }
  .cyx-detail-copy p > .cyx-copy-sentence { display: block; }
  .cyx-copy-clause {
    display: inline-block;
    max-width: 100%;
    vertical-align: top;
    text-wrap: balance;
  }
  .cyx-copy-word { display: inline-block; }
  .cyx-page .cyx-detail-copy p + h3 { margin-top: 24px; }
  .cyx-page .cyx-health-columns {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 18px;
    width: 90%;
    margin-top: 28px;
    align-items: start;
  }
  .cyx-health-columns > div { min-width: 0; }
  /* Embedded PDF: 12pt/14pt at 150dpi correspond to 25px/29.1667px in PSB. */
  .cyx-page .cyx-health-columns h4 {
    margin: 0 0 12px;
    font-size: calc(1.51988883cqw + 4px);
    font-weight: 700;
    line-height: 1.5;
  }
  .cyx-page .cyx-health-matrix h5 {
    box-sizing: border-box;
    margin: 0 0 4px;
    padding: 4px 6px;
    border-radius: 30px;
    background: #714f9d;
    color: #fff;
    font-size: calc(1.30276186cqw + 4px);
    font-weight: 700;
    line-height: 1.5;
    overflow-wrap: break-word;
    text-wrap: balance;
  }
  .cyx-health-matrix > div + div { margin-top: 10px; }
  .cyx-page .cyx-health-count {
    margin: 0 0 18px;
    font-size: calc(1.51988883cqw + 4px);
    line-height: 1.5;
  }
  .cyx-health-count > span { display: block; }
  .cyx-page .cyx-health-count strong {
    display: block;
    color: #714f9d;
    font-size: calc(2.83192044cqw + 4px);
    font-weight: 700;
    line-height: 1.2;
  }
  /* The original full bitmap remains desktop-only; all mobile sections are live. */
  .cyx-page .cyx-body-art { display: none; }
  .cyx-page .cyx-mobile-closing {
    --cyx-font-increase: 4px;
    display: block;
    container-type: inline-size;
    box-sizing: border-box;
    margin-top: 10.99531006vw;
    padding: 28px 0;
    background: #714f9d url('../images/cyx/mobile-closing-v49/closing-background.webp') center / 100% 100% no-repeat;
    color: #fff;
    font-family: Arial, "Microsoft YaHei", sans-serif;
    text-align: center;
  }
  .cyx-page .cyx-mobile-closing p + p { margin-top: 22px; }
}
