/*
 Theme Name: g-ri
 Theme URI: https://example.com/g-ri
 Author: Your Name
 Author URI: https://example.com
 Description: 法衣シミュレーターサイト用のミニマルテーマ「g-ri」
 Version: 1.0.0
 Text Domain: g-ri
*/

/* 12カラム・24pxガター（1440px時: 1カラム=98px） */
:root {
  --grid-cols: 12;
  --grid-gutter: 24px;
  --grid-col: 98px; /* (1440 - 11*24) / 12 */
  --layout-max: 1440px;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  background-color: #fdfce6;
  color: #333;
}

/* 背景模様を全ページ共通で opacity 制御 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("assets/images/bg-lotus_rep.webp");
  background-repeat: repeat;
  background-size: 1800px auto;
  background-position: center top;
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
}

a {
  color: #7b2d7b;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* 管理バー表示時はデスクトップのヘッダー位置を 32px 下にずらす */
@media (min-width: 1024px) {
  body.admin-bar .site-header {
    top: calc(90px + 32px);
  }
}

.site-header {
  position: fixed;
  top: 90px;
  /* 右から2番目のガター左端に揃える（グリッド幅Wに追従） */
  left: calc(
    50% +
      (min(100vw - 2 * var(--grid-gutter), var(--layout-max)) / 3) -
      (var(--grid-gutter) / 6)
  );
  transform: none;
  /* 右から2番目ガター左端〜最右ガター右端までの幅 ( (W + G) / 6 ) */
  width: calc(
    (min(100vw - 2 * var(--grid-gutter), var(--layout-max)) + var(--grid-gutter)) /
      6
  );
  padding: 0;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.site-header__inner {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 128px; /* SVGとメニューの間隔 128px */
}

.site-header__logo-link {
  display: block;
  text-decoration: none;
}

.site-header__logo-vertical {
  display: block;
  width: 136px;
  height: auto;
}

.site-header__logo-horizontal {
  display: none;
  height: auto;
}

.site-header__subnav {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%; /* 親の計算済み幅いっぱいを使う */
}

.site-header__subnav-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 10px 18px;
  border-radius: 999px;
  background-color: #000;
  color: #fff;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: background-color 0.18s ease, color 0.18s ease,
    box-shadow 0.18s ease, transform 0.1s ease;
}

.site-header__subnav-item:hover {
  background-color: #fff;
  color: #000;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.24);
  transform: translateY(-1px);
}

/* デスクトップで画面高が 1024px 以下のとき。
   縦ロゴ＋ピルボタンは fixed のまま下へ伸び、トップは overflow:hidden で
   スクロールできないため、低いウィンドウだと上下が切れる。
   並びは維持し、列をビューポート内で中央に寄せ、足りない分だけ間隔とロゴを縮める。
   1025px 以上の高さは top: 90px / gap: 128px / ロゴ幅 136px のまま。 */
@media (min-width: 1024px) and (max-height: 1024px) {
  .site-header {
    --header-gap: clamp(32px, calc(100vh - 780px), 128px);
    top: 28px;
    bottom: 56px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    /* 伸ばした箱が右列のクリックを奪わない。中身は inner 側で受ける */
    pointer-events: none;
  }

  body.admin-bar .site-header {
    top: 60px;
  }

  .site-header__inner {
    gap: var(--header-gap);
    max-height: 100%;
    min-height: 0;
  }

  .site-header__logo-vertical {
    /* viewBox 115.74×337.92。max-height だけだと幅 136px のまま縦につぶれる */
    width: min(136px, calc((100vh - 28px - 56px - var(--header-gap) - 230px) * 115.74 / 337.92));
    height: auto;
  }
}

/* ハンバーガーボタン（デスクトップ・タブレットでは非表示） */
.site-header__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  gap: 5px;
}

.site-header__hamburger-line {
  display: block;
  width: 22px;
  height: 1.5px;
  background-color: #333;
  border-radius: 2px;
  transform-origin: center;
  transition:
    transform 0.38s cubic-bezier(0.4, 0, 0.2, 1),
    opacity   0.28s ease,
    width     0.28s ease;
}

/* モバイルドロワー（デスクトップ・タブレットでは非表示） */
.site-header__drawer {
  display: none;
}

.site-footer {
  position: fixed;
  bottom: 16px;
  left: 0;
  right: 0;
  padding: 10px 24px;
  background-color: transparent;
  text-align: center;
  font-size: 16px;
  color: #333;
  letter-spacing: 0.06em;
  pointer-events: none;
  z-index: 5;
}

.site-main {
  padding: 0;
}

/* ==============================
   カタログページ
   ============================== */

.catalog {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 120px 24px 80px;
  box-sizing: border-box;
}

.catalog__inner {
  width: 100%;
  max-width: 480px;
}

.catalog__title {
  margin: 0 0 12px;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: #222;
}

.catalog__lead {
  margin: 0 0 32px;
  font-size: 14px;
  letter-spacing: 0.06em;
  color: #555;
}

.catalog__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.catalog__link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  width: 100%;
  padding: 18px 36px;
  border-radius: 999px;
  background-color: #000;
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-sizing: border-box;
  transition: background-color 0.18s ease, color 0.18s ease,
    box-shadow 0.18s ease, transform 0.1s ease;
}

.catalog__link:hover {
  background-color: #fff;
  color: #000;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.24);
  transform: translateY(-1px);
}

.catalog__link-title {
  font-size: 15px;
  letter-spacing: 0.08em;
}

.catalog__link-meta {
  font-size: 12px;
  letter-spacing: 0.06em;
  opacity: 0.72;
}

/* ==============================
   トップページ レイアウト（1440・12カラム24pxガター）
   ============================== */

.landing {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  justify-content: center;
  overflow: hidden;
  /* 背景色・模様は body に任せる */
  background-color: transparent;
  color: #333;
}


.landing__bg {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100%;
  max-width: var(--layout-max);
  transform: translateX(-50%);
  /* 背景は body に適用しているのでここでは透明レイヤーとして使用 */
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}

.landing__inner {
  width: 100%;
  /* content幅をちょうど1440pxにして、その外側に左右24pxの余白を付ける */
  max-width: calc(var(--layout-max) + var(--grid-gutter) * 2);
  margin-inline: auto;
  padding: 0 var(--grid-gutter);
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}

.landing__grid {
  display: grid;
  /* 12カラム幅をコンテナ幅に応じて自動スケールさせる */
  grid-template-columns: repeat(
    12,
    minmax(0, calc((100% - (var(--grid-gutter) * 11)) / 12))
  );
  column-gap: var(--grid-gutter);
  row-gap: 0;
  align-items: center;
  min-height: 100vh;
}

/* ==============================
   袈裟見積りフォーム（12カラム24pxグリッド）
   ============================== */

.estimate {
  padding: 160px 0 120px;
  min-height: 100vh; /* フォームが少なくてもフッターが下に来るように */
  box-sizing: border-box;
  position: relative;
}

.estimate__inner {
  width: 100%;
  max-width: calc(var(--layout-max) + var(--grid-gutter) * 2);
  margin-inline: auto;
  padding: 0 var(--grid-gutter);
  box-sizing: border-box;
  position: relative;
  z-index: 1; /* 背景オーバーレイより上に */
}

.estimate__grid {
  display: grid;
  grid-template-columns: repeat(
    12,
    minmax(0, calc((100% - (var(--grid-gutter) * 11)) / 12))
  );
  column-gap: var(--grid-gutter);
  row-gap: 32px;
  align-items: flex-start;
}

.estimate-step {
  display: none;
}

.estimate-step.is-active {
  display: block;
  animation: estimate-step-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes estimate-step-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.estimate__header {
  grid-column: 1 / span 9;
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 14px;
  border-bottom: 1px solid #111;
  padding-bottom: 8px;
  margin-bottom: 40px;
}

.estimate__step-label {
  margin: 0;
  font-size: 14px;
}

.estimate__title {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
}

.estimate__form {
  grid-column: 1 / span 9;
  display: contents;
}

.estimate__options {
  grid-column: 1 / span 9;
  display: flex;
  gap: var(--grid-gutter);
  margin-top: 32px;
}

.estimate__option {
  flex: 0 0 calc((100% - 7 * var(--grid-gutter)) / 4 + var(--grid-gutter));
  padding: 22px 24px;
  border-radius: 0;
  border: 1px solid #999;
  background-color: #fff;
  color: #333;
  font-size: 18px;
  letter-spacing: 0.08em;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease,
    color 0.18s ease, box-shadow 0.18s ease, transform 0.1s ease;
}

/* 選択中のカード: 罫線を1px太く + 背景色で明示 */
.estimate__option--primary {
  border-color: #000;
  border-width: 2px;
  /* 罫線が太くなった分をパディングで相殺してサイズを揃える */
  padding: 21px 23px;
  background-color: #efe7cb;
}

.estimate__option:hover {
  border-color: #000;
  background-color: #e8dfc0;
  color: #333;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.24);
  transform: translateY(-1px);
}

.estimate__option-label {
  display: inline-block;
}

.estimate__actions {
  grid-column: 1 / span 2;
  margin-top: 48px;
}

.estimate__actions--dual {
  grid-column: 1 / span 4;
  display: flex;
  justify-content: flex-start;
  gap: 24px;
}

.estimate__actions--dual .estimate__prev,
.estimate__actions--dual .estimate__next {
  flex: 1;
  width: auto;
}

.estimate__next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 32px;
  border-radius: 999px;
  background-color: #000;
  color: #fff;
  border: none;
  font-size: 14px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background-color 0.18s ease, box-shadow 0.18s ease,
    transform 0.1s ease;
}

.estimate__next:hover {
  background-color: #333;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
  transform: translateY(-1px);
}

/* 送信ボタン（estimate__next と同スタイルを継承） */
.estimate__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1;
  width: auto;
  padding: 12px 32px;
  border-radius: 999px;
  background-color: #000;
  color: #fff;
  border: none;
  font-size: 14px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background-color 0.18s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.estimate__submit:hover:not(:disabled) {
  background-color: #333;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
  transform: translateY(-1px);
}

.estimate__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* 送信中スピナー */
.estimate__submit-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: g-ri-spin 0.7s linear infinite;
}

@keyframes g-ri-spin {
  to { transform: rotate(360deg); }
}

/* email フィールド（contact_type=email 以外では hidden） */
.js-email-field[hidden] {
  display: none;
}

.estimate__prev {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  border-radius: 999px;
  background-color: #fff;
  color: #000;
  border: 1px solid #000;
  font-size: 14px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease,
    box-shadow 0.18s ease, transform 0.1s ease;
}

.estimate__prev:hover {
  background-color: #000;
  color: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
  transform: translateY(-1px);
}

/* ==============================
   Step2: 型紙プレビュー
   ============================== */

.estimate__shape-preview {
  grid-column: 1 / span 9;
  margin-top: 24px;
}

.estimate__shape-preview-item {
  display: none;
}

.estimate__shape-preview-item.is-active {
  display: block;
  padding: 24px;
  background-color: #f9f6ee;
  border: 1px solid rgba(0, 0, 0, 0.08);
  animation: shape-preview-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes shape-preview-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.estimate__shape-preview-item svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 480px;
  background-color: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

/* outer-contour の塗り：全クラスを上書きして中間色で表示 */
.estimate__shape-preview #outer-contour path,
.estimate__shape-preview #outer-contour polygon,
.estimate__shape-preview #outer-contour rect {
  fill: #e8e0cc !important;
}

/* ==============================
   Step3: サムネイル + プレビューの2カラムレイアウト */
.estimate__step3-layout {
  grid-column: 1 / span 9;
  display: grid;
  grid-template-columns: 1fr 220px;
  grid-template-rows: auto auto;
  column-gap: 32px;
  row-gap: 32px;
  align-items: start;
  margin-top: 32px;
}

/* 夏物/冬物セクションのラッパー（左列・1行目） */
.estimate__fabric-seasons {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* 季節見出し（帽子の有無の見出しと同トーン） */
.estimate__fabric-season-heading {
  display: block;
  background-color: #000;
  color: #fff;
  font-size: 14px;
  font-weight: normal;
  letter-spacing: 0.1em;
  padding: 10px 24px;
  margin: 0 0 16px;
}

.estimate__fabric-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.estimate__fabric {
  position: relative;
  flex: 0 0 calc((100% - 3 * 12px) / 4);
  display: flex;
  flex-direction: column;
  padding: 0;
  border: 2px solid transparent;
  background-color: #fff;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.15s ease, transform 0.1s ease,
    box-shadow 0.15s ease;
}

.estimate__fabric img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  height: auto;
  object-fit: cover;
  background-color: rgba(0, 0, 0, 0.04);
  pointer-events: none;
}

/* サムネイル下の生地名 */
.estimate__fabric-name {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 6px 7px;
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 0.04em;
  color: #555;
  text-align: center;
  pointer-events: none;
}

/* 選択状態を示すチェックマーク（画像の右上） */
.estimate__fabric::after {
  content: '✓';
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  background-color: #111;
  color: #fff;
  font-size: 13px;
  line-height: 24px;
  text-align: center;
  border-radius: 20%;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.18s ease, transform 0.18s ease;
  border: 1px solid #fff;
}

.estimate__fabric:hover {
  border-color: #999;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.estimate__fabric.is-selected {
  border-color: #000;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.estimate__fabric.is-selected::after {
  opacity: 1;
  transform: scale(1);
}

/* 合成プレビュー */
.estimate__fabric-preview {
  grid-column: 2;
  grid-row: 1 / span 2;
  position: sticky;
  top: 32px;
}

.estimate__fabric-preview-label {
  margin: 0 0 8px;
  font-size: 12px;
  color: #888;
  letter-spacing: 0.06em;
}

/* 仕上りプレビュー画像（袈裟・大絡子・観音帽子）
   縦長画像（大絡子・帽子）も横長画像と同じ高さに収まるよう
   固定アスペクトの枠に contain で収める */
.estimate__product-preview {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  padding: 14px;
  box-sizing: border-box;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background-color: #fff;
  cursor: zoom-in;
}

.estimate__product-preview[hidden] {
  display: none;
}

/* 拡大表示ライトボックス */
.estimate__lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  box-sizing: border-box;
  background-color: rgba(0, 0, 0, 0.75);
  cursor: zoom-out;
  /* 開くたびに display:none → flex になるのでアニメーションが再生される */
  animation: lightbox-fade-in 0.25s ease both;
}

.estimate__lightbox[hidden] {
  display: none;
}

.estimate__lightbox-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  padding: 12px;
  box-sizing: border-box;
  background-color: #fff;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
  animation: lightbox-img-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
}

@keyframes lightbox-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes lightbox-img-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ライトボックス表示中はボディスクロール禁止 */
body.lightbox-is-open {
  overflow: hidden;
}

/* 生地未選択時のガイド文 */
.estimate__fabric-preview-empty {
  margin: 0;
  padding: 24px 16px;
  border: 1px dashed rgba(0, 0, 0, 0.2);
  font-size: 12px;
  color: #888;
  text-align: center;
  line-height: 1.7;
}

.estimate__fabric-preview-empty[hidden] {
  display: none;
}

/* 観音帽子プレビュー */
.estimate__hat-preview {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.estimate__hat-preview[hidden] {
  display: none;
}

.estimate__summary,
.estimate__thanks {
  grid-column: 1 / span 9;
  margin-top: 32px;
}

.estimate__thanks-mailto {
  margin-top: 24px;
}

.estimate__thanks-email-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.estimate__thanks-mailto-link {
  display: inline-flex;
  align-items: center;
  padding: 12px 28px;
  background-color: #000;
  color: #fff;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-decoration: none;
  border-radius: 999px;
  transition: background-color 0.15s ease;
}

.estimate__thanks-mailto-link:hover {
  background-color: #333;
}

.estimate__thanks-copy-btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 28px;
  background-color: transparent;
  color: #000;
  font-size: 14px;
  letter-spacing: 0.06em;
  border: 1px solid #000;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.estimate__thanks-copy-btn:hover {
  background-color: #000;
  color: #fff;
}

.estimate__thanks-details {
  margin-top: 24px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 0 16px;
}

.estimate__thanks-details summary {
  padding: 12px 0;
  font-size: 13px;
  color: #555;
  cursor: pointer;
}

.estimate__thanks-pre {
  margin: 0 0 16px;
  padding: 12px;
  background-color: #f6f4ef;
  font-size: 12px;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-all;
}

.estimate__progress {
  grid-column: 1 / span 5;
  margin-top: 80px;
  position: relative;
}

.estimate__progress::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 4%;
  right: 2%;
  height: 2px;
  background-color: #d8c0c0;
}

/* 済み区間の黒線：left は ::before に合わせ、width を JS が --progress-done-width で制御 */
.estimate__progress::after {
  content: "";
  position: absolute;
  top: 7px;
  left: 4%;
  width: var(--progress-done-width, 0%);
  height: 2px;
  background-color: #000;
}

.estimate__progress-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}

.estimate__progress-item {
  position: relative;
  padding-top: 20px;
  color: #7b6f6f;
}

.estimate__progress-item::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #cbb6b6;
}

.estimate__progress-item.is-active::before,
.estimate__progress-item.is-done::before {
  background-color: #000;
}

.estimate__progress-item.is-done {
  color: #333;
}

/* 大絡子フローでは形の選択ステップをプログレスから隠す */
.estimate.is-ogara .estimate__progress-item--shape {
  display: none;
}

/* 大絡子では観音帽子オプションなし */
.estimate.is-ogara .estimate__hat-section,
.estimate.is-ogara .estimate__hat-preview {
  display: none !important;
}


/* 左側余白（1〜3カラム） */
.landing__spacer-left {
  grid-column: 1 / span 3;
}

/* メインメニュー: 4〜8カラム内で3つをセンター配置・白バック黒フチ・文字サイズは袈裟に揃える */
.landing__menu {
  grid-column: 4 / span 5;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  /* このエリア(5カラム+4ガター)の中で、1カラム幅ぶんをギャップとして使う */
  gap: calc((100% - 4 * var(--grid-gutter)) / 5);
}

.landing__menu-item {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 20px 16px;
  min-width: 64px;
  background-color: #fff;
  border: 1px solid #1a1a1a;
  box-sizing: border-box;
  transition: background-color 0.18s ease, box-shadow 0.18s ease,
    transform 0.1s ease, border-color 0.18s ease;
}


.landing__menu-item:hover {
  background-color: #e8dfc0;
  border-color: #000;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.24);
  transform: translateY(-1px);
}

/* 袈裟に揃えた同じ文字サイズ・四角の幅は各SVGに任せる */
.landing__menu-item img {
  display: block;
  width: 40px;
  height: auto;
}

.landing__menu-label {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 18px;
  letter-spacing: 0.22em;
  color: #333;
}

/* 右側はヘッダー（スティッキー）が担当するため、グリッド上では未使用 */
.landing__logo {
  grid-column: 9 / span 4;
  justify-self: end;
}

.landing__logo img {
  display: block;
  max-height: 520px;
  height: auto;
  width: auto;
}

/* ==============================
   Step4: SVGテンプレート（非表示）
   ============================== */
.estimate__svg-templates {
  display: none;
}

/* ==============================
   Step4: サマリーカードグリッド
   ============================== */
.estimate__summary-grid {
  grid-column: 1 / span 9;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: stretch;
  gap: 24px;
  margin-top: 32px;
}

.estimate__summary-empty {
  grid-column: 1 / -1;
  color: #666;
  font-size: 14px;
}

.estimate__summary-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid #ccc;
  background-color: #fff;
  overflow: hidden;
}

.estimate__summary-card-preview {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  /* 画像の実寸差に影響されないよう枠だけ固定 */
  aspect-ratio: 4 / 5;
  background-color: #fff;
  border-bottom: none;
  overflow: hidden;
}

.estimate__summary-card-preview img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* 仕上り画像がカードの縁に付かないよう余白を確保 */
  padding: 16px;
  box-sizing: border-box;
}

.estimate__summary-card-label {
  flex: 0 0 auto;
  background-color: #333;
  color: #fff;
  text-align: center;
  padding: 8px 12px;
  font-size: 13px;
  letter-spacing: 0.05em;
}

.estimate__summary-card-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  padding: 14px 16px 16px;
}

.estimate__summary-card-specs {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  font-size: 13px;
  line-height: 1.8;
  color: #444;
}

.estimate__summary-card-price-label {
  margin: auto 0 4px;
  font-size: 11px;
  color: #888;
}

.estimate__summary-card-price {
  font-size: 20px;
  font-weight: bold;
  color: #111;
  margin: 0;
}

.estimate__summary-card-price-note {
  font-size: 11px;
  color: #888;
  margin: 6px 0 0;
  line-height: 1.5;
  min-height: 2.25em; /* 内訳の折り返し差でカード高がずれないよう確保 */
}

/* ==============================
   Step3: 帽子の有無
   ============================== */
.estimate__hat-section {
  grid-column: 1;
  grid-row: 2;
}

.estimate__hat-heading {
  display: block;
  background-color: #000;
  color: #fff;
  font-size: 14px;
  font-weight: normal;
  letter-spacing: 0.1em;
  padding: 10px 24px;
  margin: 0 0 16px;
}

.estimate__hat-options {
  display: flex;
  gap: var(--grid-gutter);
}

.estimate__hat-option {
  padding: 14px 40px;
  border: 1px solid #999;
  background-color: #fff;
  color: #333;
  font-size: 14px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease,
    color 0.18s ease, box-shadow 0.18s ease, transform 0.1s ease;
}

.estimate__hat-option:hover {
  border-color: #000;
  background-color: #e8dfc0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.24);
  transform: translateY(-1px);
}

.estimate__hat-option.is-active {
  border-color: #000;
  border-width: 2px;
}

/* ==============================
   Step4: 以降の対応について
   ============================== */
.estimate__contact {
  grid-column: 1 / span 9;
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid #ccc;
}

.estimate__contact-title {
  font-size: 14px;
  font-weight: normal;
  margin: 0 0 24px;
  letter-spacing: 0.05em;
}

.estimate__contact-options {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.estimate__contact-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
}

.estimate__contact-option input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: #333;
  flex-shrink: 0;
}

.estimate__contact-note {
  font-size: 12px;
  color: #666;
  margin: 0 0 28px;
  line-height: 1.7;
}

.estimate__contact-fields {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 480px;
}

.estimate__contact-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* hidden 属性が display:flex 等に上書きされないよう保証する */
.estimate__contact-field[hidden] {
  display: none !important;
}

.estimate__contact-field label {
  font-size: 12px;
  color: #555;
}

.estimate__contact-field input[type="text"],
.estimate__contact-field input[type="email"] {
  padding: 10px 14px;
  border: 1px solid #bbb;
  background-color: #fff;
  font-size: 14px;
  color: #333;
  outline: none;
  transition: border-color 0.15s ease;
}

.estimate__contact-field input[type="text"]:focus,
.estimate__contact-field input[type="email"]:focus {
  border-color: #555;
}

.estimate__select {
  padding: 10px 36px 10px 14px;
  border: 1px solid #bbb;
  background-color: #fff;
  font-size: 14px;
  color: #333;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23555' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.estimate__select:focus {
  border-color: #555;
}

/* ------------------------------
   Step4: お寺検索
   ------------------------------ */

.estimate__temple-search {
  gap: 10px;
}

.estimate__temple-search-row {
  display: flex;
  gap: 8px;
}

.estimate__temple-query {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid #bbb;
  background-color: #fff;
  font-size: 14px;
  color: #333;
  outline: none;
  transition: border-color 0.15s ease;
}

.estimate__temple-query:focus {
  border-color: #555;
}

.estimate__temple-search-btn {
  flex: 0 0 auto;
  padding: 10px 24px;
  border: 1px solid #333;
  background-color: #333;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.estimate__temple-search-btn:hover {
  opacity: 0.8;
}

.estimate__temple-hint,
.estimate__temple-status {
  margin: 0;
  font-size: 12px;
  color: #777;
}

.estimate__temple-status:empty {
  display: none;
}

.estimate__temple-status.is-error {
  color: #b3392f;
}

.estimate__temple-results {
  display: flex;
  flex-direction: column;
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid #ddd;
  background-color: #fff;
}

.estimate__temple-results[hidden] {
  display: none;
}

.estimate__temple-result {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  border: none;
  border-bottom: 1px solid #eee;
  background: none;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.estimate__temple-result:last-child {
  border-bottom: none;
}

.estimate__temple-result:hover {
  background-color: #f5f2e9;
}

.estimate__temple-result-name {
  font-size: 14px;
  color: #333;
}

.estimate__temple-result-address {
  font-size: 12px;
  color: #888;
}

.estimate__temple-selected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid #333;
  background-color: #f5f2e9;
}

.estimate__temple-selected[hidden] {
  display: none;
}

.estimate__temple-selected-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
}

.estimate__temple-selected-label {
  font-size: 11px;
  color: #777;
}

.estimate__temple-selected-name {
  font-size: 15px;
  color: #333;
}

.estimate__temple-clear {
  flex: 0 0 auto;
  padding: 6px 14px;
  border: 1px solid #999;
  background-color: #fff;
  font-size: 12px;
  color: #555;
  cursor: pointer;
}

.estimate__temple-manual-toggle {
  margin: 0;
}

.estimate__temple-manual-btn {
  padding: 0;
  border: none;
  background: none;
  font-size: 12px;
  color: #777;
  text-decoration: underline;
  cursor: pointer;
}

.estimate__temple-manual {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.estimate__temple-manual[hidden] {
  display: none;
}

.estimate__temple-manual input[type="text"] {
  padding: 10px 14px;
  border: 1px solid #bbb;
  background-color: #fff;
  font-size: 14px;
  color: #333;
  outline: none;
}

.estimate__textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #bbb;
  background-color: #fff;
  font-size: 14px;
  color: #333;
  outline: none;
  resize: vertical;
  line-height: 1.6;
  transition: border-color 0.15s ease;
  box-sizing: border-box;
}

.estimate__textarea:focus {
  border-color: #555;
}

/* ==============================
   レスポンシブ: タブレット (768px - 1023px)
   ============================== */

@media (min-width: 768px) and (max-width: 1023px) {
  :root {
    --grid-gutter: 16px;
  }

  /* ==============================
     タブレット共通マージン変数
     ============================== */
  :root {
    --page-margin-tablet: 28px;
  }

  /* タブレット: ヘッダーを通常フローの全幅バーに変更（fixed なし） */
  .site-header {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    width: 100%;
    transform: none;
    height: auto;
    padding: 20px var(--page-margin-tablet);
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 10;
  }

  .site-header__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: 100%;
  }

  .site-header__logo-vertical {
    display: none;
  }

  .site-header__logo-horizontal {
    display: block;
    width: 250px;
    height: auto;
  }

  /* タブレット: ナビをプレーンテキストリンクに */
  .site-header__subnav {
    flex-direction: row;
    gap: 32px;
    width: auto;
  }

  .site-header__subnav-item {
    background-color: transparent;
    color: #333;
    border: none;
    border-radius: 0;
    padding: 0;
    font-size: 14px;
    letter-spacing: 0.05em;
    white-space: nowrap;
    box-shadow: none;
  }

  .site-header__subnav-item:hover {
    background-color: transparent;
    color: #000;
    box-shadow: none;
    transform: none;
    text-decoration: underline;
  }

  /* ランディング: ヘッダーと左右マージンを統一 */
  .landing {
    min-height: auto;
  }

  .landing__inner {
    padding: 0 var(--page-margin-tablet);
  }

  .landing__grid {
    min-height: 70vh;
    align-content: center;
    padding-top: 0;
  }

  .landing__spacer-left {
    display: none;
  }

  .landing__menu {
    grid-column: 1 / -1;
    justify-content: center;
    gap: 48px;
  }

  /* 見積りフォーム: ヘッダーと左右マージンを統一 */
  .estimate {
    padding: 40px 0 80px;
  }

  .estimate__inner {
    padding: 0 var(--page-margin-tablet);
  }


  /* タブレットではサイドバーなし → 全列幅を使う */
  .estimate__header,
  .estimate__options,
  .estimate__shape-preview,
  .estimate__step3-layout,
  .estimate__summary,
  .estimate__summary-grid,
  .estimate__contact,
  .estimate__thanks {
    grid-column: 1 / -1;
  }

  /* タブレット: ボタンをグリッドに合わせて均等幅に */
  .estimate__option {
    flex: 1;
    min-width: 0;
  }

  .estimate__actions {
    grid-column: 1 / span 4;
  }

  .estimate__actions--dual {
    grid-column: 1 / -1;
  }

  .estimate__progress {
    grid-column: 1 / -1;
  }

  /* タブレット: Step4 サマリーグリッドを2列に */
  .estimate__summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==============================
   レスポンシブ: モバイル (〜767px)
   ============================== */

@media (max-width: 767px) {
  :root {
    --grid-gutter: 16px;
  }

  .catalog {
    padding: 48px 20px 64px;
  }

  .catalog__title {
    font-size: 22px;
  }

  /* モバイル: ヘッダーを通常フローの全幅バーに変更（fixed なし） */
  .site-header {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    width: 100%;
    transform: none;
    height: auto;
    padding: 12px 20px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 101;
  }

  .site-header__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
  }

  .site-header__logo-vertical {
    display: none;
  }

  .site-header__logo-horizontal {
    display: block;
    height: 28px;
    width: auto;
  }

  /* モバイル: 通常ナビは非表示、ハンバーガーで代替 */
  .site-header__subnav {
    display: none;
  }

  /* ハンバーガーボタン表示 */
  .site-header__hamburger {
    display: flex;
  }

  /* ハンバーガー → X アニメーション */
  .site-header__hamburger.is-open .site-header__hamburger-line:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
  }

  .site-header__hamburger.is-open .site-header__hamburger-line:nth-child(2) {
    opacity: 0;
    width: 0;
  }

  .site-header__hamburger.is-open .site-header__hamburger-line:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
  }

  /* フルスクリーン ドロワーオーバーレイ */
  .site-header__drawer {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 100;
    background-color: rgba(255, 255, 240, 0.95);
    align-items: center;
    justify-content: center;
    /* 閉じた状態: 上端から clip して非表示 */
    clip-path: inset(0 0 100% 0);
    transition: clip-path 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
  }

  .site-header__drawer.is-open {
    clip-path: inset(0 0 0% 0);
    pointer-events: auto;
  }

  /* ドロワーナビ */
  .site-header__drawer-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 48px;
  }

  /* ドロワーアイテム（open 前は不可視） */
  .site-header__drawer-item {
    position: relative;
    display: inline-block;
    font-size: clamp(1.1rem, 4.5vw, 1.35rem);
    font-weight: 400;
    letter-spacing: 0.15em;
    color: #333;
    text-decoration: none;
    opacity: 0;
    transform: translateY(18px);
  }

  /* ドロワー open 時: アイテムをスタガーでフェードイン */
  .site-header__drawer.is-open .site-header__drawer-item {
    transition: opacity 0.4s ease, transform 0.4s ease;
    opacity: 1;
    transform: translateY(0);
  }

  .site-header__drawer.is-open .site-header__drawer-item:nth-child(1) {
    transition-delay: 0.16s;
  }

  .site-header__drawer.is-open .site-header__drawer-item:nth-child(2) {
    transition-delay: 0.24s;
  }

  .site-header__drawer.is-open .site-header__drawer-item:nth-child(3) {
    transition-delay: 0.32s;
  }

  .site-header__drawer.is-open .site-header__drawer-item:nth-child(4) {
    transition-delay: 0.40s;
  }

  /* ドロワーアイテム ホバー: 下線スライドイン */
  .site-header__drawer-item::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #333;
    transition: width 0.3s ease;
  }

  .site-header__drawer-item:hover::after {
    width: 100%;
  }

  .site-header__drawer-item:hover {
    color: #111;
  }

  /* メニュー展開中はボディスクロール禁止 */
  body.menu-is-open {
    overflow: hidden;
  }

  /* ランディング */
  .landing {
    min-height: auto;
  }

  .landing__inner {
    padding: 0 20px;
  }

  .landing__grid {
    grid-template-columns: 1fr;
    min-height: 70vh;
    align-content: center;
    padding-top: 0;
    row-gap: 40px;
    align-items: center;
  }

  .landing__spacer-left {
    display: none;
  }

  .landing__menu {
    grid-column: 1;
    justify-content: center;
    gap: 16px;
  }

  .landing__menu-item img {
    width: 30px;
  }

  /* 見積りフォーム（ヘッダーが通常フローなのでオフセット不要） */
  .estimate {
    padding: 32px 0 60px;
  }

  .estimate__inner {
    padding: 0 20px;
  }

  .estimate__grid {
    grid-template-columns: 1fr;
    row-gap: 0;
  }

  .estimate__header,
  .estimate__options,
  .estimate__shape-preview,
  .estimate__step3-layout,
  .estimate__fabric-seasons,
  .estimate__summary,
  .estimate__summary-grid,
  .estimate__contact,
  .estimate__thanks {
    grid-column: 1;
  }

  .estimate__header {
    margin-bottom: 24px;
  }

  .estimate__options {
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
  }

  .estimate__option {
    flex: 0 0 calc((100% - 10px) / 2);
    width: auto;
  }

  .estimate__actions,
  .estimate__actions--dual {
    grid-column: 1;
    margin-top: 32px;
  }

  .estimate__actions--dual {
    flex-direction: column;
    gap: 12px;
  }

  .estimate__actions--dual .estimate__prev,
  .estimate__actions--dual .estimate__next {
    width: 100%;
    flex: none;
  }

  .estimate__next {
    width: 100%;
  }

  .estimate__step3-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .estimate__fabric-seasons {
    grid-row: auto;
  }

  .estimate__hat-section {
    grid-column: 1;
    grid-row: auto;
  }

  .estimate__fabric-preview {
    grid-column: 1;
    grid-row: auto;
  }

  .estimate__hat-option {
    padding: 12px 24px;
    flex: 1;
  }

  .estimate__fabric {
    flex: 0 0 calc((100% - 12px) / 2);
  }

  .estimate__progress {
    grid-column: 1;
    margin-top: 40px;
  }

  /* モバイル: Step4 サマリーグリッドを1列に */
  .estimate__summary-grid {
    grid-template-columns: 1fr;
  }
}

/* ハニーポット: 人間には見えないがボットには有効なスパム対策フィールド */
/* display:none / visibility:hidden はボットに検出されるため position で隠す */
.estimate__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* ==============================
   御衣（御出頭衣）見積り
   ============================== */

/* 御衣 Step1: 袈裟と同じ横並びカード。長いラベルはカード内で折り返す */
.estimate__options--onzo .estimate__option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 72px;
  line-height: 1.35;
}

.estimate__options--onzo .estimate__option:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.estimate__options--onzo .estimate__option:disabled:hover {
  border-color: #999;
  background-color: #fff;
  color: #333;
  transform: none;
  box-shadow: none;
}

.estimate__option-note {
  display: block;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #888;
}

/* プレビュー列なしで、見出し罫線と同じ 9 カラム幅に揃える */
.estimate__step3-layout--onzo {
  grid-template-columns: 1fr;
}

.estimate__step3-layout--onzo[hidden],
.js-onzo-line-panel[hidden],
.estimate__uniform-product[hidden] {
  display: none !important;
}

/* 御衣: 季節で枚数が違ってもカード幅を揃える（常に4列） */
.estimate--onzo .estimate__fabric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.estimate--onzo .estimate__fabric {
  flex: none;
  width: 100%;
  min-width: 0;
}

@media (max-width: 767px) {
  .estimate--onzo .estimate__fabric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .estimate__tabs {
    /* モバイルは生地2列＝グリッド全幅 */
    width: 100%;
  }
}

/* 御衣: 枠＝画像＋名前。価格は枠の外 */
.estimate__fabric--onzo {
  background-color: transparent;
  border-color: transparent;
  overflow: visible;
  box-shadow: none;
  transform: none;
}

.estimate__fabric--onzo:hover,
.estimate__fabric--onzo.is-selected {
  border-color: transparent;
  box-shadow: none;
  transform: none;
}

.estimate__fabric--onzo::after {
  content: none;
}

.estimate__fabric-frame {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  background-color: #fff;
  border: 2px solid transparent;
  overflow: hidden;
  box-sizing: border-box;
  transition: border-color 0.15s ease, transform 0.1s ease,
    box-shadow 0.15s ease;
}

.estimate__fabric--onzo:hover .estimate__fabric-frame {
  border-color: #999;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.estimate__fabric--onzo.is-selected .estimate__fabric-frame {
  border-color: #000;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.estimate__fabric-frame::after {
  content: '✓';
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  background-color: #111;
  color: #fff;
  font-size: 13px;
  line-height: 24px;
  text-align: center;
  border-radius: 20%;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.18s ease, transform 0.18s ease;
  border: 1px solid #fff;
}

.estimate__fabric--onzo.is-selected .estimate__fabric-frame::after {
  opacity: 1;
  transform: scale(1);
}

.estimate__fabric-thumb {
  display: block;
  aspect-ratio: 1 / 1;
  background: #f3efe6;
  overflow: hidden;
}

.estimate__fabric-thumb img,
.estimate__fabric-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.estimate__fabric-placeholder {
  background:
    linear-gradient(135deg, #ebe4d4 25%, #f7f2e8 25%, #f7f2e8 50%, #ebe4d4 50%, #ebe4d4 75%, #f7f2e8 75%);
  background-size: 16px 16px;
}

/* 1行は天地中央、2行も中央。高さは2行＋パディング分で固定 */
.estimate__fabric--onzo .estimate__fabric-name {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: calc(1.4em * 2 + 6px + 7px);
  margin: 0;
  padding: 6px 6px 7px;
  box-sizing: border-box;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: 0.04em;
  color: #555;
  text-align: center;
  white-space: pre-line;
}

.estimate__fabric-price {
  display: block;
  margin-top: 8px;
  padding: 0 2px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.04em;
  color: #333;
  text-align: center;
  pointer-events: none;
}

/* 無地: 2行目「無地」をやや控えめに（改行ラベル前提） */
.estimate__fabric--onzo.is-muji .estimate__fabric-name {
  color: #555;
}

/* 制服系：タブ＋季節は黒見出しで縦展開 */
.estimate__uniform {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.estimate__uniform-context {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.06em;
  color: #555;
}

.estimate__tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  /* 生地グリッド4列のうち2列分の幅（列間ギャップ12px × 3本を考慮） */
  width: calc((100% - 36px) * 2 / 4 + 12px);
  max-width: 100%;
  border-bottom: 1px solid #ccc;
  box-sizing: border-box;
}

.estimate__tab {
  appearance: none;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  flex: 1 1 0;
  min-width: 0;
  padding: 10px 8px;
  font-size: 14px;
  letter-spacing: 0.08em;
  color: #666;
  text-align: center;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.estimate__tab:hover {
  color: #111;
}

.estimate__tab.is-active {
  color: #111;
  border-bottom-color: #111;
  font-weight: 600;
}

.estimate__uniform-panels {
  margin-top: 4px;
}

.estimate__uniform-product .estimate__fabric-seasons {
  gap: 40px;
}

.estimate__summary-grid--onzo {
  grid-template-columns: minmax(240px, 360px);
}

/* 御衣は生地サムネなので正方形。袈裟の仕上り画像用 4:5 は使わない */
.estimate__summary-grid--onzo .estimate__summary-card-preview {
  aspect-ratio: 1 / 1;
}

.estimate__summary-grid--onzo .estimate__summary-card-preview img,
.estimate__summary-grid--onzo .estimate__summary-card-preview .estimate__fabric-placeholder {
  padding: 0;
  object-fit: cover;
}

.estimate__summary-grid--onzo .estimate__summary-card-preview .estimate__fabric-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

@media (max-width: 767px) {
  .estimate__summary-grid--onzo {
    grid-template-columns: 1fr;
  }
}

/* ==============================
   レスポンシブ: 極小モバイル (〜399px)
   ============================== */

@media (max-width: 399px) {
  .landing__inner {
    padding: 0 28px;
  }

  /* メニューを2×2グリッドに変更（全4アイテムの高さを揃える） */
  .landing__menu {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 1fr;
    gap: 10px;
  }

  .landing__menu-item {
    flex: none;
    padding: 16px 12px;
    align-items: center;
    justify-content: center;
  }

  /* ヘッダー左右余白を縮小 */
  .site-header {
    padding: 12px 16px;
  }
}

/* 以降、必要に応じてスタイルを追加 */

