/* =========================================================
   積水メディカル 拡大新生児スクリーニング検査 スポンサーページ
   静的ページ（ビルド不要 / 外部フォント・CDN非依存）
   Figma フレーム 414×2638 を実アセットで忠実に再現する。
   見出し・タイトル・ロゴ・イラストは Figma 書き出し画像を使用し、
   本文のみアクセシビリティのため実テキストで再現する。
   ========================================================= */

:root {
  /* Figma スクリーンショットから採取した実測カラー */
  --teal:        #009fb4;   /* ヒーロー本文・プラス（実測 #009fb4） */
  --teal-light:  #33b2c3;   /* 下部の相談導線テキスト */
  --teal-deep:   #0b8ba3;   /* 「20疾患」テキスト */
  --teal-card:   #7cc2cd;   /* 拡大検査カードの背景（実測 #7cc2cd） */
  --pale-blue:   #ebf6f8;   /* セクション1背景（実測 #ebf6f8） */
  --pill-blue:   #d4ecf0;   /* 「20疾患」ピル背景（実測 #d4ecf0） */
  --ivory:       #fffcdb;   /* 疾患チップ背景（実測 #fffcdb） */
  --cream:       #f5f2e9;   /* クリーム色ブロブ（SVGに内包・実測 #f5f2e9） */
  --ink:         #1a1a1a;   /* セクション本文（実測 ≒ #171818） */
  --ink-soft:    #2a2f30;   /* 図解キャプション */
  --blue-cta:    #004ea2;   /* CTA枠線・テキスト（実測 #004ea2） */
  --highlight:   #fff462;   /* 蛍光マーカー（実測 #fff462） */
  --frame-w:     414px;     /* Figma フレーム幅 */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Hiragino Sans',
    'Hiragino Kaku Gothic ProN', 'Yu Gothic', Meiryo, sans-serif;
  color: var(--ink);
  background: #e6eef0;              /* 414px フレーム外側（広い画面でのみ見える） */
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* モバイルは全幅。768px以上では後段で1024pxを上限に中央配置する。 */
.frame {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  background: #fff;
  position: relative;
  overflow-x: hidden;              /* バッジ等の食み出しをフレーム内に収める */
}

/* フレーム内の画像は既定でカラム幅に追従（狭い画面での横溢れ防止） */
.frame img {
  max-width: 100%;
  height: auto;
}

/* ===== ロゴヘッダー（Figma: logo 1 / node 495:6 / 212×35 @ x13 y16） ===== */
.logo-bar {
  padding: 16px 0 9px 13px;
  background: #fff;
}

.logo {
  display: block;
  width: 212px;
  height: 35px;
}

/* ===== グリッド帯（Figma: tile / 26px 周期の水色タイルを反復） ===== */
.grid-strip {
  height: 52px;                    /* タイル2段（26px×2）実測 y60-112 / y2586-2637 */
  background-image: url('./assets/tile.png');
  background-repeat: repeat;
  background-size: 26px 26px;
}

/* ===== ヒーロー（Figma: タイトル_一部加工 / node 495:16 / 402×167） ===== */
.hero {
  padding: 2px 6px 38px;
  text-align: center;
  background: #fff;
}

/* ピル＋タイトル＋赤ちゃん＋メールを内包した1枚の書き出し画像 */
.hero-title {
  display: block;
  width: 402px;
  margin: 0 auto;
}

.hero-body {
  margin-top: 25px;
  color: var(--teal);
  font-size: 16px;
  font-weight: 500;
  line-height: 28px;
}

.hero-body p + p {
  margin-top: 20px;
}

/* 音声ボタン */
.audio-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 174px;
  min-height: 44px;
  margin-top: 26px;
  /* Figma node 18:363: 水平グラデ（左→右）＋ドロップシャドウ＋インナーシャドウ */
  background: linear-gradient(90deg, #75d9d6 0%, #2ec7c9 100%);
  color: #fff;
  border: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 11px 26px;
  border-radius: 999px;
  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.25), inset 0 0 8px #54c6c6;
  cursor: pointer;
  transition: background-color 180ms ease-out, box-shadow 180ms ease-out,
    transform 180ms ease-out;
}

.audio-btn.is-playing {
  background: #079ead;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.22), inset 0 0 8px #078d9a;
}

.audio-btn:active {
  transform: translateY(1px);
}

.audio-btn:focus-visible,
.cta:focus-visible {
  outline: 3px solid #f4c542;
  outline-offset: 3px;
}

.audio-btn:disabled {
  background: #9aa5a7;
  box-shadow: none;
  cursor: not-allowed;
}

.audio-btn .speaker {
  width: 22px;
  height: 15px;
  display: block;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== セクション共通 ===== */
.sec-heading {
  display: block;
  margin: 0 auto;
}

.body-text {
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
  line-height: 28px;
  text-align: justify;
}

/* ===== セクション1：新生児スクリーニング検査って？（淡い水色帯） ===== */
.sec-diagram {
  padding: 26px 6px 15px;
  background: var(--pale-blue);
  text-align: center;
}

.heading-screening { width: 337px; }

.sec-diagram .body-text {
  width: 326px;
  max-width: 100%;
  margin: 16px auto 0;
  line-height: 26px;
  color: rgba(0, 0, 0, 0.9);
}

.diagram-paragraph {
  display: inline;
}

/* --- 図解（マス検査 → ＋ → 拡大検査、縦積み） --- */
.diagram {
  max-width: 350px;
  margin: 9px auto 0;
}

/* 白カード（新生児マススクリーニング検査 / 20疾患） */
.card-white {
  width: 210px;
  max-width: 100%;
  margin: 0 auto;
  background: #fff;
  border: 2px solid #c9caca;
  border-radius: 8px;
  padding: 12px 20px;
}

.heading-mass { width: 166px; }

.count-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 116px;
  height: 68px;
  margin: 8px auto 0;
  background: var(--pill-blue);
  color: #000;
  font-size: 19px;
  font-weight: 800;
  line-height: 25px;
  border-radius: 8px;
}

.cap {
  font-size: 16px;
  line-height: 26px;
  color: var(--ink-soft);
  text-align: center;
}

.cap-white {
  width: 286px;
  max-width: 100%;
  margin: 5px auto 0;
}

/* ＋（Figma: node 27:45 / plus-shadow=ティール, plus=白 の2層） */
.plus-row {
  position: relative;
  margin-top: 18px;
  height: 53px;
}

.plus {
  position: relative;
  width: 53px;
  height: 53px;
  margin: 0 auto;
}

.plus .plus-shadow,
.plus .plus-front {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: block;
  max-width: none;
}

.plus .plus-shadow { width: 79.5px; height: 79.5px; }
.plus .plus-front  { width: 65.6px; height: 65.6px; }

/* ティールカード（拡大新生児スクリーニング検査 / 疾患チップ） */
.card-teal {
  position: relative;
  width: 100%;
  max-width: 350px;
  margin: 20px auto 0;
  background: #82cdd8;
  border: 2px solid #949495;
  border-radius: 8px;
  padding: 9px 39px 8px;
}

/* オレンジバッジ「追加の検査」（node 495:22 / 82.67×94、カード右肩に重ねる） */
.badge {
  position: absolute;
  top: -64px;
  right: 8px;
  width: 82.667px;
  height: 94px;
}

.heading-expanded { width: 190px; }

.chips {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px 8px;
  margin-top: 6px;
}

.chip {
  background: var(--ivory);
  color: #111;
  font-size: 16px;
  font-weight: 700;
  line-height: 20px;
  min-height: 46px;
  border-radius: 8px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nado {
  position: absolute;
  right: 10px;
  bottom: 10px;
  color: #000;
  font-size: 13px;
  line-height: 20px;
  font-weight: 700;
}

.cap-teal {
  width: 294px;
  max-width: 100%;
  margin: 7px auto 0;
}

/* 蛍光マーカー（検査を希望される赤ちゃん） */
.hl {
  background: linear-gradient(var(--highlight), var(--highlight)) left bottom / 100% 6px no-repeat;
  font-weight: 700;
  color: var(--teal);
}

/* ===== セクション2・3：クリーム色ブロブ（SVG背景） ===== */
.sec-blob {
  position: relative;
  background-color: #fff;
  background-repeat: no-repeat;
  background-position: center;
  text-align: center;
}

.sec-how {
  /* 上余白 71px: 見出し天地を Figma node 496:12 に合わせる（旧 32px は過小） */
  padding: 71px 24px 24px;
  background-image: url('./assets/blob-how.svg');
  background-size: 350px 346px;
}

.sec-recheck {
  padding: 28px 24px 22px;
  background-image: url('./assets/blob-recheck.svg');
  background-size: 350px 388px;
}

.heading-how { width: 233px; }
.heading-recheck { width: 268px; }

/* 見出し直下の波線（Figma: heading-wave.svg / 270×2、見出しから約9px下・中央） */
.heading-wave {
  display: block;
  width: 270px;
  margin: 9px auto 0;
}

.sec-blob .body-text {
  max-width: 292px;
  margin: 8px auto 0;
}

.note {
  max-width: 292px;
  margin: 10px auto 0;
  font-size: 12px;
  line-height: 1.7;
  color: #4a4f50;
  text-align: center;
}

/* 血液滴＋「かかとからちょっとだけ採血」を内包した書き出し画像 */
.blood {
  display: block;
  width: 132px;
  margin: 16px auto 0;
}

/* 病院アイコン（node 495:15 / 73×57） */
.hospital {
  display: block;
  width: 73px;
  margin: 14px auto 0;
}

/* ===== 下部：相談導線とCTA ===== */
.closing {
  padding: 22px 24px 18px;
  text-align: center;
  background: #fff;
}

.closing-lead {
  max-width: 262px;
  margin: 0 auto;
  color: var(--teal-light);
  font-size: 15px;
  font-weight: 700;
  line-height: 26px;
}

.cta {
  display: block;
  max-width: 366px;
  margin: 24px auto 0;
  border: 2px solid var(--blue-cta);
  background: #fff;
  color: var(--blue-cta);
  text-decoration: none;
  font-weight: 800;
  padding: 14px 10px;
  border-radius: 46px;
  text-align: center;
}

.cta-eyebrow,
.cta-main {
  display: block;
}

.cta-eyebrow {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
}

.cta-main {
  font-size: 13px;
  line-height: 1.65;
}

/* ===== モバイル（〜767px）：PC用レイアウトを残さず縦積みに固定 ===== */
@media (max-width: 767px) {
  br.mobile-only {
    display: inline;
  }

  .diagram {
    display: block;
    width: auto;
  }

  .card-white {
    width: 210px;
  }

  .card-teal {
    width: 100%;
  }
}

/* ===== 特に狭い画面（〜374px）：可読性を保ちつつ横溢れを抑える ===== */
@media (max-width: 374px) {
  .diagram { max-width: 100%; }
  .card-teal { max-width: 100%; }
  .badge { right: 0; }

  .hero-body {
    font-size: clamp(14px, 3.865vw, 16px);
    line-height: clamp(24px, 6.763vw, 28px);
  }

  .body-text,
  .cap,
  .chip {
    font-size: clamp(14px, 3.865vw, 16px);
  }

  .body-text,
  .cap {
    line-height: clamp(23px, 6.28vw, 26px);
  }
}

/* =========================================================
   PCレイアウト（Figma: 1024×2029 / node 501:6）
   768px以上では固定幅のモバイルカラムを引き伸ばさず、Figmaの
   横長ヒーロー・横並び図解・横長説明ブロックへ切り替える。
   ========================================================= */
@media (min-width: 768px) {
  :root {
    --frame-w: 1024px;
  }

  .frame {
    max-width: var(--frame-w);
  }

  .logo-bar {
    padding: 16px 0 9px 18px;
  }

  .mobile-only {
    display: none;
  }

  /* 112–721px: 横長のPC用ヒーロー */
  .hero {
    padding: 6px 24px 37px;
  }

  .frame .hero-title {
    width: 701px;
    height: 290px;
  }

  .hero-body {
    width: 773px;
    max-width: 100%;
    margin: 5px auto 0;
    font-size: 16px;
    font-weight: 500;
    line-height: 28px;
  }

  .hero-body p + p {
    margin-top: 28px;
  }

  .audio-btn {
    width: 242px;
    min-width: 242px;
    height: 44px;
    min-height: 44px;
    margin-top: 31px;
    padding: 0 26px;
    line-height: 20px;
  }

  /* 721–1185px: 説明文と2つの検査カードを横並びにする */
  .sec-diagram {
    min-height: 464px;
    padding: 21px 0 28px;
  }

  .heading-screening {
    width: 390px;
  }

  .sec-diagram .body-text {
    width: 718px;
    margin-top: 14px;
    font-weight: 400;
    line-height: 26px;
    text-align: left;
  }

  .diagram-paragraph {
    display: block;
  }

  .diagram {
    position: relative;
    left: -4px;
    display: grid;
    grid-template-columns: 210px 109px 350px;
    grid-template-rows: minmax(174px, auto) auto;
    width: 669px;
    max-width: calc(100% - 48px);
    margin: 36px auto 0;
  }

  .card-white {
    grid-column: 1;
    grid-row: 1;
    width: 210px;
    min-height: 174px;
    margin: 0;
    padding: 12px 20px;
  }

  .card-white .count-badge {
    margin-top: 24px;
    font-weight: 400;
  }

  .cap-white {
    grid-column: 1;
    grid-row: 2;
    align-self: start;
    justify-self: center;
    width: 286px;
    max-width: none;
    margin: 5px 0 0;
  }

  .plus-row {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 174px;
    margin: 0;
  }

  .plus {
    margin: 0;
  }

  .card-teal {
    grid-column: 3;
    grid-row: 1;
    width: 350px;
    min-height: 174px;
    margin: 0;
  }

  .heading-expanded {
    filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.5));
  }

  .chip,
  .nado {
    font-weight: 400;
  }

  .badge {
    top: -41px;
    right: -18px;
  }

  .cap-teal {
    grid-column: 3;
    grid-row: 2;
    align-self: start;
    justify-self: center;
    width: 294px;
    margin: 5px 0 0;
  }

  /* 1185–1818px: PC用の横長ブロブ内に本文と図版を配置 */
  .sec-how {
    min-height: 327px;
    padding: 62px 24px 0;
    background-image: url('./assets/blob-how-desktop.svg');
    background-position: center 24px;
    background-size: 540px 290px;
  }

  .heading-how {
    width: 235.5px;
  }

  .heading-wave {
    width: 411px;
    margin-top: 6px;
  }

  .sec-blob .body-text {
    width: 454px;
    max-width: 100%;
    margin-top: 11px;
    font-weight: 400;
    line-height: 26px;
    text-align: left;
  }

  .note {
    width: 454px;
    max-width: 100%;
    margin-top: 0;
    line-height: 26px;
    text-align: left;
  }

  .blood {
    position: static;
    width: 106px;
    margin: 11px auto 40px;
    transform: none;
  }

  .sec-recheck {
    min-height: 306px;
    padding: 52px 24px 0;
    background-image: url('./assets/blob-recheck-desktop.svg');
    background-position: center top;
    background-size: 540px 290px;
  }

  .heading-recheck {
    width: 389px;
  }

  .hospital {
    position: static;
    width: 73px;
    margin: 13px auto 36px;
    transform: none;
  }

  /* 1818–1977px: 相談導線とCTA */
  .closing {
    min-height: 159px;
    padding: 10px 24px 30px;
  }

  .closing-lead {
    max-width: 773px;
    font-size: 19px;
    font-weight: 700;
    line-height: 29px;
  }

  .cta {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 350px;
    min-height: 62px;
    margin-top: 28px;
    padding: 0 20px;
  }
}
