/**
 * モバイル Peek カルーセル（改修モック専用・本番非反映）
 * 複数カードを縦積みせず、右端チラ見せの横スクロールにする
 */

@media (max-width: 991px) {
  .peek-carousel-wrap {
    position: relative;
    margin-bottom: 8px;
  }

  .peek-carousel-hint {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    margin: 0 0 10px;
    padding: 0 2px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--primary-600, #1491DB);
  }

  .peek-carousel-hint::after {
    content: "";
    display: inline-block;
    width: 18px;
    height: 10px;
    background:
      linear-gradient(90deg, transparent 0%, var(--primary-400, #4DB8F5) 40%, var(--primary-500, #18A3F2) 100%);
    border-radius: 2px;
    clip-path: polygon(0 20%, 65% 20%, 65% 0, 100% 50%, 65% 100%, 65% 80%, 0 80%);
    opacity: 0.9;
  }

  .peek-carousel.peek-carousel {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: stretch;
    gap: 12px;
    max-width: none !important;
    width: calc(100% + 16px);
    margin-left: 0;
    margin-right: -16px;
    margin-bottom: 12px;
    padding: 4px 16px 12px 0;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 0;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    grid-template-columns: none !important;
  }

  .peek-carousel.peek-carousel::-webkit-scrollbar {
    display: none;
  }

  /* 右端フェードで「続きあり」を示唆 */
  .peek-carousel-wrap::after {
    content: "";
    position: absolute;
    top: 28px;
    right: 0;
    bottom: 36px;
    width: 28px;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.92));
    z-index: 2;
    opacity: 1;
    transition: opacity 0.2s;
  }

  .section-primary-light .peek-carousel-wrap::after {
    background: linear-gradient(90deg, rgba(244, 250, 255, 0), rgba(244, 250, 255, 0.95));
  }

  .peek-carousel-wrap.is-at-end::after {
    opacity: 0;
  }

  .peek-carousel.peek-carousel>* {
    flex: 0 0 78%;
    width: 78%;
    max-width: 78%;
    min-width: 0;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    box-sizing: border-box;
  }

  /* 臨床フローの矢印は非表示（カードのみ横スクロール） */
  .peek-carousel .clinical-use-arrow {
    display: none !important;
  }

  .peek-carousel .clinical-use-step--visual,
  .peek-carousel .clinical-use-step {
    max-width: none !important;
  }

  /* 価値ブロックは少し広め（情報量が多いため） */
  .value-props-list.peek-carousel>.value-prop-block {
    flex-basis: 86%;
    width: 86%;
    max-width: 86%;
  }

  .peek-carousel-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 4px 0 8px;
    min-height: 12px;
  }

  .peek-carousel-dot {
    width: 7px;
    height: 7px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--neutral-300, #D1D5DB);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
  }

  .peek-carousel-dot.is-active {
    background: var(--primary-500, #18A3F2);
    transform: scale(1.2);
  }

  .peek-carousel-dot:focus-visible {
    outline: 2px solid var(--primary-500, #18A3F2);
    outline-offset: 2px;
  }
}

/* PCではヒント・ドットを出さない（JS注入分の保険） */
@media (min-width: 992px) {

  .peek-carousel-hint,
  .peek-carousel-dots,
  .peek-carousel-wrap::after {
    display: none !important;
  }
}

/* ============================================================
   WEB版確定内容のモバイル最適化（改修モック専用）
   ============================================================ */
@media (max-width: 991px) {

  /* FVキャッチ */
  .med-hero .med-hero-catch,
  .med-hero .med-hero-inner h4 {
    font-size: 28px !important;
    line-height: 1.4 !important;
    letter-spacing: 0.04em;
    margin: 16px auto 12px !important;
  }

  /* FV説明：意図した2行を維持 */
  .med-hero .med-hero-inner .med-hero-description,
  .med-hero .med-hero-description {
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.65 !important;
    max-width: 100% !important;
    padding: 0 4px;
  }

  .med-hero .med-hero-description .med-hero-description-line {
    display: block !important;
    white-space: normal !important;
  }

  .med-hero-notes {
    font-size: 13px !important;
    max-width: 100%;
    padding: 0 8px !important;
    text-align: left;
  }

  .med-hero-keypoints {
    justify-content: center;
    flex-wrap: wrap;
  }

  /* 臨床活用：解析タグ・注記 */
  .clinical-use-step--visual {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .clinical-use-step--visual p {
    font-size: 13px;
  }

  .clinical-product-tag {
    margin-top: 8px;
    font-size: 10px;
    padding: 3px 8px;
    max-width: 100%;
  }

  .clinical-use-note {
    font-size: calc(15px - 3pt) !important;
    padding: 0 2px;
  }

  /* 導入のメリット：横スクロール示唆 */
  .comparison-table-wrap {
    position: relative;
    margin-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }

  .comparison-table-wrap::before {
    content: "表は横にスワイプして比較";
    display: block;
    text-align: right;
    font-size: 12px;
    font-weight: 700;
    color: var(--primary-600, #1491DB);
    margin-bottom: 8px;
  }

  .comparison-summary {
    margin-top: 16px;
  }

  #comparison .section-lead {
    margin-bottom: 20px;
    font-size: 14px;
    padding: 0 4px;
  }

  /* ABOUT注記 */
  .about-intro-content .about-trust-note,
  .about-trust-note {
    font-size: 13px;
  }
}

@media (max-width: 640px) {

  .med-hero .med-hero-catch,
  .med-hero .med-hero-inner h4 {
    font-size: 24px !important;
  }

  .med-hero .med-hero-inner .med-hero-description,
  .med-hero .med-hero-description {
    font-size: 14px !important;
  }
}

/* ==========================================================================
   臨床での活用イメージ（clinical-use）専用スライダー構造
   ========================================================================== */

/* PC表示（デフォルト） */
.clinical-flow-slider {
  display: flex;
  align-items: stretch;
  gap: 16px;
  margin-bottom: 24px;
}

.clinical-flow-card {
  flex: 1;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 20px;
  box-sizing: border-box;
}

/* モバイル・タブレット表示（991px以下） */
@media (max-width: 991px) {
  .clinical-flow-slider-wrap {
    position: relative;
    width: 100%;
    margin-bottom: 16px;
  }

  /* 右端フェード（「続きがある」ことを示唆） */
  .clinical-flow-slider-wrap::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 24px;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.95));
    z-index: 2;
  }

  .clinical-flow-slider {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: stretch;
    gap: 12px;
    width: calc(100% + 32px) !important;
    margin-left: -16px !important;
    margin-right: -16px !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
    padding-top: 4px;
    padding-bottom: 12px;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    /* Firefoxスクロールバー非表示 */
  }

  .clinical-flow-slider::-webkit-scrollbar {
    display: none;
    /* Chrome/Safariスクロールバー非表示 */
  }

  /* カード1枚ずつの幅設定（78%表示で右端のカードをチラ見せ） */
  .clinical-flow-card {
    flex: 0 0 78% !important;
    width: 78% !important;
    max-width: 78% !important;
    min-width: 0 !important;
    scroll-snap-align: start !important;
    scroll-snap-stop: always !important;
    box-sizing: border-box !important;
  }

  /* 1番目のカード（01 撮影）の配置位置を左端に絶対固定 */
  .clinical-flow-card:first-child {
    margin-left: 0 !important;
    scroll-margin-left: 16px !important;
  }
}


/* --- 臨床フロー専用 ドットインジケーター（スタイル優先度強化版） --- */
@media (max-width: 991px) {
  .clinical-flow-dots {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 8px !important;
    margin-top: 12px !important;
    margin-bottom: 8px !important;
    min-height: 12px !important;
  }

  .clinical-flow-dots .clinical-flow-dot {
    display: block !important;
    width: 7px !important;
    height: 7px !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 50% !important;
    background-color: var(--neutral-300, #D1D5DB) !important;
    cursor: pointer !important;
    text-decoration: none !important;
    transition: background-color 0.2s ease, transform 0.2s ease !important;
    box-sizing: border-box !important;
  }

  /* 青色アクティブ状態（詳細度を高めて背景色を青に強制指定） */
  .clinical-flow-dots .clinical-flow-dot.is-active,
  a.clinical-flow-dot.is-active {
    background-color: var(--primary-500, #18A3F2) !important;
    background: #18A3F2 !important;
    transform: scale(1.25) !important;
  }
}