/* ==== base.css ==== */
:root {
  --plum: #6c2654;
  --ink: #000;
  --gray3: #333;
  --font-mincho: "Zen Old Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --font-gothic: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--font-mincho);
  line-height: 1.5;
  overflow-x: hidden;
}

h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

img,
svg {
  display: block;
  max-width: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

section {
  position: relative;
  width: 100%;
}

/* スクロールで現れるフェード（元サイトの appear: 遅延 0.6s・長さ 1.2s。JS が有効なときだけ隠す） */
.js [data-rv] {
  opacity: 0;
  transition: opacity var(--rv-dur, 1.2s) cubic-bezier(0.4, 0.4, 0, 1) var(--rv-delay, 0.6s);
}

.js [data-rv].is-in {
  opacity: 1;
}

.js img[data-rv="blur"] {
  filter: blur(10px);
  transition:
    opacity 1.2s cubic-bezier(0.4, 0.4, 0, 1) 0.6s,
    filter 1.2s cubic-bezier(0.4, 0.4, 0, 1) 0.6s;
}

.js img[data-rv="blur"].is-in {
  filter: none;
}

@media (prefers-reduced-motion: reduce) {
  .js [data-rv],
  .js img[data-rv="blur"] {
    opacity: 1;
    filter: none;
    transition: none;
  }
}

/* ==== 01-hero.css ==== */
/* 01 ヒーロー
   元サイトの実測（geom/ref、20 幅）から、レンジごとの規則はこうなっている。
     PC（841 以上）   : 高さ 100vh。ロゴ幅 0.54×幅・左 0.05×幅・牛幅 0.234×幅・牛の左 0.716×幅（841〜1440 で同じ式）。
                        幅 1440 を超えると列が 1440 で止まり（ロゴ 777.6px・牛 336.96px）、列ごと中央に来る。
     中間（541〜840）  : 縦積み。高さは中身（上 50 ＋ タイトル ＋ 30 ＋ ロゴ ＋ 下 50）。左 0.2×幅・ロゴ幅 0.6×幅・タイトル幅 0.45×幅。牛なし。
     SP（540 以下）    : 同じ縦積み。左 0.075×幅・ロゴ幅 0.85×幅・タイトル幅 0.6375×幅。牛なし。
   どの量も切片が 0（幅に厳密に比例）なので、一次式 calc(Apx + (100vw − 下端幅px) × 傾き) の A が 傾き×下端幅 になり、
   割合（%・--col の何倍）でそのまま書ける。例: SP のロゴ幅 = 272 + (vw − 320) × 0.85 = 0.85 × vw（320 で 272、540 で 459）。
   縦（上 50・間 30・下 50、画像の縦横比）は定数なので、高さは幅の一次関数（SP: 465.7@320 → 696.5@540）になる。
   長さは「縦スクロールバーを除いた幅」基準にするため、セクションを inline-size コンテナにして cqw を使う（--u）。
   cqw が使えない古いブラウザは vw で代用。 */
.s01-section {
  --u: 1vw;
  --col: min(calc(100 * var(--u)), 1440px); /* 中身の列の幅（1440 を超えたら 1440 のまま中央） */
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  container-type: inline-size;
  background: #f3e3cf url("img/hero-bg.webp") 50% 50% / cover no-repeat;
}

@supports (width: 1cqw) {
  .s01-section {
    --u: 1cqw;
  }
}

/* ---- PC（841 以上）----
   縦はロゴを中央に置き、牛の下端をロゴの下端に揃える（flex-end）。
   列の中の割合: 左 5 ＋ ロゴ 54 ＋ 余白 12.6 ＋ 牛 23.4（合計 95。残り 5 は右余白）。 */
.s01-stage {
  display: flex;
  align-items: flex-end;
  width: var(--col);
  padding-left: calc(var(--col) * 0.05);
}

.s01-title-sp {
  display: none; /* 中間・SP だけ */
}

.s01-logo {
  flex: none;
  width: calc(var(--col) * 0.54);
}

.s01-logo-img {
  width: 100%;
  height: auto;
}

.s01-bull {
  flex: none;
  /* 牛の左端は 71.6、ロゴの右端は 5 + 54 = 59 なので、差の 12.6 を余白にする */
  margin-left: calc(var(--col) * 0.126);
  width: calc(var(--col) * 0.234);
  height: auto;
}

/* ---- 中間（541〜840）----
   縦積み。ステージ幅 = ロゴ幅 = 0.6×幅、左 0.2×幅。タイトルはロゴ幅の 75%（= 0.45×幅）。
   実測: 541 でロゴ 324.6・左 108.2、840 でロゴ 504・左 168。高さ 530.6@541 → 752@840。 */
@media (max-width: 840px) {
  .s01-section {
    display: block;
    height: auto;
  }

  .s01-stage {
    flex-direction: column;
    align-items: flex-start;
    gap: 30px;
    width: 60%;
    margin-left: 20%;
    padding: 50px 0;
  }

  .s01-title-sp {
    display: block;
    width: 75%;
    height: auto;
  }

  .s01-logo {
    width: 100%;
  }

  .s01-bull {
    display: none;
  }
}

/* ---- SP（540 以下）----
   同じ縦積みで、左右の余白が 7.5%（ステージ幅 0.85×幅）。タイトルは 0.85 × 75% = 0.6375×幅。
   実測: 320 でロゴ 272・左 24・高さ 465.7、540 でロゴ 459・左 40.5・高さ 696.5。 */
@media (max-width: 540px) {
  .s01-stage {
    width: 85%;
    margin-left: 7.5%;
  }
}

/* ==== 02-about.css ==== */
/* 02 比婆牛とは
   背景の航空写真は「画面に固定した層（cover）」を、セクションの形で切り抜いて見せる
   （.s02-section の clip-path ＋ ::before の position: fixed。background-attachment: fixed と違い iOS でも効く）。
   その上に黒 60% の膜（::after）。固定層は position: fixed なので、.s02-section 自身にはコンテナ（layout containment）や
   transform を付けない。

   元サイトの実測（geom/ref、20 幅）から、レンジごとの規則はこうなっている。
     PC（841 以上）  : 列の幅 min(100%, 1000px)。写真と文は同じ幅 (列 − 50)/2 の 2 列（間 50）。写真の高さ 350 固定。
                       block の中で文は縦中央。文字 見出し 28 / 題名 24 / 本文 16（行高 39.2 / 43.2 / 28.8）。
                       幅 1024 以上は列が 1000 で止まる（文の列 475）。841〜1023 は文の列が (幅 − 50)/2 に縮み、本文が自然に折り返す。
     中間（541〜840）: 列の幅 85%。写真と文は同じ幅 (0.85×幅 − 50)/2 の 2 列。写真の高さ 250 固定。block の中で文は縦中央。
                       文字 見出し 28 / 題名 20 / 本文 14（行高 39.2 / 36 / 25.2）。
     SP（540 以下）  : 列の幅 85%。写真（幅 100%・高さ 250）・題名（中央）・本文（左）の縦積み。
                       文字 見出し 20 / 題名 20 / 本文 14（行高 28 / 36 / 25.2）。
   縦位置（y）は流れで決まる（block の高さ = 写真の高さと文の高さの大きい方）ので、flex に任せている。
   本文の折り返しは手書きの <br> を使わず、列の幅だけで決める（元サイトの行数が全幅で一致することを確認済み）。
   幅の式は切片が 0 の割合（85%）と定数（50・250・350）だけなので、calc(Apx + (100vw − 下端幅px) × 傾き) の形にはならず、
   % と flex で書ける（例: 中間の列幅 = (0.85×vw − 50)/2 = 204.9@541 → 332@840）。 */
.s02-section {
  position: relative;
  clip-path: inset(0);
  padding: 150px 0;
  background-color: #1b1f1b;
  color: #fff;
}

.s02-section::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background: url("img/about-bg.webp") 50% 50% / cover no-repeat;
}

.s02-section::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(0, 0, 0, 0.6);
}

.s02-inner {
  position: relative;
  z-index: 2;
  width: min(100%, 1000px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 80px;
}

/* ---- PC（841 以上）----
   上余白 150 → 見出し 39.2 → 80 → block（写真 350）×3（間 80）→ 下余白 150（合計 1629.2）。 */
.s02-heading {
  font-family: var(--font-mincho);
  font-size: 28px;
  font-weight: 900;
  line-height: 39.2px;
  letter-spacing: 2.8px;
  text-align: center;
  white-space: nowrap;
  color: #fff;
}

.s02-block {
  display: flex;
  align-items: center;
  gap: 50px;
}

.s02-photo {
  flex: 1 1 0;
  min-width: 0;
  height: 350px;
  object-fit: cover;
  object-position: 50% 50%;
}

.s02-text {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.s02-title {
  font-family: var(--font-mincho);
  font-size: 24px;
  font-weight: 900;
  line-height: 43.2px;
  letter-spacing: 0;
  text-align: left;
  color: #fff;
}

.s02-body {
  font-family: var(--font-mincho);
  font-size: 16px;
  font-weight: 600;
  line-height: 28.8px;
  letter-spacing: 0;
  text-align: left;
  color: #fff;
}

/* ---- 中間（541〜840）----
   固定背景の層は PC と同じ（幅 100vw・左 0・高さ 100vh、cover・中央）。元サイトの実測（geom/fbg）で、200vw になるのは 540 以下だけ。 */
@media (max-width: 840px) {
  .s02-inner {
    width: 85%;
  }

  .s02-photo {
    height: 250px;
  }

  .s02-title {
    font-size: 20px;
    line-height: 36px;
  }

  .s02-body {
    font-size: 14px;
    line-height: 25.2px;
  }
}

/* ---- SP（540 以下）----
   縦積み。写真（幅 100% = 0.85×幅・高さ 250）→ 30 → 題名（中央・2 行）→ 10 → 本文。block の間は 80。
   固定背景の層は幅 200vw・左 -50vw・高さ 100vh（cover・中央）。実測: 540 で幅 1080・左 -270、390 で幅 780・左 -195。 */
@media (max-width: 540px) {
  .s02-section::before {
    inset: auto;
    top: 0;
    left: -50vw;
    width: 200vw;
    height: 100vh;
  }

  .s02-heading {
    font-size: 20px;
    line-height: 28px;
    letter-spacing: 2px;
  }

  .s02-block {
    flex-direction: column;
    align-items: stretch;
    gap: 30px;
  }

  .s02-photo {
    flex: none;
    width: 100%;
  }

  .s02-text {
    flex: none;
    width: 100%;
    gap: 10px;
  }

  .s02-title {
    text-align: center;
  }
}

/* ==== 03-intro.css ==== */
/* 03 キャンペーン概要
   レンジ（元サイトの実測。geom/ref）:
     PC       … 841 以上（841〜1023 も同じ作り。列は幅の中央に寄せるだけで縮まない）
     中間     … 541〜840（@media (max-width: 840px)。文字は PC と同じ。箱の幅が 85vw に縮む）
     SP       … 540 以下（@media (max-width: 540px)。文字が小さくなり、本文は左揃えで自然に折り返す）
   文字（font-size / line-height / letter-spacing）はレンジごとに固定。幅で変わるのは写真・リボンの箱・本文の箱の幅だけ。
   縦位置は flex ではなく流れ（上から順に積む）で決まるので、本文の行数が変わると下が自然に動く。 */
.s03-section {
  z-index: 0; /* 装飾（z-index:-1）をセクション背景の上・文字の下に収める。04 のリボンより下 */
  background: url("img/paper-bg.webp") 50% 0% / cover no-repeat;
}

/* 列。PC は幅 1000 の中央寄せ（幅が足りなければ 100%）。.s03-inner の上 150 + 中身 + 下 100 = 1074.6px */
.s03-col {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding-bottom: 100px;
  text-align: center;
}

/* リード・見出し・本文を包む箱。背景の装飾（::before）はこの箱いっぱい（元サイトの実測 geom/deco: 箱 = セクション上端〜本文の下端 + 100px。
   PC・中間 552.3px（本文 5 行）／541〜600 は 602.7px（本文 7 行）。SP は下が 50px）。本文の行数が変わると箱の高さも変わる。
   background-size は箱（列）の幅に対して 50% auto（541 以上。1000 の列なら 500px、841 なら 420.5px、541 なら 270.5px）／70% auto（540 以下） */
.s03-inner {
  position: relative;
  padding: 150px 0 100px;
}

.s03-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("img/intro-deco.svg") 50% 50% / 50% auto no-repeat;
  pointer-events: none;
}

.s03-lead {
  font-family: var(--font-mincho);
  font-size: 20px;
  font-weight: 600;
  line-height: 28px;
  letter-spacing: 2px;
  white-space: nowrap;
}

.s03-title {
  margin-top: 20px;
  font-family: var(--font-mincho);
  font-size: 28px;
  font-weight: 900;
  line-height: 39.2px;
  letter-spacing: 2.8px;
  white-space: nowrap;
}

/* 本文: 箱の幅は min(85vw, 1000px)（PC は 557px の行が余裕で収まる）。<br> で改行し、箱より長い行だけ折り返す（中間 541〜650 付近） */
.s03-body {
  width: min(85vw, 1000px);
  margin: 50px auto 0;
  font-family: var(--font-mincho);
  font-size: 14px;
  font-weight: 600;
  line-height: 25.2px;
  letter-spacing: 0.7px;
  text-align: center;
}

/* リボンと写真。リボンの箱（-5° 回転）は流れの中に置き、写真が負のマージンで食い込む（SP の 320 でリボンが 2 行になると写真も下がる）。
   リボンの箱: 幅 min(85vw, 600px)・高さ 110（中身の高さ）。本文の下端から 101.05px 下（= .s03-inner の下余白 100 + 1.05）、写真の上端は箱の上端から 59.95px 下 */
.s03-present {
  width: 100%;
}

.s03-ribbons {
  position: relative;
  z-index: 1; /* 写真の手前 */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3.2px;
  width: min(85vw, 600px);
  margin: 1.05px auto 0;
  transform: rotate(-5deg);
  transform-origin: 50% 50%;
}

.s03-ribbon {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  padding: 10.7px 10px; /* 枠 2.7px は Chrome が 2px に丸めるので、縦の padding で補い、箱の高さを 28 + 21.4 + 4 = 53.4（元の寸法）にする */
  background: #fff;
  border: 2.7px solid var(--plum);
  color: var(--plum);
  font-family: var(--font-gothic);
  font-size: 20px;
  font-weight: 800;
  line-height: 28px;
  letter-spacing: 2px;
  white-space: nowrap;
}

.s03-ribbon-1 {
  width: 383.5px;
}

.s03-ribbon-2 {
  width: 319.4px;
}

/* 写真（600x400 の比率）。幅 min(85vw, 500px) */
.s03-photo {
  width: min(85vw, 500px);
  height: auto;
  margin: -50.05px auto 0;
}

.s03-note {
  width: 500px;
  margin: 10px auto 0;
  font-family: var(--font-mincho);
  font-size: 10px;
  font-weight: 600;
  line-height: 18px;
  letter-spacing: 0.5px;
  text-align: left;
  white-space: nowrap;
}

/* SP 専用の改行（PC・中間では出さない） */
.s03-sp-br {
  display: none;
}

/* ===== 中間（541〜840）: PC と同じ作り（装飾も箱の幅の 50% auto のまま）。
   リボンの箱は 85vw だが 700 以上は 595px で止まる（= 700 × 0.85。元サイトの 840 でリボンが PC より 2px 右に寄る） ===== */
@media (max-width: 840px) {
  .s03-ribbons {
    width: min(85vw, 595px);
  }
}

/* ===== SP（320〜540）。箱の幅は vw、縦の長さと文字は px ===== */
@media (max-width: 540px) {
  /* 箱 = 上 80 + 中身 + 下 50（装飾の箱の高さは 394.3@540 / 444.7@390）。装飾は箱の幅の 70% */
  .s03-inner {
    padding: 80px 0 50px;
  }

  .s03-inner::before {
    background-size: 70% auto;
  }

  .s03-lead {
    font-size: 16px;
    line-height: 22.4px;
    letter-spacing: 1.6px;
  }

  .s03-title {
    margin-top: 20px;
    font-size: 20px;
    line-height: 28px;
    letter-spacing: 2px;
  }

  /* 本文は幅 90vw の中で左揃え・自然に折り返す（PC 用の <br> は消す） */
  .s03-body {
    width: 90vw;
    margin-top: 40px;
    text-align: left;
  }

  .s03-pc-br {
    display: none;
  }

  .s03-sp-br {
    display: inline;
  }

  /* リボンの箱: 幅 90vw・高さ 105.5（47.74 + 10 + 47.74）。本文の下端から 51.5px 下（= .s03-inner の下余白 50 + 1.5）。写真の上端は箱の下端から 20.3px 上 */
  .s03-ribbons {
    gap: 10px;
    width: 90vw;
    margin-top: 1.5px;
  }

  /* 1 枚目は 312px 幅。箱（90vw）が狭い 320 付近では箱いっぱいになり、文字が 2 行に折り返す（その分、箱と写真が下がる） */
  .s03-ribbon {
    padding-block: 10.67px; /* 箱の高さ = 22.4 + 21.34 + 4 = 47.74（元の 22.4 + 20 + 5.34）。2 行になると 22.4 だけ増える */
    border-width: 2.67px;
    font-size: 16px;
    line-height: 22.4px;
    letter-spacing: 1.6px;
    white-space: normal;
  }

  .s03-ribbon-1 {
    width: 312px;
  }

  .s03-ribbon-2 {
    width: 260px;
  }

  /* 写真は幅 81vw */
  .s03-photo {
    width: 81vw;
    margin-top: -20.3px;
  }

  .s03-note {
    width: 80vw;
  }
}

/* ==== 04-steps.css ==== */
/* 04 参加方法
   レンジ（元サイトの実測。geom/ref）:
     PC       … 841 以上。3 列（ピッチ 350px・アイコン 160px）を幅の中央に置く。841〜1049 では列が収まらず左右がはみ出す（縮まない）
     中間     … 541〜840（@media (max-width: 840px)）。文字は PC と同じ。箱の幅 85vw の中で 350px の列を折り返す（840 は 2+1、それ以下は 1 列）
     SP       … 540 以下（@media (max-width: 540px)）。縦 1 列。左にアイコン、右に見出し＋説明。アイコン幅は幅の一次関数
   見出しとリボンが前のセクション（03）の下端に約 22px 重なる作りは全レンジ共通。 */
.s04-section {
  /* 見出しのリボンがセクション上端より上にはみ出し、03 の下端に重なる */
  overflow-x: clip; /* 841〜1049 では 3 列の行が左右にはみ出す。横だけ切る（縦は visible のまま＝見出しのリボンが上へはみ出す） */
  overflow-y: visible;
  z-index: 1;
  padding: 103px 0 120px; /* 高さ = 103 + 347.7（最も高い列）+ 120 = 570.7px */
  background: url("img/steps-bg.webp") 50% 50% / cover no-repeat;
  color: #fff;
}

/* 見出しリボン（404x55、上端から -22px）。文字はリボンの中で中央（文字の上端はセクション上端の -14.1px） */
.s04-heading {
  position: absolute;
  left: 50%;
  top: -22px;
  width: 404px;
  height: 55px;
  margin-left: -202px;
  padding-top: 7.9px;
  background: url("img/steps-ribbon.svg") 50% 50% / cover no-repeat;
}

.s04-title {
  font-family: var(--font-mincho);
  font-size: 28px;
  font-weight: 900;
  line-height: 39.2px;
  letter-spacing: 2.8px;
  text-align: center;
  white-space: nowrap;
}

/* 3 列 × 350px（中心間 350）。幅 1050 の行を画面の中央に置く（画面が 1050 より狭いと左右にはみ出す＝元サイトと同じ）。
   列は上下中央揃え（アイコンの高さの違いを吸収） */
.s04-steps {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 1050px;
  margin: 0 0 0 calc(50% - 525px);
}

.s04-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: none;
  width: 350px;
}

.s04-step-img {
  width: 160px;
  height: auto;
}

.s04-step-body {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.s04-step-title {
  margin-top: 20px;
  font-family: var(--font-gothic);
  font-size: 18px;
  font-weight: 800;
  line-height: 32.4px;
  letter-spacing: 0.9px;
  text-align: center;
  white-space: nowrap;
}

.s04-step-text {
  width: 250px;
  margin-top: 19.9px;
  font-family: var(--font-gothic);
  font-size: 12px;
  font-weight: 600;
  line-height: 21.6px;
  letter-spacing: 0.6px;
  text-align: left;
  white-space: nowrap;
}

/* ===== 中間（541〜840）: 幅 85vw の箱の中で 350px の列を折り返す。行の間隔 90px。
   箱の幅が 700 以上（vw ≥ 824）なら 2 列（840 で 2+1）、それ未満は 1 列 ===== */
@media (max-width: 840px) {
  .s04-steps {
    flex-wrap: wrap;
    row-gap: 90px;
    width: 85vw;
    margin: 0 auto;
  }
}

/* ===== SP（320〜540）: 縦 1 列。各ステップは [アイコン][15px][220px の文字] を中央に置く ===== */
@media (max-width: 540px) {
  .s04-section {
    padding: 78px 0 99.9px; /* 高さ = 78 + 159 + 60 + 137.4 + 60 + 159 + 99.9 = 753.3px（390） */
  }

  /* 見出しリボン 300x40（上端から -22px）。文字はリボンの中で中央（文字の上端は -16px） */
  .s04-heading {
    width: 300px;
    height: 40px;
    margin-left: -150px;
    padding-top: 6px;
  }

  .s04-title {
    font-size: 20px;
    line-height: 28px;
    letter-spacing: 2px;
  }

  .s04-steps {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: flex-start;
    row-gap: 60px;
    width: 100%;
    margin: 0;
  }

  .s04-step {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    width: 100%;
  }

  /* アイコン幅 = 88.7 + (vw - 320) × 0.369（320 で 88.7、390 で 114.5、540 で 169.9。傾き = (169.9 - 88.7) / (540 - 320)）。高さは SVG の比率で決まる */
  .s04-step-img {
    flex: none;
    width: calc(88.7px + (100vw - 320px) * 0.369);
  }

  /* 文字の箱は幅 220 固定。アイコンとの間 15px。320 ではアイコンと合わせて 323.7 となり、中央寄せのまま左右に 1.9px ずつはみ出す（セクションの overflow-x: clip で切る。切らないと画面幅が広がって固定バナーの位置がずれる） */
  .s04-step-body {
    flex: none;
    align-items: stretch;
    width: 220px;
    margin-left: 15px;
  }

  .s04-step-title {
    margin-top: 0;
    font-size: 16px;
    line-height: 28.8px;
    letter-spacing: 0.8px;
  }

  /* 説明は幅 220 の中で自然に折り返す（PC 用の <br> は消す） */
  .s04-step-text {
    width: auto;
    margin-top: 15px;
    white-space: normal;
  }

  .s04-pc-br {
    display: none;
  }
}

/* ==== 05-stores.css ==== */
/* 05 参加店舗・地図
   レンジ（元サイトの実測 geom/ref による。文字はレンジごとに固定、幅に応じて変わるのは列・箱の幅と高さ）:
     PC（1024 以上）と小 PC（841〜1023）… 1 つのレイアウト。カード列・地図は min(100vw, 1000px)（1000 を超えると 1000 固定で中央）
     中間（541〜840）… 4 列。カード列・地図・注記は 85vw
     SP（320〜540）… 2 列。カード列と注記は 85vw、地図は 90vw
   縦位置は流れ（折り返し・行の高さ）で決まるので、flex / grid に任せる。
   縦の並び（PC・セクション内 y）: 見出し 100 → 注記 214.6 → カード 284.2〜2779.2 → 地図見出し 2879.2 → 地図 2968.4〜3418.4 → ボタン 3468.4〜3520.8 → 下余白 100 */
.s05 {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 100px 0;
  background: url("img/paper-bg.webp") 50% 0% / cover no-repeat;
  color: var(--ink);
  font-family: var(--font-mincho);
}

.s05-title,
.s05-maptitle {
  width: 100%;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 2.8px;
  text-align: center;
  white-space: nowrap;
}

.s05-title {
  line-height: 44.8px;
}

/* 注記: PC・小 PC は 1 行（48 字 x 15.4 = 739.2px）。中間・SP は下で折り返す */
.s05-note {
  margin-top: 25px;
  width: 100%;
  font-size: 14px;
  font-weight: 900;
  line-height: 19.6px;
  letter-spacing: 1.4px;
  text-align: center;
  white-space: nowrap;
}

/* 店舗カード: 4 列・列間と行間 10px、カードは 4:5。列全体の幅 = min(100vw, 1000px)
   カード幅 = (列全体 − 30) ÷ 4（1024 以上で 242.5、900 で 217.5、841 で 202.75） */
.s05-stores {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  width: 1000px;
  max-width: 100%;
  margin-top: 50px;
}

/* 30 枚 = 4 列 x 7 行 + 最終行 2 枚。最終行は中央寄せ（2 列目・3 列目） */
.s05-store:nth-child(29) {
  grid-column-start: 2;
}

/* カード（白地の箱）に影。元サイトの実測: rgba(0,0,0,0.2) 4px 4px 6px 0（全レンジ共通） */
.s05-store {
  background: #fff;
  box-shadow: rgba(0, 0, 0, 0.2) 4px 4px 6px 0;
}

.s05-store img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
}

.s05-maptitle {
  margin-top: 100px;
  line-height: 39.2px;
}

/* 地図枠（Google マイマップの埋め込み）。幅 min(100vw, 1000px)・高さ 450 固定。#eee は読み込み前の背景 */
.s05-map {
  width: 1000px;
  max-width: 100%;
  height: 450px;
  margin-top: 50px;
  background: #eee;
}

.s05-map__frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.s05-guide {
  display: block;
  box-sizing: border-box;
  width: 280px;
  height: 52.4px;
  margin-top: 50px;
  padding: 15px 0;
  border-radius: 32px;
  background: var(--plum);
  box-shadow: 2px 2px 5px 0 rgb(29, 4, 20);
  font-size: 16px;
  font-weight: 900;
  line-height: 22.4px;
  text-align: center;
  color: #fff;
  white-space: nowrap;
}

/* ---- 中間（541〜840）----
   文字は PC と同じ（28px・14px・16px）。注記は 85vw の枠で中央揃えのまま折り返す（2 行）。
   カード列・地図の幅 = 85vw（x = 7.5vw）。カード幅 = (85vw − 30) ÷ 4
     = 107.5px + (100vw − 541px) * 0.2124   （541 で 107.5、600 で 120、700 で 141.3、840 で 171。傾き = (171 − 107.5) ÷ (840 − 541)）
   縦の並び（セクション内 y）は PC と同じ余白で、元サイトの実測と一致する（注記 214.6、カード 303.8〜） */
@media (max-width: 840px) {
  .s05-note {
    width: 85%;
    white-space: normal;
  }

  .s05-stores {
    width: 85%;
    max-width: none;
  }

  .s05-map {
    width: 85%;
    max-width: none;
  }
}

/* ---- SP（320〜540）----
   文字は固定（見出し 20px・注記 12px・ボタン 16px）。
   カード列 = 85vw・2 列・間隔 10px。カード幅 = (85vw − 10) ÷ 2
     = 131px + (100vw − 320px) * 0.425   （320 で 131、360 で 148、390 で 160.75、430 で 177.75、480 で 199、540 で 224.5。傾き = (224.5 − 131) ÷ (540 − 320)）
   カード高さ = 幅 x 1.25。注記は 85vw の枠で左揃え（x = 7.5vw）、折り返しは枠の幅で決まる（320・360 は 3 行、それ以上は 2 行）。
   地図の幅 = 90vw（x = 5vw）、高さ 450 固定。縦位置は流れで決まる（NONLIN）。 */
@media (max-width: 540px) {
  .s05 {
    padding: 80px 0;
  }

  .s05-title,
  .s05-maptitle {
    font-size: 20px;
    letter-spacing: 2px;
  }

  .s05-title {
    line-height: 32px;
  }

  .s05-note {
    margin-top: 15px;
    font-size: 12px;
    line-height: 16.8px;
    letter-spacing: 1.2px;
    text-align: left;
  }

  .s05-stores {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 40px;
  }

  .s05-store:nth-child(29) {
    grid-column-start: auto;
  }

  .s05-maptitle {
    margin-top: 80px;
    line-height: 28px;
  }

  .s05-map {
    width: 90%;
    margin-top: 40px;
  }

  .s05-guide {
    width: 264px;
    margin-top: 40px;
    box-shadow: rgb(39, 5, 27) 2px 2px 5px 0;
    font-weight: 500;
  }
}

/* ==== 06-contact.css ==== */
/* 06 お問い合わせ（PC・小 PC・中間: 高さ 397.8px、折り返しが増えると 420.2px）
   背景は写真そのものを brightness(0.5) で暗くしたもの（元サイトは黒の膜ではなくフィルタ）。
   レンジ（元サイトの実測 geom/ref による。文字はレンジごとに固定、縦位置は流れで決まる）:
     PC（841 以上）… 見出し 28px・説明 16px。説明は 1 行（nowrap）
     中間（541〜840）… PC と同じ文字。説明は画面幅（100vw）の枠で折り返す（541 は 2 行、600 以上は 1 行）
     SP（320〜540）… 見出し 20px（行高 36）・説明 14px（行高 19.6）。見出し・説明は 85vw の枠で折り返す
   縦の並び（セクション内 y）: 見出し 100 → 説明 +50 → メール +50.6 → 下余白 99.4 */
.s06 {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 100px 0 99.4px;
  color: #fff;
  font-family: var(--font-gothic);
}

.s06::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("img/contact-bg.webp") 50% 50% / cover no-repeat;
  filter: brightness(0.5);
}

.s06-title {
  width: 100%;
  font-size: 28px;
  font-weight: 800;
  line-height: 50.4px;
  text-align: center;
  white-space: nowrap;
}

.s06-lead {
  margin-top: 50px;
  width: 100%;
  font-size: 16px;
  font-weight: 600;
  line-height: 22.4px;
  text-align: center;
  white-space: nowrap;
}

/* アイコン 24x25 ＋ 15px ＋ 文字枠 219px。行全体（幅 258）で中央 */
.s06-mail {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-top: 50.6px;
  color: #fff;
}

.s06-mail__icon {
  width: 24px;
  height: 25px;
  flex: none;
}

.s06-mail__text {
  display: block;
  width: 219px;
  margin-top: 0.7px;
  font-size: 16px;
  font-weight: 600;
  line-height: 22.4px;
  /* 代替フォントは欧文が元より広いので、元の文字枠 219px に収まるよう詰める（26 字 x -0.57px。sweep で測った幅 222.9px を 219px に合わせた） */
  letter-spacing: -0.57px;
  text-align: center;
  white-space: nowrap;
}

/* ---- 中間（541〜840）---- 説明だけ折り返す（541 で 2 行 → 高さ 420.2、600 以上は 1 行） */
@media (max-width: 840px) {
  .s06-lead {
    white-space: normal;
  }
}

/* ---- SP（320〜540）----
   見出し・説明は 85vw の枠（左右 7.5vw）で中央揃えのまま折り返す。
   見出し: 320・360 は 2 行（高さ 72、1 行目 13・15 字）、375 以上は 1 行（320.4px が 85vw に収まる）。説明: 全幅 2 行。
   高さ = 320・360 で 436.2、390 以上で 400.2。 */
@media (max-width: 540px) {
  .s06-title,
  .s06-lead {
    width: 85%;
    white-space: normal;
  }

  .s06-title {
    font-size: 20px;
    line-height: 36px;
  }

  .s06-lead {
    font-size: 14px;
    line-height: 19.6px;
  }
}

/* ==== 07-link.css ==== */
/* 07 比婆牛振興会リンク（PC・小 PC・中間: 高さ 206.1px、SP: 191.4px）
   元サイトの実測では、全レンジでロゴ・文字は固定寸法（幅に応じて変わるのは中央寄せの位置だけ）。
   PC・中間: ロゴ 300x71.5・注記 14px。SP（540 以下）: ロゴ 250x59.6・注記 12px */
.s07 {
  display: flex;
  justify-content: center;
  padding: 50px 0 50.5px;
  background: #e3e1e2;
  font-family: var(--font-mincho);
}

.s07-link {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.s07-logo {
  width: 300px;
  height: 71.5px;
}

.s07-caption {
  display: block;
  margin-top: 14.5px;
  font-size: 14px;
  font-weight: 900;
  line-height: 19.6px;
  color: var(--gray3);
  white-space: nowrap;
}

/* ---- SP（320〜540）---- */
@media (max-width: 540px) {
  .s07 {
    padding: 50px 0 50.4px;
  }

  .s07-logo {
    width: 250px;
    height: 59.6px;
  }

  .s07-caption {
    margin-top: 14.6px;
    font-size: 12px;
    line-height: 16.8px;
  }
}

/* ==== 08-copyright.css ==== */
/* 08 コピーライト（PC・小 PC・中間: 高さ 29.6px、SP: 24px）
   元サイトの実測では、全レンジで文字は固定（PC・中間 14px、SP 10px）。中央寄せの位置だけが幅で変わる。 */
.s08 {
  padding: 5px 0;
  background: var(--plum);
  color: #fff;
  font-family: var(--font-gothic);
}

.s08-copy {
  font-size: 14px;
  font-weight: 600;
  line-height: 19.6px;
  /* 代替フォント（Noto Sans JP）は欧文が元（A1ゴシック M）より広いので、元の行幅 386.9px に合わせて詰める（59 字 x -0.22px） */
  letter-spacing: -0.22px;
  text-align: center;
  white-space: nowrap;
}

/* ---- SP（320〜540）---- 文字 10px・行高 14px・行幅 278.4px */
@media (max-width: 540px) {
  .s08-copy {
    font-size: 10px;
    line-height: 14px;
    letter-spacing: -0.12px;
  }
}

/* ==== 09-insta.css ==== */
/* 09 Instagram 固定バナー（画面右下に固定）
   レンジ（元サイトの実測。geom/ref の fixed: 行）:
     PC・中間 … 541 以上。281.39x142.7、右端に密着・下から 30px（x = 幅 - 281.39、y = 画面高 - 172.7）
     SP       … 540 以下（@media (max-width: 540px)）。125x75.17、右下に密着（下から 0）。アバターと縦の NEWS は出ない
   固定にするのは <a>（.s09-banner）そのもの。セクション（.s09-section）は高さ 0 の入れ物。 */
.s09-section {
  height: 0;
}

/* 左側だけ角丸の白いカード。幅 = 10 + 16.8 + 5 + 100 + 15 + 116.6 + 18 = 281.4、高さ = 16 + 110.7 + 16 = 142.7 */
.s09-banner {
  position: fixed;
  right: 0;
  bottom: 30px;
  z-index: 100;
  display: flex;
  align-items: center;
  width: 281.4px;
  padding: 16px 18px 16px 10px;
  background: #fff;
  border-radius: 12px 0 0 12px;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
  color: var(--gray3);
  font-family: var(--font-gothic);
  font-weight: 800;
}

/* 縦向きの「NEWS」（-90° 回転）。回転後の見た目の幅 16.8px を場所として確保する */
.s09-news {
  position: relative;
  flex: none;
  width: 16.8px;
  height: 41.7px;
  margin-right: 5px;
}

.s09-news-text {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 41.7px;
  height: 16.8px;
  margin: -8.4px 0 0 -20.85px;
  font-size: 12px;
  line-height: 16.8px;
  letter-spacing: 1.2px;
  text-align: center;
  white-space: nowrap;
  transform: rotate(-90deg);
}

.s09-avatar {
  flex: none;
  width: 100px;
  height: 110.7px;
  margin-right: 15px;
}

.s09-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: none;
  width: 116.6px;
}

.s09-copy {
  display: block;
  font-size: 12px;
  line-height: 21.6px;
  text-align: center;
  white-space: nowrap;
}

.s09-button {
  display: block;
  width: 116.6px;
  height: 20px;
  margin-top: 5.1px;
  padding-top: 2.7px;
  border-radius: 12px;
  background: var(--plum);
  color: #fff;
  font-size: 10px;
  line-height: 14px;
  text-align: center;
  white-space: nowrap;
}

/* ===== SP: 125x75.2 の白い箱が右下に密着。アバターと縦の NEWS は出さない ===== */
@media (max-width: 540px) {
  .s09-banner {
    bottom: 0;
    width: 125px;
    padding: 11.6px 0 12px; /* 高さ = 11.6 + 32.4 + 3.4 + 15.8 + 12 = 75.2px */
    border-radius: 20px 20px 0 20px;
  }

  .s09-news,
  .s09-avatar {
    display: none;
  }

  .s09-side {
    width: 100%;
  }

  .s09-copy {
    font-size: 9px;
    line-height: 16.2px;
  }

  .s09-button {
    width: 90.8px;
    height: 15.8px;
    margin-top: 3.4px;
    padding-top: 2.4px;
    border-radius: 32px;
    font-size: 7px;
    line-height: 9.8px;
  }
}

/* ==== 10-store-dialog.css ==== */
/* Store dialogs: modal/{pc,mid840,mid700,sp}/modal-0.json rows[] are
   viewport-root coordinates. PC=1440, mid=840/700, SP=390.
   Only the explicitly requested card reset uses the existing s05 namespace. */
.s05-card {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 0;
  appearance: none;
}

.sdlg {
  position: fixed;
  inset: 0;
  z-index: 110; /* 元サイトでは暗幕が Instagram バナー（z-index 100）も覆う */
  color: #333;
  font-family: var(--font-gothic);
  font-size: 14px;
  font-weight: 500; /* A1 Gothic R replacement; URL uses M=600 below. */
  line-height: 25.2px;
  letter-spacing: normal;
}
.sdlg[hidden] { display: none; }
.sdlg__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, .16);
}
.sdlg__scroller {
  position: absolute;
  inset: 20px auto 20px 50%; /* row 3: y20, h=viewport height - 40 */
  transform: translateX(-50%);
  width: 500px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: none;
  /* The scroller fills the viewport in mid/SP; empty sides reach backdrop. */
  pointer-events: none;
}
.sdlg__scroller::-webkit-scrollbar { display: none; }
.sdlg__panel,
.sdlg__close { pointer-events: auto; }
.sdlg__panel {
  width: 500px;
  margin: 0 auto;
  padding: 80px 62.5px; /* rows 4/5: x470/532.5, y20/100 */
  background: #f4f0ec;
  box-shadow: 0 6px 15px rgba(0, 0, 0, .2);
}
.sdlg__h {
  margin: 0 0 30px;
  font-family: var(--font-mincho);
  font-size: 20px;
  font-weight: 900;
  line-height: 28px;
  text-align: center;
}
.sdlg__card { width: 100%; height: auto; aspect-ratio: 4 / 5; }
.sdlg__desc,
.sdlg__name,
.sdlg__message { margin-top: 15px; }
.sdlg__shop,
.sdlg__chef { margin-top: 50px; } /* rows 10→12, 27→29 */
.sdlg__photo { width: 100%; height: 300px; object-fit: cover; }
.sdlg__name {
  font-family: var(--font-mincho);
  font-size: 16px;
  font-weight: 900;
  line-height: 25.6px;
}
.sdlg__intro,
.sdlg__title-name { margin-top: 5px; }
.sdlg__contact { margin-top: 15px; }
.sdlg__contact li + li { margin-top: 5px; }
.sdlg__contact a {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  width: fit-content;
  max-width: 100%;
  min-height: 20px;
  line-height: 19.6px;
}
.sdlg__icon { flex: none; width: 20px; height: 20px; }
.sdlg__contact span { min-width: 0; overflow-wrap: anywhere; }
.sdlg__contact li:last-child { font-weight: 600; }
.sdlg__portrait {
  width: 225px; /* row31: 60% of column width */
  height: 225px;
  margin: 0 auto;
  border-radius: 50%;
  object-fit: fill;
}
.sdlg__title-name {
  font-family: var(--font-mincho);
  font-size: 16px;
  font-weight: 900;
  line-height: 22.4px;
  text-align: right;
}
.sdlg__close {
  display: block;
  width: 100px;
  height: auto;
  margin: 30px auto 0; /* PC panel ends y1882, button starts y1912 */
  padding: 30px;
  border-radius: 50%;
  background: #f4f0ec;
}
.sdlg__close-icon { width: 40px; height: auto; aspect-ratio: 17 / 18; }
.sdlg__panel:focus { outline: none; }
.s05-card:focus-visible,
.sdlg__contact a:focus-visible,
.sdlg__close:focus-visible { outline: 2px solid #6c2654; outline-offset: -3px; }

/* 541–840: row4 w490@700,588@840; row5 column367.5→441.
   Slopes: panel .7, padding .0875, column .525, card height .65625,
   portrait .315. Photo height and type remain fixed in both measurements. */
@media (max-width: 840px) {
  .sdlg__scroller { width: 100%; }
  .sdlg__panel {
    width: calc(490px + (100vw - 700px) * .7);
    padding-right: calc(61.25px + (100vw - 700px) * .0875);
    padding-left: calc(61.25px + (100vw - 700px) * .0875);
  }
  .sdlg__portrait {
    width: calc(220.5px + (100vw - 700px) * .315);
    height: calc(220.5px + (100vw - 700px) * .315);
  }
}

/* <=540: row4 w370.5@390 = .95 viewport; row5 w296.4 = .8 panel;
   row31 w177.8 = .6 column. SP has one measured width: slopes below
   extrapolate those observed proportions (not a second SP measurement).
   Relative to PC, padding y80→60, photo h300→250, close image w40→30. */
@media (max-width: 540px) {
  .sdlg__panel {
    width: calc(370.5px + (100vw - 390px) * .95);
    padding: 60px calc(37.05px + (100vw - 390px) * .095);
  }
  .sdlg__photo { height: 250px; }
  .sdlg__portrait {
    width: calc(177.84px + (100vw - 390px) * .456);
    height: calc(177.84px + (100vw - 390px) * .456);
  }
  .sdlg__close { width: 90px; }
  .sdlg__close-icon { width: 30px; }
}
/* No open/close animation; reduced motion has the same immediate behavior. */
@media (prefers-reduced-motion: reduce) {
  .sdlg, .sdlg * { animation: none; transition: none; scroll-behavior: auto; }
}
