/* Shared phone layout. Loaded after page styles; desktop artwork is unchanged. */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (max-width: 992px) {
  /* One mobile header for every page, using the home page as the reference. */
  body.hero-lab-v2 #header {
    width: 100%;
    max-width: none;
    height: auto;
    margin: 8px 0 0;
    padding: 12px 20px 0;
  }
  body.hero-lab-v2 #header .header__pill {
    width: 100%;
    max-width: none;
    border: 0;
    border-radius: 20px 20px 0 0;
    background: linear-gradient(180deg, #fff8f0 0%, #fef6ea 48%, #fdf4e4 100%);
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    overflow: visible;
    isolation: auto;
  }
  body.hero-lab-v2 #header .header__pill::after { display: none; }
  body.hero-lab-v2 #header .header__pill > * { position: relative; z-index: 1; }
  body.hero-lab-v2 .header__burger { display: flex !important; }
  body.hero-lab-v2 .header__actions { gap: 12px; }
}

@media (max-width: 700px) {
  body { background-attachment: scroll; }
  input, textarea, select { max-width: 100%; }
  input:not([type="checkbox"]):not([type="radio"]), textarea, select { font-size: 16px; }
  body.hero-lab-v2 #header { padding-inline: 16px; }
  body.hero-lab-v2 #header .header__pill { border-radius: 18px 18px 0 0; }
  body.hero-lab-v2 .header__pill {
    display: grid;
    height: auto !important;
    min-height: 72px;
    padding-block: 10px !important;
    grid-template-columns: minmax(0, 1fr) 45px;
    column-gap: 12px;
    row-gap: 7px;
  }
  body.hero-lab-v2 .header__logo-block { grid-column: 1; grid-row: 1; margin: 0; }
  body.hero-lab-v2 .header__actions { display: contents; }
  body.hero-lab-v2 .header__phone-block { grid-column: 1; grid-row: 2; align-items: flex-start; }
  body.hero-lab-v2 .header__phone-row { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; gap: 4px 12px; }
  body.hero-lab-v2 .header__phone { font-size: 12px; }
  body.hero-lab-v2 .header__burger { grid-column: 2; grid-row: 1 / 3; align-self: center; }

  body.hero-lab-v2.home-page .hero.hero--image-only {
    min-height: 0;
    height: auto;
    aspect-ratio: auto;
  }
  body.hero-lab-v2.home-page .hero__art {
    height: clamp(290px, 88vw, 380px);
    object-fit: cover;
    object-position: center 40%;
  }
  body.hero-lab-v2.home-page .catalog--directory { padding-top: 22px; }
  body.hero-lab-v2.home-page .catalog-directory__heading { margin-bottom: 18px; }
  body.hero-lab-v2.home-page .catalog-directory__title { font-size: clamp(26px, 7.4vw, 32px); }
  body.hero-lab-v2.home-page .catalog-directory,
  body.hero-lab-v2.home-page .catalog-directory__urology-grid,
  body.hero-lab-v2.home-page .catalog-directory__secondary-grid { gap: 14px; }
  body.hero-lab-v2.home-page .catalog-cluster,
  body.hero-lab-v2.home-page .catalog-category {
    min-height: 0;
    border-radius: 18px;
  }
  body.hero-lab-v2.home-page .catalog-cluster__body,
  body.hero-lab-v2.home-page .catalog-category__body {
    width: 72%;
    min-height: clamp(210px, 56vw, 260px);
    padding: 18px 16px;
    background: linear-gradient(90deg, rgba(255,255,255,.72), rgba(255,255,255,0));
  }
  body.hero-lab-v2.home-page .catalog-cluster--children .catalog-cluster__body,
  body.hero-lab-v2.home-page .catalog-category--supplements .catalog-category__body {
    width: 76%;
    min-height: 280px;
  }
  body.hero-lab-v2.home-page .catalog-cluster__title,
  body.hero-lab-v2.home-page .catalog-category__title {
    font-size: clamp(21px, 5.8vw, 25px);
    line-height: 1.12;
    margin-bottom: 12px;
    padding-bottom: 10px;
  }
  body.hero-lab-v2.home-page .catalog-directory__links { gap: 8px; }
  body.hero-lab-v2.home-page .catalog-directory__link {
    min-height: 44px;
    font-size: 14px;
    line-height: 1.2;
    padding: 5px 6px 5px 10px;
  }

  /* Decorative hero images get their own short area below the copy. */
  body.inner-page .ab-hero,
  body.inner-page .ar-hero,
  body.inner-page .ar-article-hero,
  body.inner-page .ct-hero,
  body.inner-page .rq-hero {
    min-height: 0;
    height: auto;
    aspect-ratio: auto;
    padding: 24px 20px calc(clamp(160px, 48vw, 230px) + 24px);
  }
  body.inner-page .ab-hero__image,
  body.inner-page .ar-hero__image,
  body.inner-page .ar-article-hero__image,
  body.inner-page .ct-hero__image,
  body.inner-page .rq-hero__image {
    inset: auto 0 0;
    width: 100%;
    height: clamp(160px, 48vw, 230px);
    object-position: center;
  }
  body.inner-page .ab-hero__veil,
  body.inner-page .ar-hero__veil,
  body.inner-page .ar-article-hero__veil,
  body.inner-page .rq-hero__veil { display: none; }
  body.inner-page .ct-hero__veil {
    inset: auto 0 0;
    height: clamp(160px, 48vw, 230px);
    background: linear-gradient(180deg, #092f5b, transparent 50%);
  }
  body.inner-page :is(.ab-hero__copy, .ar-hero__copy, .ar-article-hero__copy, .ct-hero__copy, .rq-hero__copy) {
    width: 100%;
  }
  body.inner-page :is(.ab-hero, .ar-hero, .ar-article-hero, .ct-hero, .rq-hero, .sv-hero) :is(.ab-breadcrumb, .sv-breadcrumb) {
    margin-bottom: 20px;
    flex-wrap: wrap;
  }
  body.inner-page :is(.ab-hero__lead, .ct-hero__lead, .rq-hero__lead) { margin-top: 16px; }
  body.inner-page :is(.ab-hero__actions, .ct-hero__actions, .rq-hero__actions) { margin-top: 20px; }
  body.inner-page .ab-hero__facts { margin-top: 20px; gap: 8px; }
  body.inner-page .ab-hero__facts span { min-height: 0; padding: 12px; }

  body.inner-page .sv-hero {
    min-height: 0;
    padding-bottom: calc(clamp(190px, 56vw, 260px) + 24px);
  }
  body.inner-page .sv-hero__image {
    height: clamp(190px, 56vw, 260px);
    inset: auto 0 0;
    object-position: center;
  }

  body .ab-overview__visual,
  body.professionals-page .pr-partnership .ab-overview__visual,
  body .pt-diary__visual,
  body.home-page .about__visual-main {
    height: clamp(240px, 70vw, 320px);
    min-height: 0;
  }
  body .ab-overview__visual > img,
  body .pt-diary__visual > img,
  body.home-page .about__visual-main > img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
  body .ab-documentation__visual { min-height: 0; height: clamp(200px, 60vw, 280px); }
  body .service-detail__image { min-height: 0; height: 240px; }
  body .service-detail__image img { max-height: 220px; width: auto; max-width: 100%; object-fit: contain; margin: auto; }
  body.home-page .testi-google__image { flex: none; min-height: 0; height: clamp(220px, 62vw, 280px); }
  body.hyacyst-page .hy-product-stage {
    min-height: 0;
    height: 350px;
  }
  body.hyacyst-page .hy-product-stage > img {
    width: 92%;
    max-width: 100%;
    max-height: 220px;
    object-fit: contain;
    bottom: 125px;
    animation: none;
    transform: translateX(-50%);
  }
  body.sensovisc-page .sv-mechanism__visual { aspect-ratio: auto; height: 300px; }
  body.sensovisc-page .sv-mechanism__visual img { object-fit: contain; }
  body.hyacyst-page .hy-specs__product { min-height: 300px; }
  body.hyacyst-page .hy-specs__product img { width: 90%; max-width: 100%; max-height: 220px; object-fit: contain; transform: none; }
  body .pt-products__grid { grid-auto-rows: auto; }
  body .pt-product-card { min-height: 280px; }
  body .pt-product-card__content { padding: 20px; }
  body .pt-product-card > img { height: 100%; object-fit: cover; }

  .cookie-panel {
    bottom: max(8px, env(safe-area-inset-bottom));
    width: calc(100% - 16px);
    border-radius: 16px;
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
  }
  .cookie-panel__body { gap: 10px; padding: 12px 14px 12px 17px; }
  .cookie-panel h2 { font-size: 18px; line-height: 1.2; margin-bottom: 4px; }
  .cookie-panel p { font-size: 14px; line-height: 1.4; }
  .cookie-panel__button { min-height: 44px; }
}

@media (max-width: 359px) {
  body.hero-lab-v2.home-page .catalog-cluster__body,
  body.hero-lab-v2.home-page .catalog-category__body { width: 82%; }
  body.hero-lab-v2.home-page .catalog-cluster--children .catalog-cluster__body,
  body.hero-lab-v2.home-page .catalog-category--supplements .catalog-category__body { width: 86%; }
}
