/* ケーブル簡易品質検査装置 ケーブルウィザードの製品ページ・活用LP（日英）。先導体シミュレータ（css/rsim.css）と同じ構成にし、色・書体・基本部品はサイト共通の定義を使う。 */
@layer components {
  .cwiz-shell {
    width: 100%;
    max-width: calc(var(--max-width) + 2 * var(--page-gutter));
    margin-inline: auto;
    padding-inline: var(--page-gutter);
  }
  .cwiz-page main { padding-bottom: 0; }
  .cwiz-page main :is(h1, h2, h3) { text-wrap: balance; }
  .cwiz-page main p { line-height: 1.9; }
  .cwiz-page h3 { color: var(--color-primary-dark); font-size: 21px; line-height: 1.6; }
  .cwiz-page .section { scroll-margin-top: 80px; }
  .cwiz-page .hero { padding-block: 40px; }
  .cwiz-page .hero h1 { font-size: clamp(30px, 3.4vw, 44px); line-height: 1.5; letter-spacing: .025em; }
  .cwiz-product .hero h1 { font-size: clamp(28px, 3vw, 40px); }
  .cwiz-page .hero__actions .site-button { padding-inline: 24px; }
  .cwiz-page .hero__product { margin-top: 24px; font-size: 15px; }
  .cwiz-page .hero__product strong { display: block; font-size: 21px; color: var(--color-primary-dark); }
  .cwiz-copy > * + * { margin-top: 20px; }
  .cwiz-copy > h3:not(:first-child) { margin-top: 32px; }
  .cwiz-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 16px; text-decoration: underline; text-underline-offset: 4px; }
  .cwiz-copy a, .cwiz-figure figcaption a, .cwiz-note a { text-decoration: underline; text-underline-offset: 4px; }
  .cwiz-figure { min-width: 0; margin: 0; }
  .cwiz-figure img { display: block; width: 100%; height: auto; border-radius: var(--radius-md); }
  .cwiz-figure figcaption { margin-top: 12px; color: var(--color-text-muted); font-size: 14px; line-height: 1.8; }
  .cwiz-diagram img { border: 1px solid var(--color-border); background: var(--color-white); }
  .cwiz-page img[data-zoomable] { pointer-events: auto; }
  .cwiz-page .medium-zoom-image--opened { object-fit: contain; }
  .cwiz-photo { padding: 24px; background: var(--color-bg-cool); border-radius: var(--radius-hero); }
  .cwiz-photo img { max-width: 480px; margin-inline: auto; border: 1px solid var(--color-border); }
  .cwiz-summary { margin-top: 24px; font-size: 14px; }
  .cwiz-summary > div { display: grid; grid-template-columns: 6em minmax(0, 1fr); gap: 16px; padding-block: 10px; border-bottom: 1px solid var(--color-border); }
  .cwiz-summary dt { color: var(--color-primary-dark); font-weight: 500; }
  .cwiz-index { display: flex; flex-wrap: wrap; gap: 8px 28px; padding-block: 16px; border-block: 1px solid var(--color-border); }
  .cwiz-index a { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; text-decoration: underline; text-underline-offset: 4px; }
  .cwiz-origin { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; padding-block: 16px; border-block: 1px solid var(--color-border); font-size: 14px; }
  .cwiz-origin .cwiz-link { margin: 0; }
  .cwiz-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
  .cwiz-grid > div { padding-top: 24px; border-top: 1px solid var(--color-border); }
  .cwiz-grid h3 { margin-bottom: 16px; }
  .cwiz-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cwiz-list { padding-left: 1.25em; list-style: disc; }
  .cwiz-list li + li { margin-top: 12px; }
  .cwiz-note { margin-top: 16px; color: var(--color-text-muted); font-size: 14px; line-height: 1.8; }
  .cwiz-conditions { padding: 28px 32px; background: var(--color-bg-cool); border-radius: var(--radius-md); }
  .cwiz-record { margin-top: 32px; padding: 24px 28px; border: 1px solid var(--color-border); border-radius: var(--radius-md); }
  .cwiz-record h3 { margin-bottom: 8px; font-size: 18px; }
  .cwiz-document { display: block; padding: 28px; border: 1px solid var(--color-border); border-radius: var(--radius-md); }
  .cwiz-document:hover { border-color: var(--color-primary); }
  .cwiz-document strong { display: block; margin-bottom: 8px; text-decoration: underline; text-underline-offset: 4px; font-weight: 500; }
  .cwiz-document small { color: var(--color-text-muted); font-size: 14px; }
  .cwiz-page .dads-accordion { border-top: 1px solid var(--color-border); }
  .cwiz-page .dads-accordion:last-child { border-bottom: 1px solid var(--color-border); }
  .cwiz-page .dads-accordion__summary { font-size: 17px; padding-block: 24px; }
  .cwiz-page .dads-accordion__content { padding-bottom: 24px; }
  .cwiz-contact { margin-top: var(--section-gap); padding-block: 56px; background: var(--color-bg-cool); border-top: 1px solid var(--color-border); }
  .cwiz-contact h2 { margin-bottom: 20px; color: var(--color-primary-dark); font-size: 32px; line-height: 1.6; }
  .cwiz-contact .cta-band__actions { justify-content: flex-start; flex-wrap: wrap; gap: 16px 32px; margin-top: 28px; }
  /* 英語は単語間で折り返し、日本語用の字間を引き継がない。製品名 Cable-Wizard はハイフンで割らない（ボタンやリンクの中では包まない）。 */
  html[lang="en"] .cwiz-page .hero h1 { letter-spacing: 0; }
  html[lang="en"] .cwiz-page main p { line-height: 1.8; }
  html[lang="en"] .cwiz-page :is(h1, h2, h3, .cwiz-link, .site-button) { overflow-wrap: break-word; }
  html[lang="en"] .cwiz-summary > div { grid-template-columns: 7.5em minmax(0, 1fr); }
  .cwiz-name { white-space: nowrap; }
  /* 紹介動画の導線（先導体シミュレータ css/rsim.css と同じ指定。2026-11-03）。LPは課題の次の節にサムネイル、製品ページは冒頭のボタンの下に再生リンク */
  .cwiz-kicker { margin-bottom: 16px; font-size: 14px; color: var(--color-primary); }
  .cwiz-video-intro { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: center; gap: 48px; }
  .cwiz-video-intro .video-trigger { max-width: none; }
  .cwiz-video-intro .section-title { margin-bottom: 24px; }
  .cwiz-video-intro .video-trigger__label { text-decoration: underline; text-underline-offset: 4px; }
  .video-trigger.cwiz-video-link { display: inline-flex; align-items: center; gap: 8px; width: auto; max-width: 100%; min-height: 44px; margin: 16px 0 0; text-align: left; color: var(--color-primary-dark); font: inherit; font-size: 15px; }
  .cwiz-video-link svg { flex-shrink: 0; }
  .cwiz-video-link span { text-decoration: underline; text-underline-offset: 4px; }
  /* このCSSを読むケーブルウィザードのページだけ、縦持ち端末で字幕と操作バーの余白を確保する（先導体シミュレータと同じ値）。 */
  @media (max-width: 767px) and (min-height: 500px) {
    .video-modal .video-modal__frame { aspect-ratio: 1; }
    .video-modal .video-modal__video { object-fit: contain; object-position: center top; background: #fff; }
    .video-modal__video::cue { font-size: 3.1vw; }
  }
  @media (max-width: 1023px) {
    .cwiz-video-intro { grid-template-columns: 1fr; gap: 28px; }
  }
  @media (max-width: 1023px) {
    .cwiz-page .hero { grid-template-columns: 1fr; gap: 32px; }
    .cwiz-page .hero > .cwiz-figure { max-width: 760px; }
  }
  @media (max-width: 767px) {
    .cwiz-page .hero { padding-block: 28px 32px; }
    .cwiz-page .hero h1, .cwiz-product .hero h1 { font-size: clamp(24px, 7vw, 30px); }
    .cwiz-page .hero__actions .site-button { width: 100%; }
    .cwiz-page .section-title { font-size: 27px; line-height: 1.6; }
    .cwiz-photo { padding: 16px; }
    .cwiz-grid { grid-template-columns: 1fr; gap: 28px; }
    .cwiz-conditions, .cwiz-document { padding: 24px 20px; }
    .cwiz-contact { padding-block: 40px; }
    .cwiz-contact h2 { font-size: 26px; }
    .cwiz-contact .site-button { width: 100%; }
  }
}
/* ケーブルウィザード固有: 構成の図2枚・製品外観・手順の写真・画面1枚の図・LPの3段の流れ */
@layer components {
  .cwiz-structure { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); align-items: start; gap: 32px; margin-top: 32px; }
  .cwiz-appearance { display: grid; grid-template-columns: minmax(0, 575fr) minmax(0, 308fr); align-items: start; gap: 24px; max-width: 900px; margin-top: 24px; }
  .cwiz-appearance img { border: 1px solid var(--color-border); }
  .cwiz-procedure + h3 { margin-top: 40px; }
  .cwiz-procedure { counter-reset: cwiz-step; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 24px; margin-top: 16px; }
  .cwiz-procedure li { counter-increment: cwiz-step; display: flex; flex-direction: column; gap: 14px; }
  .cwiz-procedure figure { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; height: 200px; margin: 0; padding: 12px; background: var(--color-bg-cool); border-radius: var(--radius-md); }
  .cwiz-procedure img { width: auto; max-width: 100%; height: auto; max-height: 140px; object-fit: contain; border: 1px solid var(--color-border); border-radius: var(--radius-sm); }
  .cwiz-procedure figcaption { color: var(--color-text-muted); font-size: 13px; line-height: 1.6; text-align: center; }
  .cwiz-procedure__text { position: relative; padding-left: 40px; line-height: 1.8; }
  .cwiz-procedure__text::before { content: counter(cwiz-step); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--color-accent); color: var(--color-white); font-size: 14px; font-weight: 700; line-height: 28px; text-align: center; }
  .cwiz-single { max-width: 800px; margin-top: 24px; }
  .cwiz-single img { border: 1px solid var(--color-border); }
  .cwiz-flow { counter-reset: cwiz-flow; margin-top: 32px; }
  .cwiz-grid.cwiz-flow > div { padding-top: 0; border-top: 0; }
  .cwiz-flow > div { counter-increment: cwiz-flow; display: flex; flex-direction: column; gap: 16px; }
  .cwiz-flow figure { margin: 0; display: flex; align-items: center; justify-content: center; height: 200px; padding: 16px; background: var(--color-bg-cool); border-radius: var(--radius-md); }
  .cwiz-flow img { width: auto; max-width: 100%; max-height: 100%; height: auto; border: 1px solid var(--color-border); border-radius: var(--radius-sm); }
  .cwiz-flow h3 { margin-bottom: 0; }
  .cwiz-flow h3::before { content: counter(cwiz-flow) "．"; color: var(--color-accent); }
  @media (max-width: 1023px) {
    .cwiz-structure { grid-template-columns: 1fr; }
    .cwiz-structure > .cwiz-figure { max-width: 760px; }
  }
  @media (max-width: 767px) {
    .cwiz-appearance { grid-template-columns: 1fr; max-width: 480px; }
    .cwiz-appearance figure:last-child img { max-width: 260px; }
    .cwiz-flow figure { height: 180px; }
  }
}
