/* ============================================================
   KURUMAISU — common.css
   全ページ共通の基礎スタイル（フォント / アクセシビリティ最小値）
   ============================================================ */

/* Google Fonts — M PLUS 1p */
@import url('https://fonts.googleapis.com/css2?family=M+PLUS+1p:wght@500;700;900&display=swap');

/* ベース設定（最小フォントサイズ 15px / 最小ウェイト 500） */
html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "M PLUS 1p", "Hiragino Kaku Gothic ProN", "Hiragino Sans",
               "Yu Gothic", "YuGothic", "Meiryo",
               system-ui, -apple-system, sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.8;
  letter-spacing: 0.02em;
  color: #1A2433;
  background: #fff;
}

/* M PLUS 1p に最適化したベースリーディング */
input, button, select, textarea {
  font-family: inherit;
  font-weight: 500;
}

/* 小さくなりがちな要素の最小サイズを保証 */
small, sub, sup {
  font-size: 15px;
}

/* ============================================================
   ハンバーガーメニュー（モバイル用）
   ============================================================ */

/* ハンバーガーボタン本体 */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid #E2E7EC;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  margin-left: auto;
  position: relative;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 0;
  transition: border-color 0.15s;
}
.nav-toggle:hover {
  border-color: #2BA868;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #1A2433;
  border-radius: 2px;
  transition: all 0.25s ease;
  pointer-events: none;
}

/* バツマークに変形（オープン時） */
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* オーバーレイ（メニューが開いている時の背景） */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26, 36, 51, 0.5);
  z-index: 49;
  opacity: 0;
  transition: opacity 0.25s;
}
.nav-overlay.open {
  display: block;
  opacity: 1;
}

/* === モバイル幅の挙動 === */
@media (max-width: 980px) {
  /* ハンバーガーボタンを表示 */
  .nav-toggle {
    display: flex;
  }

  /* ヘッダーCTA枠を非表示にしてドロワー内に集約 */
  header .nav-cta {
    display: none;
  }

  /* ナビ全体のレイアウト調整 */
  header .nav {
    height: 64px;
    padding: 0 16px;
  }

  /* ナビリストをドロワー化 */
  header .nav-list {
    position: fixed;
    top: 64px;
    right: 0;
    width: min(320px, 85vw);
    height: calc(100vh - 64px);
    background: #fff;
    flex-direction: column;
    gap: 0;
    margin-left: 0;
    padding: 16px 0;
    border-left: 1px solid #E2E7EC;
    box-shadow: -4px 0 24px rgba(26, 36, 51, 0.08);
    transform: translateX(100%);
    transition: transform 0.25s ease;
    overflow-y: auto;
    z-index: 50;
  }
  header .nav-list.open {
    transform: translateX(0);
  }
  header .nav-list li {
    width: 100%;
    border-bottom: 1px solid #E2E7EC;
  }
  header .nav-list a {
    display: block;
    padding: 18px 24px;
    font-size: 16px;
    font-weight: 500;
  }
  header .nav-list a.active::after {
    display: none;
  }
  header .nav-list a.active {
    background: #E8F5EE;
    color: #1F8050;
    border-left: 3px solid #2BA868;
    padding-left: 21px;
  }

  /* ドロワー末尾にCTAを追加 */
  header .nav-list .mobile-cta {
    display: block;
    padding: 24px;
    border-bottom: none;
    background: #FAFBFC;
  }
  header .nav-list .mobile-cta .btn {
    width: 100%;
    margin-bottom: 10px;
    height: 48px;
  }
}

/* デスクトップでは mobile-cta を非表示 */
@media (min-width: 981px) {
  header .nav-list .mobile-cta {
    display: none;
  }
}

/* ============================================================
   モバイル全ページ共通レイアウト調整（高特異度で inline 上書き）
   - 各HTMLの @media 内ルールより優先するため body 接頭辞を使用
   ============================================================ */

@media (max-width: 980px) {

  /* レイアウト全般 */
  body .wrap { padding: 0 18px; }
  body section { padding: 48px 0; }

  /* === フッター（4列 → 2列、bottom縦並び） === */
  body footer { padding: 44px 0 24px; }
  body footer .foot-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    margin-bottom: 32px;
  }
  body footer .foot-brand {
    grid-column: 1 / -1;
    margin-bottom: 4px;
  }
  body footer .foot-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  body footer .foot-bottom-links {
    flex-wrap: wrap;
    gap: 14px;
  }

  /* === a11y bar（フッター下） === */
  body .a11y-bar {
    padding: 12px 16px;
    line-height: 1.7;
  }

  /* === CTAバナー（緑背景の中央CTA） === */
  body .cta-banner { padding: 48px 0; }
  body .cta-banner h2 { font-size: 22px; line-height: 1.5; }
  body .cta-banner p { font-size: 15px; }
  body .cta-banner .btns {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }
  body .cta-banner .btn,
  body .cta-banner .btn-lg {
    width: 100%;
    height: 48px;
    font-size: 15px;
    padding: 0 20px;
  }

  /* === お問い合わせブロック（property.html .inquiry） === */
  body .inquiry {
    padding: 24px 18px !important;
    gap: 24px !important;
    grid-template-columns: 1fr !important;
  }
  body .inq-form { padding: 20px 18px !important; }
  body .inq-left h3 { font-size: 20px !important; line-height: 1.5 !important; }
  body .inq-quick { padding: 14px !important; }
  body .inquiry .form-row { grid-template-columns: 1fr !important; }
  body .inquiry .form-actions { flex-direction: column; gap: 8px; }
  body .inquiry .form-actions .btn { width: 100%; }

  /* === お問い合わせフォーム（contact.html） === */
  body .form-grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
  body .form-side {
    position: static !important;
    padding: 22px 20px !important;
  }
  body .form-side h3 { font-size: 17px; }
  body .form-card { padding: 24px 18px !important; }
  body .form-row {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }
  body .form-actions { flex-direction: column; gap: 10px; }
  body .form-actions .btn { width: 100%; height: 48px; }

  /* === チャンネルカード（contact.html 上部 3カード） === */
  body .channel-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }
  body .ch { padding: 24px 20px; }

  /* === 情報カード（運営会社情報など） === */
  body .info-grid { grid-template-columns: 1fr !important; gap: 12px; }

  /* === FAQ === */
  body .faq summary {
    padding: 16px 18px;
    font-size: 15px;
    gap: 12px;
  }
  body .faq-body {
    padding: 0 18px 18px 18px !important;
    font-size: 15px;
  }
  body .faq-tabs { gap: 4px; }
  body .faq-tab { padding: 10px 14px; font-size: 15px; }

  /* === ヒーロー（トップ） === */
  body .hero { padding: 40px 0 32px; }
  body .hero-grid {
    grid-template-columns: 1fr !important;
    gap: 28px;
  }
  body .hero h1 { font-size: 30px !important; }
  body .hero-stats { gap: 8px !important; }
  body .stat { padding: 10px 12px !important; }
  body .stat-num { font-size: 20px !important; }
  body .hero-cta {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  body .hero-cta .btn { width: 100%; height: 48px; font-size: 15px; padding: 0 20px; }

  /* === セクションヘッダー === */
  body .section-title { font-size: 22px !important; line-height: 1.45; }
  body .section-head { margin-bottom: 28px; }

  /* === ニュースバー === */
  body .newsbar-inner {
    flex-wrap: wrap;
    gap: 8px;
  }
  body .news-text {
    flex-basis: 100%;
    white-space: normal;
  }

  /* === Search summary bar（search.html ヘッダー） === */
  body .summary-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  body .summary-title { font-size: 18px !important; }
  body .summary-actions { flex-wrap: wrap; }

  /* === 検索結果カード横並び→縦並び === */
  body .results-toolbar { flex-direction: column; align-items: stretch; gap: 12px; }
  body .toolbar-right { flex-wrap: wrap; gap: 8px; }

  /* === Page hero（下層共通） === */
  body .page-hero { padding: 48px 0 36px; }
  body .ph-title { font-size: 28px !important; line-height: 1.4 !important; }

  /* === ペルソナタブ（voice.html） === */
  body .pt-list { gap: 6px; flex-wrap: wrap; }
  body .pt-item { padding: 8px 12px; font-size: 15px; }

  /* === Persona section の persona-head === */
  body .persona-head { padding: 18px 20px; gap: 14px; }
  body .ph-name { font-size: 16px; }

  /* === voice カード === */
  body .voice-grid { grid-template-columns: 1fr !important; gap: 16px; }
  body .vc { padding: 24px 20px; }
  body .feat-card { padding: 28px 22px !important; }
  body .feat-grid { grid-template-columns: 1fr !important; gap: 24px !important; }
  body .feat-quote { padding: 20px 22px; font-size: 16px; }
  body .feat-title { font-size: 20px; }

  /* === Aggregate satisfaction === */
  body .agg { padding: 28px 20px; }
  body .agg-grid { grid-template-columns: 1fr !important; gap: 28px; }
  body .agg-num { font-size: 64px; }

  /* === supporter cards === */
  body .sup-grid { grid-template-columns: 1fr !important; gap: 14px; }
  body .sp { padding: 22px 20px; }
}

/* === 超小型モバイル（〜560px） === */
@media (max-width: 560px) {

  /* レイアウト */
  body .wrap { padding: 0 14px; }

  /* フッター 2列 → 1列 */
  body footer .foot-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  body footer { padding: 36px 0 22px; }

  /* タイトル */
  body .ph-title { font-size: 24px !important; }
  body .section-title { font-size: 20px !important; }
  body .hero h1 { font-size: 26px !important; }
  body .cta-banner h2 { font-size: 19px; }

  /* フォーム */
  body .form-card,
  body .inq-form { padding: 18px 14px !important; }

  /* CTA banner ボタン */
  body .cta-banner .btns { max-width: 100%; }
}
