/*
Theme Name: 易学五常会
Theme URI:
Author: Suzuki
Description: 易学五常会の公式サイト用クラシックテーマ。静的HTMLたたき台を移植し、お知らせ＝投稿、固定ページ＝独自テンプレートとして運用。モバイル用ハンバーガーメニュー、キーボード操作のフォーカス可視化を実装済み。
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: ekigaku-gojokai
*/

:root {
  --paper: #fbf7ef;
  --paper-strong: #f3ebde;
  --ink: #1f2a2a;
  --muted: #6e736d;
  --line: #dfd2bf;
  --coral: #b85f54;
  --coral-dark: #873d38;
  --teal: #316b69;
  --gold: #b58a43;
  --white: #fffdf8;
  --shadow: 0 22px 50px rgba(65, 46, 31, 0.12);
  --radius: 8px;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
  color: var(--ink);

  /* ===== 和風背景パターン：ここの3値だけ差し替えれば全体が切り替わる（案の値はファイル末尾のコメント参照） ===== */
  --wa-bg: conic-gradient(rgba(150, 130, 95, 0.06) 90deg, transparent 90deg 180deg, rgba(150, 130, 95, 0.06) 180deg 270deg, transparent 270deg);
  --wa-bg-size: 44px 44px;
  --wa-bg-pos: 0 0;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #fffaf2 0%, #f7fbf8 42%, #f8f1e7 100%);
  color: var(--ink);
  letter-spacing: 0;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(31, 42, 42, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 42, 42, 0.025) 1px, transparent 1px);
  background-size: 42px 42px;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 18px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(223, 210, 191, 0.78);
  background: rgba(251, 247, 239, 0.9);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  min-width: max-content;
  font-family: "Yu Gothic", "Hiragino Sans", sans-serif;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--coral-dark);
  font-family: "Yu Mincho", serif;
  font-size: 1.2rem;
  background: var(--white);
}

.brand strong {
  display: block;
  font-size: 0.98rem;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 22px;
  color: #4d5551;
  font-family: "Yu Gothic", "Hiragino Sans", sans-serif;
  font-size: 0.88rem;
}

.nav a,
.header-cta {
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.nav a:hover {
  color: var(--coral-dark);
}

.header-cta {
  min-width: 112px;
  padding: 12px 18px;
  border: 1px solid var(--teal);
  border-radius: 999px;
  color: var(--teal);
  font-family: "Yu Gothic", "Hiragino Sans", sans-serif;
  font-size: 0.86rem;
  text-align: center;
  background: rgba(255, 253, 248, 0.55);
}

.header-cta:hover {
  color: var(--white);
  background: var(--teal);
  transform: translateY(-1px);
}

.hero {
  display: grid;
  min-height: min(720px, calc(100svh - 128px));
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 1.08fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(44px, 8vw, 84px) clamp(18px, 4vw, 56px) clamp(32px, 6vw, 68px);
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.eyebrow,
.section-label,
.tag {
  margin: 0 0 14px;
  color: var(--coral-dark);
  font-family: "Yu Gothic", "Hiragino Sans", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 10em;
  margin: 0;
  font-size: clamp(2.5rem, 6vw, 5.2rem);
  font-weight: 500;
  line-height: 1.08;
}

.lead {
  max-width: 42rem;
  margin: 28px 0 0;
  color: #49504b;
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  line-height: 2;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero-actions.center {
  justify-content: center;
}

.button {
  display: inline-flex;
  min-height: 48px;
  min-width: 148px;
  align-items: center;
  justify-content: center;
  padding: 13px 22px;
  border: 1px solid var(--coral-dark);
  border-radius: 999px;
  font-family: "Yu Gothic", "Hiragino Sans", sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(65, 46, 31, 0.12);
}

.button.primary {
  color: var(--white);
  background: var(--coral-dark);
}

.button.ghost {
  color: var(--coral-dark);
  background: rgba(255, 253, 248, 0.78);
}

.button.light {
  border-color: rgba(255, 253, 248, 0.76);
  color: var(--white);
  background: transparent;
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 560px;
  margin: 42px 0 0;
}

.hero-facts div {
  padding: 18px 16px;
  border: 1px solid rgba(181, 138, 67, 0.28);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.62);
}

.hero-facts dt {
  color: var(--muted);
  font-family: "Yu Gothic", "Hiragino Sans", sans-serif;
  font-size: 0.76rem;
}

.hero-facts dd {
  margin: 6px 0 0;
  font-size: 1rem;
}

.hero-art {
  position: relative;
  align-self: stretch;
  min-height: 520px;
  overflow: hidden;
  border-radius: 0 0 0 64px;
  box-shadow: var(--shadow);
  background: var(--paper-strong);
}

.hero-art::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(251, 247, 239, 0.9), rgba(251, 247, 239, 0.28) 34%, transparent 70%);
}

.hero-art .hero-bg {
  width: 100%;
  height: 100%;
  min-height: 520px;
  object-fit: cover;
  object-position: center;
}

.notice-band {
  margin: 0 auto;
  padding: 18px clamp(18px, 4vw, 56px);
  border-block: 1px solid var(--line);
  background: #243b39;
  color: var(--white);
  text-align: center;
}

.notice-band p {
  max-width: 900px;
  margin: 0 auto;
  font-family: "Yu Gothic", "Hiragino Sans", sans-serif;
  line-height: 1.8;
}

.section {
  max-width: 1160px;
  margin: 0 auto;
  padding: clamp(64px, 9vw, 112px) clamp(18px, 4vw, 56px);
}

.section.muted {
  max-width: none;
  background: rgba(255, 253, 248, 0.58);
}

.section.muted > * {
  max-width: 1048px;
  margin-inline: auto;
}

.split {
  display: grid;
  grid-template-columns: minmax(220px, 0.78fr) minmax(0, 1.22fr);
  gap: clamp(28px, 7vw, 84px);
  align-items: start;
}

.section-heading {
  margin-bottom: 32px;
  text-align: center;
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 3.8vw, 3.6rem);
  font-weight: 500;
  line-height: 1.25;
}

h3 {
  margin: 0;
  font-size: 1.22rem;
  font-weight: 600;
  line-height: 1.45;
}

.section-text {
  color: #424b46;
  font-size: 1.03rem;
  line-height: 2.1;
}

.section-text p,
.school-copy p,
.access p,
.contact-cta p {
  margin: 0;
}

.section-text p + p,
.profile-panel p + p {
  margin-top: 18px;
}

.news-grid,
.service-layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.news-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.news-card,
.price-card,
.profile-panel,
.school-details,
.access-box {
  border: 1px solid rgba(223, 210, 191, 0.86);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.78);
  box-shadow: 0 10px 30px rgba(65, 46, 31, 0.06);
}

.news-card {
  padding: 24px;
}

.news-card time {
  display: block;
  margin-bottom: 16px;
  color: var(--teal);
  font-family: "Yu Gothic", "Hiragino Sans", sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
}

.news-card p,
.price-card p,
.profile-panel p,
.school-copy p,
.access p,
.faq-list p {
  color: #4f5853;
  line-height: 1.85;
}

.concerns {
  padding-top: clamp(56px, 8vw, 92px);
}

.concern-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.concern-list p {
  min-height: 120px;
  margin: 0;
  padding: 22px;
  border: 1px solid rgba(49, 107, 105, 0.28);
  border-radius: var(--radius);
  color: #37443f;
  line-height: 1.8;
  background: rgba(237, 245, 241, 0.65);
}

.services {
  max-width: none;
  background: #f6ece5;
}

.services > * {
  max-width: 1048px;
  margin-inline: auto;
}

.price-card {
  padding: 28px;
}

.price-card.featured {
  border-color: rgba(184, 95, 84, 0.42);
  background: #fff9f3;
  transform: translateY(-10px);
}

.price {
  margin: 22px 0 12px;
  color: var(--coral-dark);
  font-size: 1.42rem;
  font-weight: 700;
}

.note {
  margin: 24px auto 0;
  color: var(--muted);
  font-family: "Yu Gothic", "Hiragino Sans", sans-serif;
  font-size: 0.86rem;
  text-align: center;
}

.profile-panel {
  padding: clamp(28px, 4vw, 44px);
}

.credential-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.credential-list span {
  padding: 9px 12px;
  border: 1px solid rgba(181, 138, 67, 0.36);
  border-radius: 999px;
  color: #5b4a29;
  font-family: "Yu Gothic", "Hiragino Sans", sans-serif;
  font-size: 0.82rem;
  background: rgba(255, 248, 231, 0.75);
}

.school {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  gap: clamp(28px, 7vw, 72px);
  align-items: center;
}

.school-details {
  padding: 18px 24px;
  background: #253f3d;
  color: var(--white);
}

.school-details dl {
  margin: 0;
}

.school-details div {
  display: grid;
  grid-template-columns: 7em 1fr;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(255, 253, 248, 0.18);
}

.school-details div:last-child {
  border-bottom: 0;
}

.school-details dt {
  color: #e7d2a7;
  font-family: "Yu Gothic", "Hiragino Sans", sans-serif;
  font-size: 0.84rem;
}

.school-details dd {
  margin: 0;
  line-height: 1.7;
}

.faq {
  max-width: 920px;
}

.faq-list {
  display: grid;
  gap: 12px;
}

details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.74);
}

summary {
  cursor: pointer;
  padding: 20px 22px;
  color: var(--ink);
  font-size: 1.02rem;
}

details p {
  margin: 0;
  padding: 0 22px 22px;
}

.access {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(360px, 1.14fr);
  gap: clamp(28px, 6vw, 68px);
  align-items: start;
}

.access-box {
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 18px;
  border-bottom: 1px solid rgba(223, 210, 191, 0.86);
  text-align: left;
  vertical-align: top;
  line-height: 1.65;
}

tr:last-child th,
tr:last-child td {
  border-bottom: 0;
}

th {
  width: 7em;
  color: var(--teal);
  font-family: "Yu Gothic", "Hiragino Sans", sans-serif;
  font-size: 0.84rem;
}

td a {
  color: var(--coral-dark);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.contact-cta {
  margin: 0 clamp(18px, 4vw, 56px) clamp(28px, 5vw, 56px);
  padding: clamp(48px, 7vw, 72px) 24px;
  border-radius: 0;
  color: var(--white);
  text-align: center;
  background:
    linear-gradient(135deg, rgba(37, 63, 61, 0.95), rgba(31, 42, 42, 0.95)),
    url("assets/hero-gojokai-regenerated.png") center / cover;
}

.contact-cta .section-label {
  color: #e7d2a7;
}

.contact-cta h2 {
  margin-inline: auto;
  max-width: 12em;
}

.contact-cta p {
  max-width: 640px;
  margin: 18px auto 0;
  color: rgba(255, 253, 248, 0.84);
  line-height: 1.9;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 28px clamp(18px, 4vw, 56px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: "Yu Gothic", "Hiragino Sans", sans-serif;
  font-size: 0.82rem;
}

.site-footer p {
  margin: 0;
}

.nav a[aria-current="page"] {
  color: var(--coral-dark);
  font-weight: 700;
}

.text-link {
  display: inline-flex;
  align-items: center;
  margin-top: 18px;
  color: var(--coral-dark);
  font-family: "Yu Gothic", "Hiragino Sans", sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 5px;
}

.page-hero {
  max-width: 1160px;
  margin: 0 auto;
  padding: clamp(72px, 10vw, 124px) clamp(18px, 4vw, 56px) clamp(48px, 7vw, 84px);
}

.page-hero h1 {
  max-width: 12em;
}

.page-hero p:last-child {
  max-width: 680px;
  margin: 24px 0 0;
  color: #49504b;
  font-size: clamp(1rem, 1.6vw, 1.16rem);
  line-height: 2;
}

.content-section {
  max-width: 1048px;
  margin: 0 auto;
  padding: clamp(48px, 8vw, 88px) clamp(18px, 4vw, 56px);
}

.content-section.soft {
  max-width: none;
  background: rgba(255, 253, 248, 0.58);
}

.content-section.soft > * {
  max-width: 1048px;
  margin-inline: auto;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(220px, 0.78fr) minmax(0, 1.22fr);
  gap: clamp(28px, 7vw, 84px);
  align-items: start;
}

.rich-text {
  color: #424b46;
  font-size: 1.03rem;
  line-height: 2.05;
}

.rich-text p {
  margin: 0;
}

.rich-text p + p {
  margin-top: 18px;
}

.article-stack {
  display: grid;
  gap: 20px;
}

.article-panel {
  padding: clamp(28px, 4vw, 44px);
  border: 1px solid rgba(223, 210, 191, 0.86);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.8);
  box-shadow: 0 10px 30px rgba(65, 46, 31, 0.06);
  scroll-margin-top: 96px;
}

.article-panel h2 {
  margin-top: 12px;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
}

.article-panel p {
  color: #4f5853;
  line-height: 1.95;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: var(--teal);
  font-family: "Yu Gothic", "Hiragino Sans", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
}

.article-meta span {
  padding: 5px 9px;
  border: 1px solid rgba(49, 107, 105, 0.28);
  border-radius: 999px;
  background: rgba(237, 245, 241, 0.72);
}

.mini-table,
.lesson-box {
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(251, 247, 239, 0.72);
  overflow: hidden;
}

.mini-table dl,
.lesson-box dl {
  margin: 0;
}

.mini-table div,
.lesson-box dl div {
  display: grid;
  grid-template-columns: 9em 1fr;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(223, 210, 191, 0.86);
}

.mini-table div:last-child,
.lesson-box dl div:last-child {
  border-bottom: 0;
}

.mini-table dt,
.lesson-box dt {
  color: var(--teal);
  font-family: "Yu Gothic", "Hiragino Sans", sans-serif;
  font-size: 0.86rem;
  font-weight: 700;
}

.mini-table dd,
.lesson-box dd {
  margin: 0;
  color: #4f5853;
  line-height: 1.75;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.feature-card {
  min-height: 240px;
  padding: 28px;
  border: 1px solid rgba(223, 210, 191, 0.86);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.78);
  box-shadow: 0 10px 30px rgba(65, 46, 31, 0.06);
}

.feature-card h2 {
  font-size: clamp(1.45rem, 2.4vw, 2rem);
}

.feature-card p {
  color: #4f5853;
  line-height: 1.9;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.timeline div {
  padding: 24px;
  border: 1px solid rgba(181, 138, 67, 0.3);
  border-radius: var(--radius);
  background: rgba(255, 248, 231, 0.7);
}

.timeline span {
  display: block;
  margin-bottom: 12px;
  color: var(--coral-dark);
  font-family: "Yu Gothic", "Hiragino Sans", sans-serif;
  font-weight: 700;
}

.timeline p {
  margin: 0;
  color: #4f5853;
  line-height: 1.75;
}

.lesson-box {
  display: grid;
  grid-template-columns: minmax(220px, 0.55fr) minmax(0, 1.45fr);
  gap: 28px;
  padding: clamp(28px, 4vw, 44px);
  background: rgba(255, 253, 248, 0.78);
}

.lesson-box .section-label {
  margin-bottom: 12px;
}

.lesson-box .section-label + h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .nav {
    display: none;
  }

  .hero,
  .split,
  .school,
  .two-column,
  .lesson-box,
  .access {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-art {
    min-height: 360px;
    border-radius: var(--radius);
  }

  .hero-art::after {
    background: linear-gradient(180deg, rgba(251, 247, 239, 0.2), rgba(251, 247, 239, 0.68));
  }

  .hero-art .hero-bg {
    min-height: 360px;
  }

  .news-grid,
  .service-layout,
  .concern-list,
  .news-grid.four,
  .feature-grid,
  .timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .price-card.featured {
    transform: none;
  }
}

@media (max-width: 640px) {
  .site-header {
    gap: 12px;
    padding: 12px 16px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .brand small {
    display: none;
  }

  .header-cta {
    min-width: auto;
    padding: 10px 12px;
    font-size: 0.8rem;
  }

  .hero {
    padding-top: 36px;
  }

  h1 {
    max-width: 9em;
  }

  .hero-facts,
  .news-grid,
  .service-layout,
  .concern-list,
  .news-grid.four,
  .feature-grid,
  .timeline {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .button {
    width: 100%;
  }

  .hero-art {
    min-height: 300px;
  }

  .hero-art .hero-bg {
    min-height: 300px;
  }


  .section {
    padding-block: 56px;
  }

  .school-details div,
  .mini-table div,
  .lesson-box dl div {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  th,
  td {
    display: block;
    width: 100%;
    padding: 12px 16px;
  }

  th {
    padding-bottom: 0;
  }

  td {
    padding-top: 6px;
  }
}

/* =========================================================
   追加①：アクセシビリティ（フォーカス可視化・スキップリンク）
   ========================================================= */
a:focus-visible,
button:focus-visible,
.button:focus-visible,
.header-cta:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 10px 16px;
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: "Yu Gothic", "Hiragino Sans", sans-serif;
  background: var(--white);
}
.skip-link:focus {
  left: 8px;
  top: 8px;
}

/* =========================================================
   追加②：グローバルナビ（wp_nav_menu の ul 対応）
   ========================================================= */
.nav-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav-list a {
  color: inherit;
}

/* ヘッダー右側（CTA＋トグルをまとめる） */
.header-end {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-self: end;
}

/* =========================================================
   追加③：ハンバーガーメニュー（モバイルナビの消失を解消）
   ========================================================= */
.nav-toggle {
  display: none;            /* PCでは非表示 */
  width: 44px;              /* タップ領域 44px 確保 */
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.6);
  cursor: pointer;
  place-items: center;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}
.nav-toggle-bars {
  position: relative;
}
.nav-toggle-bars::before {
  position: absolute;
  top: -6px;
  left: 0;
}
.nav-toggle-bars::after {
  position: absolute;
  top: 6px;
  left: 0;
}
.site-header.nav-open .nav-toggle-bars {
  background: transparent;
}
.site-header.nav-open .nav-toggle-bars::before {
  transform: translateY(6px) rotate(45deg);
}
.site-header.nav-open .nav-toggle-bars::after {
  transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 980px) {
  .nav-toggle {
    display: grid;          /* モバイルで表示 */
  }
  /* 既存ルールの .nav { display:none } をここで上書きし、ドロップダウン化 */
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: block;
    max-height: 0;
    padding: 0 clamp(18px, 4vw, 56px);
    overflow: hidden;
    visibility: hidden;
    border-bottom: 1px solid var(--line);
    background: rgba(251, 247, 239, 0.98);
    box-shadow: var(--shadow);
    transition: max-height 0.25s ease, visibility 0.25s ease;
  }
  .site-header.nav-open .nav {
    max-height: 80vh;
    padding-top: 8px;
    padding-bottom: 14px;
    visibility: visible;
    overflow-y: auto;
  }
  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .nav-list li + li {
    border-top: 1px solid rgba(223, 210, 191, 0.7);
  }
  .nav-list a {
    display: block;
    padding: 15px 4px;       /* タップしやすい高さ */
  }
}

/* =========================================================
   追加④：ヒーローを全面背景化（メインビジュアル）
   ========================================================= */
.hero {
  display: flex;
  align-items: center;
  position: relative;
  max-width: none;
  margin: 0;
  padding: 0;
  min-height: min(680px, calc(100svh - 96px));
  overflow: hidden;
}
.hero-bg-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg-layer img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero-bg-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg,
    rgba(251, 247, 239, 0.95) 0%,
    rgba(251, 247, 239, 0.80) 42%,
    rgba(251, 247, 239, 0.45) 72%,
    rgba(251, 247, 239, 0.28) 100%);
}
.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(44px, 8vw, 84px) clamp(18px, 4vw, 56px);
}
.hero-copy {
  max-width: 620px;
}
@media (max-width: 700px) {
  .hero {
    min-height: min(560px, calc(100svh - 80px));
  }
  .hero-bg-layer::after {
    background: linear-gradient(180deg,
      rgba(251, 247, 239, 0.9) 0%,
      rgba(251, 247, 239, 0.82) 55%,
      rgba(251, 247, 239, 0.74) 100%);
  }
  .hero-copy {
    max-width: none;
  }
}

/* =========================================================
   追加⑤：お問い合わせページ（見出し控えめ・フォーム整形）
   ========================================================= */
.page-hero--compact {
  padding: clamp(48px, 7vw, 84px) clamp(18px, 4vw, 56px) clamp(20px, 4vw, 36px);
}
.page-hero--compact h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  max-width: none;
}
.form-wrap {
  max-width: 640px;
  margin: 0 auto;
}

/* --- Contact Form 7 の体裁 --- */
.wpcf7 p { margin: 0 0 18px; }
.wpcf7 label {
  font-family: "Yu Gothic", "Hiragino Sans", sans-serif;
  font-size: 0.92rem;
}
.wpcf7-form-control-wrap { display: block; margin-top: 6px; }
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="url"],
.wpcf7 input[type="number"],
.wpcf7 input[type="date"],
.wpcf7 textarea,
.wpcf7 select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  font: inherit;
}
.wpcf7 textarea { min-height: 170px; resize: vertical; }
.wpcf7 input:focus,
.wpcf7 textarea:focus,
.wpcf7 select:focus {
  outline: 2px solid var(--teal);
  outline-offset: 1px;
  border-color: var(--teal);
}
.wpcf7 .wpcf7-submit {
  display: inline-flex;
  min-height: 48px;
  min-width: 160px;
  align-items: center;
  justify-content: center;
  padding: 13px 28px;
  border: 1px solid var(--coral-dark);
  border-radius: 999px;
  background: var(--coral-dark);
  color: var(--white);
  font-family: "Yu Gothic", "Hiragino Sans", sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.wpcf7 .wpcf7-submit:hover { transform: translateY(-1px); box-shadow: var(--shadow); }

/* 本文（.rich-text）の見出し・リストの余白調整 */
.rich-text > :first-child { margin-top: 0; }
.rich-text h2 {
  margin: 2em 0 0.55em;
  font-size: clamp(1.5rem, 3.4vw, 2rem);
  line-height: 1.4;
}
.rich-text h3 {
  margin: 1.7em 0 0.4em;
  font-size: clamp(1.2rem, 2.6vw, 1.45rem);
  line-height: 1.45;
}
.rich-text p { line-height: 2.05; }
.rich-text p + p { margin-top: 1.1em; }
.rich-text ul,
.rich-text ol {
  margin: 0.5em 0 0;
  padding-left: 1.3em;
}
.rich-text li { margin-top: 8px; line-height: 1.9; }
.rich-text li:first-child { margin-top: 0; }

/* ヘッダーのロゴ画像 */
.brand-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  display: block;
}

/* 五常とは セクション */
.gojo-lead { max-width: 760px; margin: 0 auto 32px; line-height: 2; color: #424b46; }
.gojo-list { display: grid; gap: 14px; max-width: 760px; margin: 0 auto; }
.gojo-list > div {
  display: grid; grid-template-columns: 88px 1fr; gap: 16px; align-items: baseline;
  padding: 16px 18px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
}
.gojo-list dt { font-size: 1.5rem; font-weight: 700; line-height: 1.2; }
.gojo-list dt span { display: block; font-size: 0.72rem; font-weight: 400; color: #7a8079; margin-top: 2px; }
.gojo-list dd { margin: 0; line-height: 1.9; }
@media (max-width: 560px) {
  .gojo-list > div { grid-template-columns: 64px 1fr; gap: 12px; }
  .gojo-list dt { font-size: 1.3rem; }
}

/* =========================================================
   和風背景パターンの適用（body ＋ 色付きの明るいセクション帯）
   ▼パターンの差し替えは :root の --wa-bg / --wa-bg-size / --wa-bg-pos の3値だけ。
     下の案1・案2の3行を :root にコピーすれば切り替わります。

   案1 和紙×微グリッド：
     --wa-bg: linear-gradient(rgba(196,178,144,0.12) 1px, transparent 1px), linear-gradient(90deg, rgba(196,178,144,0.12) 1px, transparent 1px);
     --wa-bg-size: 28px 28px;
     --wa-bg-pos: 0 0;

   案2 青海波：
     --wa-bg: radial-gradient(circle at 50% 100%, transparent 24%, rgba(176,146,101,0.11) 25% 29%, transparent 30% 46%, rgba(176,146,101,0.11) 47% 51%, transparent 52%), radial-gradient(circle at 50% 0%, transparent 24%, rgba(176,146,101,0.11) 25% 29%, transparent 30% 46%, rgba(176,146,101,0.11) 47% 51%, transparent 52%);
     --wa-bg-size: 46px 46px;
     --wa-bg-pos: 0 0, 23px 23px;

   案3 市松（現在の設定）：
     --wa-bg: conic-gradient(rgba(150,130,95,0.06) 90deg, transparent 90deg 180deg, rgba(150,130,95,0.06) 180deg 270deg, transparent 270deg);
     --wa-bg-size: 44px 44px;
     --wa-bg-pos: 0 0;
   ========================================================= */

/* 旧・薄いグリッド層は新パターンと二重になるため無効化（戻したい場合はこの1ブロックを削除） */
body::before { display: none; }

/* ページ全体のベース背景 */
body {
  background-color: #faf6ee;
  background-image: var(--wa-bg);
  background-size: var(--wa-bg-size);
  background-position: var(--wa-bg-pos);
}

/* 色付きの明るいセクション帯にも同じ文様を重ねる（帯の色はそのまま保持） */
.section.services,
.section.muted {
  background-image: var(--wa-bg);
  background-size: var(--wa-bg-size);
  background-position: var(--wa-bg-pos);
}
