@charset "UTF-8";
/* =========================================================
   お客様ストーリー  story.css
   - 全クラス story- 接頭辞 / BEM風 / 既存CSSへ非干渉
   - 既存トークン(--blue 等)を継承（未読込時のフォールバック付き）
   - PC=添付PDF準拠 / SP=一覧のデザインルールを踏襲
   - 主ブレークポイント 768px（補助 960 / 480）
========================================================= */

/* ---------- 名前空間トークン ---------- */
.story-page {
  --story-blue: var(--blue, #00316c);
  --story-blue-gray: var(--blue-gray, #5c6a7a);
  --story-blue-light: var(--blue-light, #62afce);
  --story-ink: #1a1a1a;
  --story-bg-soft: #f3f6fa;
  --story-line: #e3e6ea;
  --story-ph: #d9dde2;
  --story-ja: var(--ja, "hiragino-kaku-gothic-pron", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif);
  --story-en: var(--en, "poppins", sans-serif);

  --story-maxw: 1120px;       /* 本文・カード列の最大幅 */
  --story-maxw-narrow: 760px;  /* 詳細の読み物幅 */
  --story-pad: 24px;          /* 左右の基本パディング */
  --story-radius: 8px;        /* パネル・サムネの角丸 */
  --story-gap: 56px;          /* カードの画像⇔本文の間隔 */
}

/* ---------- 基本 ---------- */
.story-page,
.story-page * { box-sizing: border-box; }

.story-page {
  font-family: var(--story-ja);
  color: var(--story-ink);
  line-height: 1.9;
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
.story-page img { max-width: 100%; height: auto; display: block; }
.story-page .u-en { font-family: var(--story-en); font-weight: 600; letter-spacing: .08em; }

/* スクリーンリーダー専用（視覚的に隠す） */
.story-page .u-visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}

/* フォーカスリング（キーボード操作の可視化） */
.story-page a:focus-visible,
.story-page button:focus-visible {
  outline: 3px solid var(--story-blue-light);
  outline-offset: 2px;
  border-radius: 4px;
}

/* =========================================================
   Hero
========================================================= */
.story-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--story-blue) 0%, #0a4a93 100%);
  color: #fff;
  padding: 64px var(--story-pad) 132px;
}
/* 曲線ボトム（既存 shape SVG があれば background-image に差し替え可） */
.story-hero::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -1px;
  height: 90px;
  background: #fff;
  border-radius: 100% 100% 0 0 / 100px 100px 0 0;
}
.story-hero__inner {
  position: relative; z-index: 2;
  max-width: var(--story-maxw);
  margin-inline: auto;
  display: flex; align-items: center; gap: 18px;
}
.story-hero__icon {
  flex: 0 0 auto;
  width: 54px; height: 54px;
  border: 1.5px solid rgba(255,255,255,.7);
  border-radius: 50%;
  position: relative;
}
.story-hero__icon::before {
  content: ""; position: absolute; inset: 50% auto auto 50%;
  width: 28px; height: 28px; transform: translate(-50%,-50%);
  background: url(../img/after-story/icon_comment.svg) no-repeat center center;
  background-size: contain;
}
.story-hero__title {
  font-size: 28px; font-weight: 700; letter-spacing: .12em; margin: 0;
}
.story-hero__title .u-en { letter-spacing: .14em; }
.story-hero__note { font-size: .5em; font-weight: 700; letter-spacing: .08em; margin-left: .5em; }
.story-hero__watermark {
  position: absolute; right: 4%; top: 38%; z-index: 1;
  font-family: var(--story-en);
  font-size: 150px; font-weight: 800; letter-spacing: .06em;
  color: rgba(255,255,255,.10);
  pointer-events: none; user-select: none; line-height: 1;
}

/* =========================================================
   Breadcrumb
========================================================= */
.story-breadcrumb {
  max-width: var(--story-maxw);
  margin: 16px auto 0;
  padding-inline: var(--story-pad);
}
.story-breadcrumb__list {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 6px 10px; list-style: none; margin: 0; padding: 0;
  font-size: 12px; color: var(--story-blue-gray);
}
.story-breadcrumb__item { display: inline-flex; align-items: center; }
.story-breadcrumb__item + .story-breadcrumb__item::before {
  content: "›"; margin-right: 10px; color: var(--story-blue);
}
.story-breadcrumb__link { color: var(--story-blue); text-decoration: none; }
.story-breadcrumb__link:hover { text-decoration: underline; }

/* =========================================================
   Intro
========================================================= */
.story-intro {
  max-width: var(--story-maxw-narrow);
  margin-inline: auto;
  padding: 56px var(--story-pad) 56px;
  text-align: center;
}
.story-intro__title {
  font-size: 26px; font-weight: 700; letter-spacing: .04em;
  color: var(--story-ink); margin: 0;
}
.story-intro__rule { display: block; width: 34px; height: 2px; background: var(--story-blue); margin: 18px auto; }
.story-intro__lead { font-size: 15px; color: var(--story-blue-gray); margin: 0; }

/* =========================================================
   Story List / StoryCard
========================================================= */
.story-list {
  max-width: var(--story-maxw);
  margin-inline: auto;
  padding: 24px var(--story-pad) 72px;
}
.story-list__intro { max-width: var(--story-maxw-narrow); margin: 0 auto; padding: 8px var(--story-pad) 4px; text-align: center; }
.story-list__heading { font-size: 22px; font-weight: 700; color: var(--story-blue); margin: 0 0 10px; letter-spacing: .04em; }
.story-list__lead { font-size: 14px; color: var(--story-blue-gray); margin: 0; }

.story-list__items { list-style: none; margin: 0; padding: 0; }
.story-list__item + .story-list__item { margin-top: 8px; }

.story-card {
  display: flex; align-items: center; gap: var(--story-gap);
  padding: 44px 0;
}
.story-card--reverse { flex-direction: row-reverse; }

.story-card__media { flex: 0 0 46%; }
.story-card__thumblink {
  position: relative; display: block;
  border-radius: var(--story-radius); overflow: hidden;
}
.story-card__thumb {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--story-ph);
}
.story-card__playicon {
  position: absolute; inset: 50% auto auto 50%;
  width: 58px; height: 58px; transform: translate(-50%,-50%);
  border-radius: 50%; background: rgba(0,49,108,.82);
}
.story-card__playicon::after {
  content: ""; position: absolute; inset: 50% auto auto 54%;
  transform: translate(-50%,-50%);
  border-left: 16px solid #fff;
  border-top: 10px solid transparent; border-bottom: 10px solid transparent;
}

.story-card__body { flex: 1 1 auto; min-width: 0; }
.story-card__no { font-size: 13px; color: var(--story-blue); margin: 0 0 10px; }
.story-card__title { margin: 0 0 14px; font-size: 23px; line-height: 1.55; font-weight: 700; letter-spacing: .02em; }
.story-card__title--compact { font-size: 15px; line-height: 1.6; }
.story-card__titlelink { color: var(--story-blue); text-decoration: none; }
.story-card__titlelink:hover { text-decoration: underline; }
.story-card__text { font-size: 14px; color: var(--story-blue-gray); margin: 0 0 22px; }

/* CTA（aタグ：詳細ページへ遷移） */
.story-card__cta {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 10px 26px;
  border: 1px solid var(--story-blue); border-radius: 30px;
  color: var(--story-blue); font-size: 13px; font-weight: 700; letter-spacing: .06em;
  text-decoration: none; transition: background-color .2s, color .2s;
}
.story-card__cta:hover { background: var(--story-blue); color: #fff; }
.story-card__cta-icon {
  width: 0; height: 0; border-left: 9px solid currentColor;
  border-top: 6px solid transparent; border-bottom: 6px solid transparent;
}

/* =========================================================
   Tags
========================================================= */
.story-tags {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 8px 6px; list-style: none; margin: 0 0 16px; padding: 0;
}
.story-tag {
  font-size: 12px; color: #fff; background: var(--story-blue);
  padding: 4px 12px; border-radius: 4px; white-space: nowrap;
}

/* =========================================================
   詳細：Detail Head
========================================================= */
.story-detail { max-width: var(--story-maxw-narrow); margin-inline: auto; padding: 0 var(--story-pad) 72px; }
.story-detail .story-breadcrumb { padding-inline: 0; }

.story-detail-head { padding-top: 28px; }
.story-detail-head__no { font-size: 14px; color: var(--story-blue); margin: 0 0 8px; }
.story-detail-head__title { font-size: 28px; line-height: 1.5; font-weight: 700; color: var(--story-blue); letter-spacing: .02em; margin: 0 0 16px; }
.story-detail-head__lead { font-size: 17px; line-height: 1.85; font-weight: 700; color: var(--story-ink); margin: 0 0 16px; }
.story-detail-head__tags { margin-bottom: 0; }

/* =========================================================
   VideoPlayer
========================================================= */
.story-player { margin: 28px 0 8px; }
.story-player__frame {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  background: #000; border-radius: var(--story-radius); overflow: hidden;
}
.story-player__video { width: 100%; height: 100%; display: block; object-fit: contain; background: #000; }

/* 再生オーバーレイ（button） */
.story-player__playbtn {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; border: 0; padding: 0; cursor: pointer;
  background: rgba(0,0,0,.18); transition: background-color .2s;
}
.story-player__playbtn:hover { background: rgba(0,0,0,.28); }
.story-player__playbtn.is-hidden { display: none; }
.story-player__playicon {
  position: relative; width: 76px; height: 76px; border-radius: 50%;
  background: rgba(0,49,108,.85);
}
.story-player__playicon::after {
  content: ""; position: absolute; inset: 50% auto auto 54%; transform: translate(-50%,-50%);
  border-left: 22px solid #fff; border-top: 14px solid transparent; border-bottom: 14px solid transparent;
}

/* =========================================================
   動画概要 / 本文
========================================================= */
.story-summary { margin-top: 36px; padding: 28px 28px; background: var(--story-bg-soft); border-radius: var(--story-radius); }
.story-summary__title { font-size: 18px; font-weight: 700; color: var(--story-blue); margin: 0 0 12px; }
.story-summary__text { font-size: 15px; margin: 0; }

.story-body { margin-top: 44px; }
.story-body__title { font-size: 21px; font-weight: 700; color: var(--story-blue); margin: 0 0 18px; padding-bottom: 12px; border-bottom: 1px solid var(--story-line); }
.story-body__heading { font-size: 17px; font-weight: 700; color: var(--story-ink); margin: 32px 0 12px; }
.story-body__text { font-size: 15px; margin: 0 0 18px; }

/* =========================================================
   RelatedStories
========================================================= */
.story-related-stories { margin-top: 64px; }
.story-related-stories__title { font-size: 20px; font-weight: 700; color: var(--story-blue); text-align: center; margin: 0 0 28px; }
.story-related-stories__grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 20px; list-style: none; margin: 0; padding: 0;
}
.story-card--compact { display: block; padding: 0; }
.story-card--compact .story-card__no--compact { margin: 10px 0 6px; font-size: 12px; }

/* =========================================================
   Pager / Backlink
========================================================= */
.story-pager {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--story-line);
}
.story-pager__link {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  color: var(--story-blue); font-size: 13px; font-weight: 700; text-decoration: none;
}
.story-pager__link:hover { text-decoration: underline; }
.story-pager__link--next { margin-left: auto; }
.story-pager__link--disabled { color: #b3bac3; pointer-events: none; }

.story-backlink { text-align: center; margin-top: 32px; }
.story-backlink__button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 44px; border-radius: 32px;
  background: var(--story-blue); color: #fff; font-size: 14px; font-weight: 700; letter-spacing: .06em;
  text-decoration: none; transition: opacity .2s;
}
.story-backlink__button:hover { opacity: .88; }

/* =========================================================
   Related banners (FooterCTA)
========================================================= */
.story-related { background: var(--story-bg-soft); margin-top: 64px; padding: 52px var(--story-pad); }
.story-related__inner { max-width: var(--story-maxw); margin-inline: auto; display: flex; gap: 28px; }
.story-related__banner { flex: 1 1 0; border-radius: var(--story-radius); overflow: hidden; display: block; }
.story-related__banner img { width: 100%; height: 100%; object-fit: cover; }
/* 詳細ページ内では幅に合わせて中央寄せ */
.story-detail .story-related { border-radius: var(--story-radius); }

/* =========================================================
   レスポンシブ：タブレット
========================================================= */
@media (max-width: 960px) {
  .story-related-stories__grid { grid-template-columns: repeat(2, 1fr); }
  .story-card { gap: 36px; }
  .story-related__banner { flex: initial; }
}

/* =========================================================
   レスポンシブ：スマホ（768px以下）
   一覧のデザインルールを踏襲：1カラム・画像上・順序統一
========================================================= */
@media (max-width: 768px) {
  .story-page {
    --story-pad: 18px;
    --story-gap: 18px;
  }

  /* Hero：高さ圧縮・ウォーターマーク縮小＆見出しに干渉しない位置 */
  .story-hero { padding: 40px var(--story-pad) 96px; }
  .story-hero::after { height: 56px; }
  .story-hero__icon { width: 44px; height: 44px; }
  .story-hero__icon::before { width: 22px; height: 22px; }
  .story-hero__title { font-size: 21px; }
  .story-hero__watermark { font-size: 64px; top: auto; bottom: 56px; right: 5%; }

  .story-intro { padding-top: 40px; }
  .story-intro__title { font-size: 20px; }
  .story-intro__lead { font-size: 14px; }
  .story-intro__lead br { display: none; }
  .story-list__heading { font-size: 18px; }

  /* StoryCard：交互を解除し常に画像→テキストの縦積み */
  .story-card,
  .story-card--reverse { flex-direction: column; align-items: stretch; gap: 16px; padding: 28px 0; }
  .story-card__media { flex: none; width: 100%; }
  .story-card__title { font-size: 19px; }
  .story-card__text { font-size: 14px; }
  .story-card__playicon { width: 48px; height: 48px; }
  .story-card__playicon::after { border-left-width: 13px; border-top-width: 8px; border-bottom-width: 8px; }

  /* 詳細 */
  .story-detail-head__title { font-size: 22px; }
  .story-detail-head__lead { font-size: 15px; }
  .story-summary { padding: 20px 18px; }
  .story-summary__title { font-size: 16px; }
  .story-body__title { font-size: 18px; }
  .story-body__heading { font-size: 16px; }

  /* RelatedStories：横スクロールのカードリスト */
  .story-related-stories__grid {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 72%;
    overflow-x: auto; gap: 14px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
  }
  .story-related-stories__item { scroll-snap-align: start; }

  /* Related banners：縦積み */
  .story-related__inner { flex-direction: column; }

  /* Pager */
  .story-pager { gap: 10px; }
  .story-pager__label { font-size: 12px; }
}

/* 320px 以下の微調整 */
@media (max-width: 375px) {
  .story-card__title { font-size: 18px; }
  .story-detail-head__title { font-size: 20px; }
}

/* モーション設定を尊重 */
@media (prefers-reduced-motion: reduce) {
  .story-page * { transition: none !important; }
}
