/* =========================================================
   インタビュー詳細ページ専用CSS（2026-09 刷新）
   読み込み順: style.css → sub.css → interview.css（layouts/interview.njk の pageStyles）
   構成: ①共通部品（iv-*）→ ②表紙ヒーロー（iv-c-cover）→ ③本文（章ごとに本文と扉写真を左右交互）→ ④調整
   接頭辞 iv- はこのページ専用。本文（lib/interview-markdown.mjs の出力）の s-int-* は上書きで整える。
   ========================================================= */

/* ==================== ① 共通部品 ==================== */
/* ---------- 小物 ---------- */
.iv-back { display: inline-block; font-size: 12.5px; color: #66707D; }
.iv-back:hover { color: var(--v4-orange-deep); }
.iv-kicker {
  font-family: var(--v4-en); font-size: 11px; font-weight: 700;
  letter-spacing: 0.22em; color: var(--v4-orange-deep); margin: 0;
}
.iv-num {
  font-family: var(--v4-en); font-weight: 800; line-height: 0.9; letter-spacing: -0.02em;
  color: transparent; -webkit-text-stroke: 1.5px rgba(10, 22, 40, 0.42);
  margin: 0; user-select: none;
}
.iv-tag {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.1em;
  border-radius: 999px; padding: 5px 14px; line-height: 1.4;
}
.iv-tag--field { color: var(--v4-orange-deep); background: rgba(226, 162, 114, 0.18); }
.iv-tag--tech  { color: var(--v4-cyan-deep);   background: rgba(125, 189, 206, 0.2); }
.iv-role { font-size: 12.5px; color: var(--v4-gray); }

/* ---------- 本文: 章見出しの既定を素に戻す（各案で組み直す） ---------- */
.iv .s-int-chapter__head { display: block; margin: 0; padding: 0; background: none; border: 0; border-radius: 0; }
.iv .s-cat__line { display: none; }
.iv .s-cat__title--int { flex: none; }

/* ---------- 本文: 質問を軽くする（紺のQボックス廃止） ---------- */
.iv .s-int-qa { margin-bottom: 44px; }
.iv .s-int-qa__q {
  display: block; position: relative;
  font-family: var(--v4-head); font-size: 15.5px; font-weight: 700;
  color: var(--v4-navy); line-height: 1.8; margin: 0 0 14px; padding-left: 16px;
}
.iv .s-int-qa__q::before {
  content: ''; position: absolute; left: 0; top: 0.6em; width: 2px; height: 1.1em;
  background: var(--v4-orange); border-radius: 1px;
  font-size: 0; color: transparent; display: block; margin: 0;
}
.iv .s-int-qa__a { padding-left: 16px; font-size: 15px; line-height: 2.1; color: var(--v4-ink); }
.iv .s-int-qa__a p { margin-bottom: 14px; }
.iv .s-int-qa__a p:last-child { margin-bottom: 0; }
.iv .s-int-p { font-size: 15px; line-height: 2.1; }
.iv .s-int-sub { font-size: 17px; margin: 36px 0 14px; }

/* ---------- 本文: 1日の流れ（タイムライン） ---------- */
.iv .s-int-day { margin: 20px 0 8px; padding: 0; display: grid; gap: 0; }
.iv .s-int-day__row {
  display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 20px; align-items: baseline;
  position: relative; padding: 10px 0 10px 22px; margin: 0;
}
.iv .s-int-day__row::before {
  content: ''; position: absolute; left: 4px; top: 0; bottom: 0; width: 1px; background: var(--v4-line);
}
.iv .s-int-day__row:first-child::before { top: 50%; }
.iv .s-int-day__row:last-child::before { bottom: 50%; }
.iv .s-int-day__row::after {
  content: ''; position: absolute; left: 0; top: calc(50% - 4px); width: 9px; height: 9px;
  border-radius: 50%; background: #fff; border: 2px solid var(--v4-orange);
}
.iv .s-int-day dt { font-family: var(--v4-en); font-size: 13px; font-weight: 600; letter-spacing: 0.04em; color: var(--v4-orange-deep); white-space: nowrap; }
.iv .s-int-day dd { margin: 0; font-size: 14.5px; line-height: 1.9; color: var(--v4-ink); }

/* ---------- 本文: 太字マーカーはそのまま（sub.css 由来） ---------- */

/* ---------- PROFILE カード（記事末尾 or 冒頭） ---------- */
.iv-profile {
  display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 32px; align-items: start;
  background: #fff; border: 1px solid rgba(10, 22, 40, 0.08); border-radius: 20px;
  padding: 32px 36px;
}
.iv-profile__face { border-radius: 14px; overflow: hidden; aspect-ratio: 1; }
.iv-profile__face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.iv-profile__name { font-family: var(--v4-head); font-size: 22px; font-weight: 900; color: var(--v4-navy); margin: 8px 0 2px; line-height: 1.4; }
.iv-profile__name small { display: inline-block; margin-left: 12px; font-family: var(--v4-en); font-size: 12px; font-weight: 600; letter-spacing: 0.18em; color: var(--v4-gray); }
.iv-profile__role { font-size: 13px; color: var(--v4-gray); margin: 0 0 16px; }
.iv-profile__text { font-family: var(--v4-serif); font-size: 14px; line-height: 2.1; color: var(--v4-ink); margin: 18px 0 0; }

/* 経歴チップ: 前職 → … → AICE */
.iv-career { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 6px; margin: 0; padding: 0; }
.iv-career li {
  font-size: 12.5px; font-weight: 600; color: var(--v4-navy);
  background: var(--v4-paper); border-radius: 999px; padding: 6px 14px; line-height: 1.4;
}
.iv-career li:not(:last-child)::after { content: '→'; display: inline-block; margin-left: 14px; color: var(--v4-gray); font-family: var(--v4-en); font-weight: 600; }
.iv-career li:not(:last-child) { padding-right: 0; background: none; padding-left: 0; }
.iv-career li:not(:last-child) span { display: inline-block; background: var(--v4-paper); border-radius: 999px; padding: 6px 14px; }
.iv-career__now { color: #fff !important; background: var(--v4-navy) !important; }
.iv-career__now small { font-size: 11px; font-weight: 500; opacity: 0.8; margin-left: 8px; }
@media (max-width: 768px) {
  .iv-profile { grid-template-columns: 1fr; gap: 20px; padding: 24px; }
  .iv-profile__face { width: 96px; }
  .iv .s-int-qa__a { padding-left: 0; }
  .iv .s-int-day__row { grid-template-columns: 1fr; gap: 2px; }
}

/* ==================== ② 表紙ヒーロー ==================== */
/* ---------- 表紙 ---------- */
.iv-c-cover { position: relative; min-height: 640px; height: 88vh; max-height: 900px; overflow: hidden; background: var(--v4-paper); }
/* 写真は右寄せに置く（左側は文字の領域。被写体が中央の既存写真でも右へ逃がす） */
.iv-c-cover__bg { position: absolute; top: 0; bottom: 0; right: 0; left: 16%; }
.iv-c-cover__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; display: block; }
/* 横長写真が無い人: 縦写真を拡大トリミングせず、右側に 4:5 のカードとして置く */
.iv-c-cover--portrait .iv-c-cover__bg {
  left: auto; top: auto; right: 6%; bottom: 0; height: min(78%, 640px); aspect-ratio: 4 / 5;
  border-radius: 22px 22px 0 0; overflow: hidden; box-shadow: 0 24px 60px rgba(10, 22, 40, 0.12);
}
.iv-c-cover--portrait .iv-c-cover__bg img { object-position: 50% 0%; }
.iv-c-cover--portrait .iv-c-cover__scrim { background: linear-gradient(180deg, rgba(246, 242, 234, 0) 0%, rgba(246, 242, 234, 0) 100%); }
.iv-c-cover__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(246, 242, 234, 0.97) 0%, rgba(246, 242, 234, 0.9) 34%, rgba(246, 242, 234, 0.35) 62%, rgba(246, 242, 234, 0) 100%),
    linear-gradient(180deg, rgba(246, 242, 234, 0.55) 0%, rgba(246, 242, 234, 0) 30%, rgba(246, 242, 234, 0) 55%, rgba(246, 242, 234, 0.75) 100%);
}
.iv-c-cover__inner { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: space-between; padding: 112px 0 56px; }
.iv-c-cover__top .iv-back { display: block; margin-bottom: 26px; }
.iv-c-cover__num { font-size: clamp(88px, 11vw, 150px); margin: 8px 0 0; -webkit-text-stroke-color: rgba(10, 22, 40, 0.55); }
.iv-c-cover__title {
  font-family: var(--v4-serif); font-size: clamp(28px, 3.6vw, 46px); font-weight: 600; line-height: 1.55;
  letter-spacing: 0.03em; color: var(--v4-navy); max-width: 760px; margin: 0 0 26px;
  text-shadow: 0 0 24px rgba(246, 242, 234, 0.95);
}
.iv-c-cover__strip { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin: 0; }
.iv-c-cover__name { font-family: var(--v4-head); font-size: 22px; font-weight: 900; color: var(--v4-navy); }
.iv-c-cover__name small { margin-left: 12px; font-family: var(--v4-en); font-size: 12px; font-weight: 600; letter-spacing: 0.2em; color: var(--v4-gray); }

@media (max-width: 1024px) {
  /* 表紙を縦積みに: 番号 → 写真 → 引用 → 見出し・氏名 */
  .iv-c-cover { height: auto; min-height: 0; max-height: none; display: flex; flex-direction: column; padding-bottom: 44px; }
  .iv-c-cover > * { flex-shrink: 0; }
  .iv-c-cover__inner { display: contents; }
  .iv-c-cover__scrim { display: none; }
  .iv-c-cover__top { order: 1; padding: 100px var(--container-px) 18px; }
  .iv-c-cover__top .iv-back { margin-bottom: 18px; }
  .iv-c-cover__num { font-size: 72px; }
  .iv-c-cover__bg { order: 2; position: relative; left: 0; height: 60vw; max-height: 520px; margin: 0 var(--container-px); border-radius: 18px; overflow: hidden; }
  .iv-c-cover--portrait .iv-c-cover__bg {
    position: relative; left: 0; right: auto; top: auto; bottom: auto;
    width: min(100% - 2 * var(--container-px), 420px); height: auto; max-height: none; aspect-ratio: 4 / 5;
    margin: 0 auto; border-radius: 18px; box-shadow: none;
  }
  .iv-c-cover--portrait .iv-c-cover__bg img { object-position: 50% 0%; }
  .iv-c-cover__bottom { order: 4; padding: 0 var(--container-px); }
  .iv-c-cover__title { font-size: clamp(24px, 4.6vw, 34px); text-shadow: none; margin-bottom: 18px; }
}
@media (max-width: 768px) {
  .iv-c-cover__top { padding-top: 92px; }
  .iv-c-cover__num { font-size: 60px; }
}

/* ==================== ③ 本文（章＝場面） ==================== */
/* ---------- 本文（白パネル） ---------- */
.iv-a-body { background: #fff; border-radius: 48px 48px 0 0; padding: 40px 0 24px; }
.iv-a .s-int-chapter { padding: 64px 0; scroll-margin-top: 88px; }
.iv-a .s-int-chapter + .s-int-chapter { border-top: 1px solid rgba(10, 22, 40, 0.08); }
.iv-a .s-int-chapter__body > :last-child { margin-bottom: 0; }

/* 章見出し: 番号 ＋ 語りの一文 */
.iv-a .s-int-chapter__head {
  grid-area: head; display: grid; grid-template-columns: 84px minmax(0, 1fr); align-items: start; margin: 0 0 40px;
}
.iv-a .s-cat__num { font-family: var(--v4-en); font-size: 40px; font-weight: 800; letter-spacing: -0.02em; color: var(--v4-orange-deep); line-height: 1; padding-top: 6px; display: block; margin: 0; }
.iv-a .s-cat__title--int {
  font-family: var(--v4-head); font-size: clamp(23px, 2.5vw, 31px); font-weight: 900; line-height: 1.6;
  color: var(--v4-navy); margin: 0; letter-spacing: 0.01em;
}

/* 章の2カラム: 本文｜扉写真（奇数章は写真が右、偶数章は左） */
.iv-a .s-int-chapter--right,
.iv-a .s-int-chapter--left {
  display: grid; grid-template-columns: minmax(0, 1fr) 42%; column-gap: 64px;
  grid-template-areas: "head head" "body media";
}
.iv-a .s-int-chapter__body { grid-area: body; min-width: 0; padding-left: 84px; }
.iv-a .s-int-chapter__media { grid-area: media; align-self: start; position: sticky; top: 104px; margin-right: -40px; }
.iv-a .s-int-chapter--left {
  grid-template-columns: 42% minmax(0, 1fr);
  grid-template-areas: "head head" "media body";
}
.iv-a .s-int-chapter--left .s-int-chapter__body { padding-left: 0; }
.iv-a .s-int-chapter--left .s-int-chapter__media { margin-right: 0; margin-left: -40px; }
.iv-a .s-int-chapter__media .s-int-photo { margin: 0; max-width: none; }
.iv-a .s-int-chapter__media .s-int-photo img { aspect-ratio: 3 / 2; object-fit: cover; border-radius: 14px; width: 100%; }

/* 横長写真（wide_）の章: 写真を章の上に全幅で置く */
.iv-a .s-int-chapter--wide { display: flex; flex-direction: column; }
.iv-a .s-int-chapter--wide .s-int-chapter__media { order: -1; position: static; align-self: stretch; margin: 0 0 44px; }
.iv-a .s-int-chapter--wide .s-int-chapter__media .s-int-photo { margin: 0; max-width: none; }
.iv-a .s-int-chapter--wide .s-int-chapter__media .s-int-photo img { border-radius: 18px; width: 100%; height: auto; aspect-ratio: auto; }
.iv-a .s-int-chapter--wide .s-int-chapter__body,
.iv-a .s-int-chapter--nomedia .s-int-chapter__body { max-width: 760px; }

/* 本文中の2枚目以降の写真・抜粋 */
.iv-a .s-int-chapter__body .s-int-photo { margin: 36px 0; max-width: none; }
.iv-a .s-int-chapter__body .s-int-photo img { border-radius: 14px; }
.iv-a .s-int-pull {
  background: var(--v4-paper); border-radius: 18px; padding: 30px 32px; margin: 40px 0;
  font-size: clamp(19px, 1.9vw, 24px); line-height: 1.9; text-align: center; max-width: none;
}

@media (max-width: 1024px) {
  .iv-a .s-int-chapter { padding: 44px 0; }
  .iv-a .s-int-chapter--right,
  .iv-a .s-int-chapter--left {
    grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "media" "body";
  }
  .iv-a .s-int-chapter__media,
  .iv-a .s-int-chapter--left .s-int-chapter__media { position: static; margin: 0 0 36px; }
  .iv-a .s-int-chapter__body,
  .iv-a .s-int-chapter--left .s-int-chapter__body { padding-left: 84px; max-width: 760px; }
}
@media (max-width: 768px) {
  .iv-a-body { border-radius: 28px 28px 0 0; }
  .iv-a .s-int-chapter { padding: 28px 0 32px; }
  .iv-a .s-int-chapter__head { grid-template-columns: 52px minmax(0, 1fr); margin-bottom: 20px; }
  .iv-a .s-cat__num { font-size: 28px; padding-top: 4px; }
  .iv-a .s-int-chapter__body,
  .iv-a .s-int-chapter--left .s-int-chapter__body { padding-left: 0; }
  .iv-a .s-int-pull { padding: 22px 20px; margin: 28px 0; font-size: 18px; }
}

/* ==================== ④ 融合レイアウトの調整 ==================== */
.iv-d .iv-a-body { padding-top: 56px; }
.iv-d-intro { max-width: 860px; margin: 0 0 8px 84px; padding-bottom: 40px; border-bottom: 1px solid rgba(10, 22, 40, 0.08); }
.iv-d-intro .s-int-toc { margin: 0; }
.iv-d-intro .iv-profile { margin-top: 28px; }
.iv-d .iv-a-chapters > .s-int-chapter:first-child { padding-top: 48px; }

@media (max-width: 1024px) {
  .iv-d-intro { margin-left: 84px; }
}
@media (max-width: 768px) {
  .iv-d .iv-a-body { padding-top: 32px; }
  .iv-d-intro { margin-left: 0; padding-bottom: 28px; }
}

/* ---------- D: 表紙の調整 ----------
   横長写真(1280x670=1.91:1)を切らずに見せる: 写真領域=右80%、高さは領域幅÷1.91 に合わせる。
   上寄せ(object-position 50% 0)なので頭が切れない。写真の無いイラストの人は右端のカード（C案と同じ）。 */
.iv-d .iv-c-cover:not(.iv-c-cover--portrait) { height: clamp(620px, calc(35.6vw + 84px), 840px); }
/* 写真は右74%・ヘッダーの下(84px)から。頭がヘッダーに隠れず、見出し（左）と重ならない */
.iv-d .iv-c-cover:not(.iv-c-cover--portrait) .iv-c-cover__bg { left: 32%; top: 84px; }
.iv-d .iv-c-cover:not(.iv-c-cover--portrait) .iv-c-cover__bg img { object-position: 50% 0%; }
.iv-d .iv-c-cover:not(.iv-c-cover--portrait) .iv-c-cover__scrim {
  background:
    linear-gradient(90deg, rgba(246, 242, 234, 1) 0%, rgba(246, 242, 234, 1) 20%, rgba(246, 242, 234, 0.55) 40%, rgba(246, 242, 234, 0) 62%),
    linear-gradient(180deg, rgba(246, 242, 234, 0.4) 0%, rgba(246, 242, 234, 0) 26%, rgba(246, 242, 234, 0) 60%, rgba(246, 242, 234, 0.7) 100%);
}
.iv-d .iv-c-cover__inner { padding-top: 104px; padding-bottom: 48px; }
/* ルール: 見出しと人物は重ねない（間隔は最小限）。
   人物の左端は写真ごとに違うので、src/_data/表紙人物位置.json の値（画像幅に対する割合）を
   --person-left として受け取り、見出しの右端を「人物の左端 − 12px」に合わせる。
   写真領域は右68%・上84px。高さは 620〜840px に収めるため object-fit: cover で横に少し切れる幅帯があり、
   表示上の写真幅 --sw は max(68vw, 1024px)（切れた分は左右均等）。 */
.iv-d .iv-c-cover:not(.iv-c-cover--portrait) {
  --sw: max(68vw, 1024px);
  --person-x: calc(32vw - (var(--sw) - 68vw) / 2 + var(--person-left, 0.30) * var(--sw));
}
.iv-d .iv-c-cover__title {
  font-size: clamp(26px, 2.9vw, 40px);
  max-width: calc(var(--person-x, 50vw) - max(var(--container-px, 24px), (100vw - var(--container-max, 1200px)) / 2 + var(--container-px, 24px)) - 12px);
}
.iv-d .iv-c-cover--portrait .iv-c-cover__title { max-width: 600px; }

/* ---------- D: 質問と回答の区別（質問に「――」） ---------- */
.iv-d .s-int-qa { margin-bottom: 48px; }
.iv-d .s-int-qa__q { padding-left: 0; font-size: 16px; line-height: 1.75; margin-bottom: 16px; display: flex; gap: 10px; align-items: baseline; }
.iv-d .s-int-qa__q::before {
  content: '――'; position: static; width: auto; height: auto; background: none;
  font-family: var(--v4-en); font-size: 15px; font-weight: 700; letter-spacing: -0.12em; color: var(--v4-orange-deep);
  flex-shrink: 0; transform: translateY(-1px);
}
.iv-d .s-int-qa__a { padding-left: 34px; }

@media (max-width: 1024px) {
  /* スマホ・タブレットは写真と見出しが縦に並ぶので、人物位置に合わせた幅制限は解除する */
  .iv-d .iv-c-cover__title { max-width: none; }
  .iv-d .iv-c-cover:not(.iv-c-cover--portrait) { height: auto; }
  .iv-d .iv-c-cover:not(.iv-c-cover--portrait) .iv-c-cover__bg { left: 0; top: auto; }
  .iv-d .iv-c-cover__inner { padding: 0; }
  .iv-d .iv-c-cover__bottom { padding-top: 26px; }
}
@media (max-width: 768px) {
  .iv-d .s-int-qa__a { padding-left: 0; }
}

/* ---------- D: 最終章の横長写真は「章見出しの下・最初の質問の前」に置く（A案の見出し上配置をやめる） ----------
   本文の文字幅（左84px・幅676px）に揃える。金田さんのように取材風景（scene_）の章は右カラム配置のまま。 */
.iv-d .s-int-chapter--wide .s-int-chapter__media { order: 0; position: static; margin: 0 0 40px 84px; max-width: 676px; }
.iv-d .s-int-chapter--wide .s-int-chapter__media .s-int-photo img { border-radius: 16px; width: 100%; height: auto; aspect-ratio: auto; }
@media (max-width: 1024px) {
  .iv-d .s-int-chapter--wide .s-int-chapter__media { margin-left: 84px; }
}
@media (max-width: 768px) {
  .iv-d .s-int-chapter--wide .s-int-chapter__media { margin: 0 0 28px; max-width: none; }
}
