/* ==========================================================
   レシピ詳細（新デザイン）
   - LP と同じ header-lp / footer-lp を使うページ用
   - lp.css の後に読み込まれるため、すべて .lp-body 付きで
     詳細度を上げて上書きされないようにしている
   - 色・フォントは lp.css の変数（--lp-red など）を利用
   ========================================================== */

.lp-body .kwr {
  --kwr-bg-soft: #F6F6F6;
  --kwr-line: #DDDDDD;
  --kwr-text-sub: #555555;
  --kwr-pink: #FBE9EC;
  --kwr-step-line: #F4A3B5;
  color: var(--lp-black);
}

/* 動画モーダルが開いている間、背景ページをスクロールさせない */
html.kwr-modal-open,
html.kwr-modal-open body { overflow: hidden; }

.lp-body .kwr-wrap {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ---------- パンくず ---------- */
.lp-body .kwr-crumb { padding: 18px 0 20px; font-size: 13px; color: var(--lp-gray); }
.lp-body .kwr-crumb ol { display: flex; flex-wrap: wrap; gap: 0; margin: 0; padding: 0; list-style: none; }
.lp-body .kwr-crumb li + li::before { content: "/"; margin: 0 10px; color: var(--lp-gray); }
.lp-body .kwr-crumb a { color: var(--kwr-text-sub); }
.lp-body .kwr-crumb a:hover { color: var(--lp-red); }
.lp-body .kwr-crumb li[aria-current] { color: var(--lp-black); }

/* ---------- ヒーロー（画像 / 動画 / 情報） ---------- */
.lp-body .kwr-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr) minmax(0, 1.65fr);
  column-gap: 16px;
  align-items: stretch;
}
.lp-body .kwr-hero--novideo {
  grid-template-columns: minmax(0, 2.9fr) minmax(0, 1.65fr);
}

.lp-body .kwr-hero__image,
.lp-body .kwr-hero__video {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #F2F2F2;
}
.lp-body .kwr-hero__image img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
/* 16:10 の比率を padding-top で作る（aspect-ratio ではなくこちらを使う）。
   position:absolute の画像を aspect-ratio で高さを決めた枠に重ねる書き方は、
   実機Safariで枠の高さが0になり画像ごと消えることがある既知の不具合があるため避ける。 */
.lp-body .kwr-hero--novideo .kwr-hero__image { height: 0; padding-top: 62.5%; /* 10/16 */ }

/* 動画：縦型（9:16）。行の高さはこの動画が決める */
.lp-body .kwr-hero__video { aspect-ratio: 9 / 16; background: #000; }
.lp-body .kwr-hero__video video,
.lp-body .kwr-hero__video iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
  object-fit: cover;
}

.lp-body .kwr-hero__info {
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

/* ジャンルのバッジ */
.lp-body .kwr-badge {
  align-self: flex-start;
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  background: #DDE4C4;
  color: #3A4A1B;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1.4;
  text-transform: uppercase;
}
.lp-body .kwr-badge--burger-sandwich,
.lp-body .kwr-badge--sandwich,
.lp-body .kwr-badge--sandwiches,
.lp-body .kwr-badge--snacks,
.lp-body .kwr-badge--chicken,
.lp-body .kwr-badge--dinner,
.lp-body .kwr-badge--bbq {
  background: #F8E3D8;
  color: #6B3A22;
}
.lp-body .kwr-badge--sm { font-size: 11px; padding: 3px 8px; }

.lp-body .kwr-title {
  margin: 14px 0 0;
  font-size: clamp(34px, 4.2vw, 56px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #222;
  overflow-wrap: anywhere;
}
.lp-body .kwr-lead {
  margin: 18px 0 0;
  font-size: 17px;
  line-height: 1.55;
  color: var(--kwr-text-sub);
}

.lp-body .kwr-meta {
  display: flex; flex-wrap: wrap;
  gap: 12px 28px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
  font-weight: 500;
}
.lp-body .kwr-meta li { display: flex; align-items: center; gap: 8px; }
.lp-body .kwr-meta svg { color: var(--lp-red); flex: none; }

/* Like / Print */
.lp-body .kwr-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.lp-body .kwr-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-width: 150px;
  height: 56px;
  padding: 0 28px;
  border: 2px solid var(--lp-red);
  border-radius: 999px;
  font-size: 16px; font-weight: 700;
  line-height: 1;
  transition: background-color .15s, color .15s, transform .1s;
}
.lp-body .kwr-btn:active { transform: scale(.98); }
.lp-body .kwr-btn--like { background: var(--lp-red); color: #fff; }
.lp-body .kwr-btn--like:hover { background: #C40025; border-color: #C40025; }
.lp-body .kwr-btn--print { background: #fff; color: var(--lp-red); }
.lp-body .kwr-btn--print:hover { background: var(--kwr-pink); }
.lp-body .kwr-btn:focus-visible { outline: 3px solid rgba(228, 0, 43, .35); outline-offset: 2px; }
.lp-body .kwr-btn__count {
  min-width: 26px; padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .25);
  font-size: 13px; text-align: center;
}
.lp-body .kwr-btn__count[hidden] { display: none; }
.lp-body .kwr-btn--like.is-liked .kwr-btn__icon path { fill: currentColor; }
.lp-body .kwr-btn--like.is-liked { background: #fff; color: var(--lp-red); }
.lp-body .kwr-btn--like.is-liked .kwr-btn__count { background: var(--kwr-pink); }
.lp-body .kwr-btn--like.is-pop .kwr-btn__icon { animation: kwr-pop .35s ease; }
@keyframes kwr-pop { 0% { transform: scale(1); } 45% { transform: scale(1.35); } 100% { transform: scale(1); } }

/* ---------- 見出し共通 ---------- */
.lp-body .kwr-h2 {
  margin: 0 0 22px;
  font-size: clamp(26px, 2.6vw, 34px);
  line-height: 1.15;
  font-weight: 700;
  color: #222;
}
.lp-body .kwr-h2--lg { font-size: clamp(28px, 3vw, 40px); margin: 0; }

/* ---------- 材料 / 手順 ---------- */
.lp-body .kwr-body {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.5fr);
  gap: 32px;
  margin-top: 48px;
  align-items: stretch;
}

.lp-body .kwr-ing {
  background: var(--kwr-bg-soft);
  border-radius: 20px;
  padding: 28px 26px 30px;
}
.lp-body .kwr-ing__list { margin: 0; padding: 0; list-style: none; }
.lp-body .kwr-ing__row {
  position: relative;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 8px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--kwr-line);
  font-size: 15px;
  line-height: 1.4;
}
.lp-body .kwr-ing__row:last-child { border-bottom: 0; }
.lp-body .kwr-ing__qty { color: var(--kwr-text-sub); }
.lp-body .kwr-ing__name { color: #222; }

/* 商品が紐づいた行：ハイライト＋商品画像 */
.lp-body .kwr-ing__row.is-product {
  min-height: 64px;
  align-content: center;
  margin: 8px 0 54px;
  padding: 14px 130px 14px 12px;
  border-bottom: 0;
  border-radius: 10px;
  background: var(--kwr-pink);
}
.lp-body .kwr-ing__row.is-product .kwr-ing__name { font-weight: 700; }
.lp-body .kwr-ing__prod {
  position: absolute;
  right: 14px;
  top: -14px;
  height: 138px;
  width: auto;
  max-width: 100px;
  object-fit: contain;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .16));
  pointer-events: none;
}

/* 手順の見出し行（見出し＋「動画で見る」ボタン） */
.lp-body .kwr-steps__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.lp-body .kwr-steps__head .kwr-h2 { margin-bottom: 0; }

.lp-body .kwr-video-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border: 2px solid var(--lp-red);
  border-radius: 999px;
  background: #fff;
  color: var(--lp-red);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  transition: background-color .15s, color .15s;
}
.lp-body .kwr-video-btn:hover { background: var(--lp-red); color: #fff; }
.lp-body .kwr-video-btn:focus-visible { outline: 3px solid rgba(228, 0, 43, .35); outline-offset: 2px; }

/* 手順 */
.lp-body .kwr-steps { margin: 0; padding: 0; list-style: none; }
.lp-body .kwr-steps__item {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  column-gap: 18px;
  padding-bottom: 26px;
}
.lp-body .kwr-steps__item:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 19px; top: 46px; bottom: 4px;
  width: 2px;
  background: var(--kwr-step-line);
}
.lp-body .kwr-steps__no {
  position: relative; z-index: 1;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--lp-red);
  color: #fff;
  font-size: 20px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.lp-body .kwr-steps__title { margin: 6px 0 4px; font-size: 20px; line-height: 1.3; font-weight: 700; color: #222; }
.lp-body .kwr-steps__text { margin: 0; font-size: 15px; line-height: 1.65; color: var(--kwr-text-sub); }

/* Featured product */
.lp-body .kwr-feat {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  margin-top: 30px;
  padding: 26px 30px;
  background: #F8F8F8;
  border-top: 3px solid var(--lp-red);
  border-radius: 12px;
}
.lp-body .kwr-feat + .kwr-feat { margin-top: 16px; }
.lp-body .kwr-feat__label { margin: 0; font-size: 30px; line-height: 1.1; font-weight: 700; color: var(--lp-red); }
.lp-body .kwr-feat__img { height: 132px; width: auto; max-width: 110px; object-fit: contain; }
.lp-body .kwr-feat__info { padding-left: 24px; border-left: 1px solid var(--kwr-line); align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
.lp-body .kwr-feat__name { margin: 0 0 6px; font-size: 19px; line-height: 1.3; font-weight: 700; }
.lp-body .kwr-feat__desc { margin: 0 0 16px; font-size: 14px; line-height: 1.55; color: var(--kwr-text-sub); }
.lp-body .kwr-feat__btn {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 24px;
  border-radius: 999px;
  background: var(--lp-red); color: #fff;
  font-size: 16px; font-weight: 700;
  transition: background-color .15s;
}
.lp-body .kwr-feat__btn:hover { background: #C40025; }

/* 材料・手順が未入力のときの本文（従来コンテンツ） */
.lp-body .kwr-legacy { margin-top: 40px; font-size: 16px; line-height: 1.8; }

/* ---------- More recipes to try ---------- */
.lp-body .kwr-more { margin-top: 64px; margin-bottom: 88px; }
.lp-body .kwr-more__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.lp-body .kwr-more__all { display: inline-flex; align-items: center; gap: 8px; color: var(--lp-red); font-size: 16px; font-weight: 700; white-space: nowrap; }
.lp-body .kwr-more__all:hover { text-decoration: underline; }

.lp-body .kwr-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin: 0; padding: 0; list-style: none;
}
.lp-body .kwr-card {
  display: block;
  height: 100%;
  border: 1px solid #E9E9E9;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
}
.lp-body .kwr-card:hover { box-shadow: 0 8px 22px rgba(0, 0, 0, .08); transform: translateY(-2px); }
.lp-body .kwr-card__img { display: block; position: relative; height: 0; padding-top: 62.5%; background: #F2F2F2; }
.lp-body .kwr-card__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lp-body .kwr-card__body { display: flex; flex-direction: column; gap: 8px; padding: 12px 16px 16px; }
.lp-body .kwr-card__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lp-body .kwr-card__title { font-size: 18px; line-height: 1.3; font-weight: 700; }
.lp-body .kwr-card__arrow {
  flex: none;
  width: 36px; height: 36px;
  border: 1.5px solid var(--lp-red);
  border-radius: 50%;
  color: var(--lp-red);
  display: flex; align-items: center; justify-content: center;
  transition: background-color .15s, color .15s;
}
.lp-body .kwr-card:hover .kwr-card__arrow { background: var(--lp-red); color: #fff; }

/* ---------- タブレット ---------- */
@media screen and (max-width: 1023px) {
  .lp-body .kwr-wrap { padding: 0 24px; }
  .lp-body .kwr-body { grid-template-columns: 1fr; }
  .lp-body .kwr-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- モバイル ---------- */
@media screen and (max-width: 767px) {
  .lp-body .kwr-wrap { padding: 0 16px; }
  .lp-body .kwr-crumb { padding: 14px 0 14px; }

  .lp-body .kwr-hero,
  .lp-body .kwr-hero--novideo { grid-template-columns: minmax(0, 1fr); row-gap: 14px; }
  .lp-body .kwr-hero__image,
  .lp-body .kwr-hero--novideo .kwr-hero__image { height: 0; padding-top: 75%; /* 3/4 */ }
  .lp-body .kwr-hero__video { width: min(100%, 300px); margin: 0 auto; }
  /* モバイルは 画像 → タイトル等 → 動画 の順（タイトルを先に見せる） */
  .lp-body .kwr-hero__image { order: 1; }
  .lp-body .kwr-hero__info { order: 2; padding-left: 0; margin-top: 6px; }
  .lp-body .kwr-hero__video { order: 3; margin-top: 10px; }
  .lp-body .kwr-title { font-size: 36px; }
  .lp-body .kwr-lead { font-size: 16px; }
  .lp-body .kwr-actions { flex-wrap: nowrap; }
  .lp-body .kwr-btn { flex: 1; min-width: 0; padding: 0 16px; height: 52px; }

  .lp-body .kwr-body { margin-top: 36px; gap: 36px; }
  .lp-body .kwr-ing { padding: 22px 18px 24px; border-radius: 16px; }
  .lp-body .kwr-ing__row { grid-template-columns: 84px minmax(0, 1fr); }
  .lp-body .kwr-ing__row.is-product { padding-right: 110px; }
  .lp-body .kwr-ing__prod { height: 118px; right: 8px; }

  .lp-body .kwr-feat { grid-template-columns: minmax(0, 1fr) auto; gap: 14px 16px; padding: 22px 18px; }
  .lp-body .kwr-feat__label { font-size: 24px; }
  .lp-body .kwr-feat__img { grid-column: 2; grid-row: 1; height: 96px; }
  .lp-body .kwr-feat__info { grid-column: 1 / -1; padding: 14px 0 0; border-left: 0; border-top: 1px solid var(--kwr-line); }

  .lp-body .kwr-more { margin-top: 48px; margin-bottom: 56px; }
  .lp-body .kwr-more__head { align-items: center; }
  .lp-body .kwr-more__all { font-size: 14px; }
  .lp-body .kwr-cards { gap: 12px; }
  .lp-body .kwr-card__title { font-size: 15px; }
  .lp-body .kwr-card__arrow { width: 30px; height: 30px; }
  .lp-body .kwr-card__body { padding: 10px 12px 12px; }
}

/* ---------- 動画モーダル（黒背景・中央表示） ---------- */
.lp-body .kwr-video-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}
.lp-body .kwr-video-modal[hidden] { display: none; }

.lp-body .kwr-video-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .92);
}

.lp-body .kwr-video-modal__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 900px;
  max-height: 100%;
}

.lp-body .kwr-video-modal__close {
  position: absolute;
  top: -48px;
  right: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, .12);
}
.lp-body .kwr-video-modal__close:hover { background: rgba(255, 255, 255, .22); }

.lp-body .kwr-video-modal__media {
  position: relative;
  width: 100%;
  max-height: 82vh;
  margin: 0 auto;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* MP4：横長のまま、画面に収まる大きさで中央表示 */
.lp-body .kwr-video-modal__media video {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 82vh;
}
/* YouTube（縦型Shorts想定）：9:16を保ちつつ、高さ優先で収める */
.lp-body .kwr-video-modal__media iframe {
  display: block;
  width: auto;
  height: min(82vh, 800px);
  aspect-ratio: 9 / 16;
  max-width: 100%;
  border: 0;
}

@media screen and (max-width: 767px) {
  .lp-body .kwr-video-modal { padding: 16px; }
  .lp-body .kwr-video-modal__close { top: -44px; right: -4px; }
  .lp-body .kwr-steps__head { flex-wrap: wrap; }
  .lp-body .kwr-video-btn { height: 36px; padding: 0 14px; font-size: 13px; }
}

/* ---------- 印刷 ---------- */
@media print {
  .lp-body .lp-header,
  .lp-body .lp-drawer,
  .lp-body .lp-drawer-bg,
  .lp-body .lp-footer,
  .lp-body .kwr-crumb,
  .lp-body .kwr-hero__video,
  .lp-body .kwr-video-btn,
  .lp-body .kwr-actions,
  .lp-body .kwr-feat,
  .lp-body .kwr-more { display: none !important; }

  .lp-body .kwr-wrap { max-width: none; padding: 0; }
  .lp-body .kwr-hero,
  .lp-body .kwr-hero--novideo { grid-template-columns: 200px minmax(0, 1fr); }
  .lp-body .kwr-hero--novideo .kwr-hero__image,
  .lp-body .kwr-hero__image { height: 0; padding-top: 100%; }
  .lp-body .kwr-title { font-size: 32px; }
  .lp-body .kwr-body { grid-template-columns: 1fr 1.6fr; margin-top: 24px; }
  .lp-body .kwr-ing__row.is-product { background: none; margin-bottom: 8px; padding-right: 4px; }
  .lp-body .kwr-ing__prod { display: none; }
  .lp-body .kwr-steps__item { break-inside: avoid; }
}
