/* ============================================================
   共通ヘッダー（.gh）・全画面メニュー（.gm）・フッター（.gf）
   テーマ全ページとサービスページ（静的HTML）の両方で読み込む。
   色・余白はサービスページのデザインルールの値をそのまま使用。
   ============================================================ */
:root {
  --gh-orange: #EA700F;
  --gh-orange-strong: #C25000;
  --gh-orange-text: #B35300;
  --gh-brown: #7B3E10;
  --gh-navy: #2B4170;
  --gh-navy-deep: #1C2B4D;
  --gh-navy-tint: #E6EAF3;
  --gh-cream: #FCF2E6;
  --gh-border: #F0E2D0;
  --gh-base: #050F1C;
  --gh-text: #5A5148;
  --gh-white: #FFFFFF;
  --gh-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.10);
  --gh-grad: linear-gradient(135deg, #D96208 0%, #EA700F 45%, #7B3E10 100%);
  --gh-pop: cubic-bezier(0.34, 1.56, 0.64, 1);
}

:where(.gh, .gh *, .gh *::before, .gh *::after,
.gf, .gf *, .gf *::before, .gf *::after) { box-sizing: border-box; margin: 0; padding: 0; }
:where(.gh, .gf) ul { list-style: none; }
:where(.gh, .gf) a { color: inherit; text-decoration: none; }
:where(.gh, .gf) img { display: block; max-width: 100%; height: auto; }
:where(.gh) button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ---------- ヘッダーバー ---------- */
.gh {
  position: fixed;
  top: 16px;
  left: 0;
  width: 100%;
  padding: 0 12px;
  z-index: 1000;
  font-family: 'Noto Sans JP', sans-serif;
}
@media (min-width: 768px) { .gh { top: 32px; padding: 0 20px; } }
.gh__bar {
  max-width: 1440px;
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 12px 0 20px;
  border-radius: 10px;
  background: var(--gh-white);
  box-shadow: var(--gh-shadow);
}
@media (min-width: 768px) { .gh__bar { height: 80px; padding: 0 16px 0 24px; } }
.gh__logo { flex-shrink: 0; width: 110px; transition: opacity 0.3s; }
@media (min-width: 768px) { .gh__logo { width: 140px; } }
.gh__logo:hover { opacity: 0.8; }

.gh__nav { display: none; }
@media (min-width: 1024px) {
  .gh__nav { display: flex; align-items: center; gap: 24px; }
}
.gh__list { display: flex; align-items: center; gap: 4px; }
.gh__item { position: relative; }
.gh__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--gh-brown);
  white-space: nowrap;
  transition: background-color 0.3s, color 0.3s;
}
@media (min-width: 1280px) { .gh__link { padding: 10px 18px; } }
.gh__link:hover, .gh__item--has-sub.is-open > .gh__link { background: var(--gh-cream); color: var(--gh-orange-text); }
.gh__caret {
  width: 7px; height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.3s var(--gh-pop);
}
.gh__item--has-sub.is-open .gh__caret { transform: translateY(1px) rotate(225deg); }

.gh__cta, .gm__cta, .gf__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 10px;
  background: var(--gh-orange-strong);
  color: var(--gh-white);
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  transition: opacity 0.3s;
}
.gh__cta { padding: 12px 28px; font-size: 15px; }
.gh__cta:hover, .gm__cta:hover, .gf__cta:hover { opacity: 0.8; }
.gh__cta-icon { width: 20px; height: 20px; flex-shrink: 0; }

/* サービスのドロップダウン */
.gh__sub {
  position: absolute;
  top: 100%;
  left: 50%;
  padding-top: 18px;
  width: 560px;
  transform: translateX(-50%);
  visibility: hidden;
  pointer-events: none;
}
.gh__sub-inner {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 16px;
  padding: 16px;
  border-radius: 16px;
  background: var(--gh-white);
  box-shadow: 0 8px 24px 0 rgba(234, 112, 15, 0.10), var(--gh-shadow);
  opacity: 0;
  transform: translateY(-10px) scale(0.96);
  transform-origin: top center;
  transition: opacity 0.25s, transform 0.35s var(--gh-pop);
}
.gh__sub::before {
  content: "";
  position: absolute;
  top: 12px; left: 50%;
  width: 14px; height: 14px;
  margin-left: -7px;
  background: var(--gh-white);
  transform: rotate(45deg);
  border-radius: 2px;
  opacity: 0;
  transition: opacity 0.25s;
}
.gh__item--has-sub.is-open .gh__sub { visibility: visible; pointer-events: auto; }
.gh__item--has-sub.is-open .gh__sub-inner { opacity: 1; transform: none; }
.gh__item--has-sub.is-open .gh__sub::before { opacity: 1; }
.gh__sub-all {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 16px;
  border-radius: 10px;
  background: var(--gh-grad);
  color: var(--gh-white);
  transition: opacity 0.3s;
}
.gh__sub-all:hover { opacity: 0.85; }
.gh__sub-en { font-family: 'Lato', sans-serif; font-weight: 800; font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; opacity: 0.85; }
.gh__sub-ttl { font-size: 17px; font-weight: 700; letter-spacing: 0.04em; }
.gh__sub-more { margin-top: 8px; font-size: 12px; font-weight: 700; }
.gh__sub-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.gh__sub-card {
  display: block;
  padding: 8px;
  border: 1px solid var(--gh-border);
  border-radius: 10px;
  transition: border-color 0.3s, background-color 0.3s;
}
.gh__sub-card:hover { border-color: var(--gh-orange); background: var(--gh-cream); }
.gh__sub-thumb { display: block; aspect-ratio: 16 / 10; border-radius: 6px; overflow: hidden; background: var(--gh-cream); }
.gh__sub-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gh__sub-name { display: block; margin-top: 8px; font-size: 14px; font-weight: 700; letter-spacing: 0.03em; color: var(--gh-brown); text-align: center; }

/* ハンバーガー */
.gh__burger {
  position: relative;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--gh-orange-strong);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: transform 0.4s var(--gh-pop);
}
.gh__burger:hover { transform: scale(1.06); }
.gh__burger span { display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--gh-white); transition: transform 0.4s var(--gh-pop), width 0.3s; }
.gh__burger span:nth-child(2) { width: 14px; margin-left: 6px; }
.gh__burger:hover span:nth-child(2) { width: 20px; margin-left: 0; }
@media (min-width: 1024px) { .gh__burger { display: none; } }

/* ---------- 全画面メニュー ---------- */
.gm {
  position: fixed;
  inset: 0;
  z-index: 1001;
  visibility: hidden;
  pointer-events: none;
  color: var(--gh-white);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.gm__bg {
  position: fixed;
  inset: 0;
  background: var(--gh-grad);
  clip-path: circle(0 at var(--gm-x, calc(100% - 44px)) var(--gm-y, 52px));
  transition: clip-path 0.6s cubic-bezier(0.7, 0, 0.2, 1);
}
.gm__dots {
  position: fixed;
  right: -20px; bottom: 80px;
  width: 200px; height: 200px;
  background-image: radial-gradient(rgba(255, 255, 255, 0.22) 2px, transparent 2px);
  background-size: 16px 16px;
  opacity: 0;
  transition: opacity 0.4s;
}
.gm.is-open { visibility: visible; pointer-events: auto; }
.gm.is-open .gm__bg { clip-path: circle(150% at var(--gm-x, calc(100% - 44px)) var(--gm-y, 52px)); }
.gm.is-open .gm__dots { opacity: 1; transition-delay: 0.3s; }
.gm.is-closing { visibility: visible; }
.gm.is-closing .gm__bg { transition-duration: 0.45s; }

.gm__head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1440px;
  height: 72px;
  margin: 16px 12px 0;
  padding: 0 12px 0 20px;
  border-radius: 10px;
  background: var(--gh-white);
  opacity: 0;
  transform: translateY(-16px);
  transition: opacity 0.3s, transform 0.5s var(--gh-pop);
}
@media (min-width: 768px) { .gm__head { height: 80px; margin: 32px 20px 0; } }
.gm.is-open .gm__head { opacity: 1; transform: none; transition-delay: 0.15s; }
.gm__logo { width: 110px; }
@media (min-width: 768px) { .gm__logo { width: 140px; } }
.gm__close {
  position: relative;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--gh-orange-strong);
  transform: rotate(-180deg) scale(0.4);
  transition: transform 0.6s var(--gh-pop);
}
.gm.is-open .gm__close { transform: none; transition-delay: 0.2s; }
.gm__close:hover { transform: rotate(90deg) !important; transition-delay: 0s !important; }
.gm__close span { position: absolute; top: 50%; left: 50%; width: 22px; height: 2px; margin: -1px 0 0 -11px; border-radius: 2px; background: var(--gh-white); }
.gm__close span:first-child { transform: rotate(45deg); }
.gm__close span:last-child { transform: rotate(-45deg); }

.gm__body { position: relative; max-width: 640px; margin: 0 auto; padding: 32px 28px 48px; }
@media (min-width: 768px) { .gm__body { padding-top: 56px; } }
.gm__item, .gm__foot {
  opacity: 0;
  transform: translateY(32px) scale(0.92) rotate(-2deg);
  transition: opacity 0.3s, transform 0.6s var(--gh-pop);
}
.gm.is-open .gm__item, .gm.is-open .gm__foot {
  opacity: 1;
  transform: none;
  transition-delay: calc(0.22s + var(--i, 0) * 0.06s);
}
.gm.is-closing .gm__item, .gm.is-closing .gm__foot, .gm.is-closing .gm__head { transition-delay: 0s; transition-duration: 0.2s; }
.gm__item { border-bottom: 1px solid rgba(255, 255, 255, 0.28); }
.gm__link { display: flex; align-items: baseline; gap: 16px; padding: 18px 4px; transition: opacity 0.3s; }
.gm__link:hover { opacity: 0.75; }
.gm__en {
  width: 72px;
  flex-shrink: 0;
  font-family: 'Lato', sans-serif;
  font-weight: 800;
  font-style: italic;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.8;
}
.gm__label { font-size: 22px; font-weight: 700; letter-spacing: 0.06em; }
@media (min-width: 768px) { .gm__label { font-size: 26px; } }
.gm__sub { display: flex; flex-wrap: wrap; gap: 8px; margin: -6px 0 18px 92px; }
.gm__sub a {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  transition: background-color 0.3s, color 0.3s;
}
.gm__sub a:hover { background: var(--gh-white); color: var(--gh-orange-text); }
.gm__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-top: 32px; }
.gm__char { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.gm__char img { width: 96px; }
.gm.is-open .gm__char img { animation: gm-hop 0.8s var(--gh-pop) 0.6s both; }
.gm__bubble {
  padding: 6px 14px;
  border: 2px solid var(--gh-navy);
  border-radius: 999px;
  background: var(--gh-white);
  color: var(--gh-navy-deep);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.gm__cta { flex: 1; max-width: 340px; padding: 16px 24px; background: var(--gh-white); color: var(--gh-orange-text); font-size: 16px; }
@keyframes gm-hop {
  0% { transform: translateY(40px) scale(0.6); opacity: 0; }
  55% { transform: translateY(-12px) scale(1.05); opacity: 1; }
  75% { transform: translateY(0) scale(0.97); }
  100% { transform: none; opacity: 1; }
}
@media (max-width: 400px) {
  .gm__foot { flex-direction: column; align-items: stretch; }
  .gm__cta { max-width: none; }
  .gm__sub { margin-left: 0; }
}
body.gm-lock { overflow: hidden; }

/* ---------- フッター ---------- */
.gf {
  position: relative;
  margin-top: 0;
  padding: 80px 20px 24px;
  background: var(--gh-base);
  color: var(--gh-white);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 14px;
  line-height: 1.8;
  letter-spacing: 0.04em;
}
@media (min-width: 768px) { .gf { padding: 96px 40px 32px; } }
.gf__char { position: absolute; top: -52px; right: 8%; width: 110px; pointer-events: none; }
@media (min-width: 768px) { .gf__char { top: -66px; width: 150px; } }
.gf__inner { max-width: 1200px; margin: 0 auto; display: grid; gap: 48px; }
@media (min-width: 1024px) { .gf__inner { grid-template-columns: 360px 1fr; gap: 64px; } }
.gf__logo { display: inline-block; width: 180px; padding: 12px 16px; border-radius: 10px; background: var(--gh-white); transition: opacity 0.3s; }
.gf__logo:hover { opacity: 0.85; }
.gf__catch { margin-top: 20px; font-size: 16px; font-weight: 700; }
.gf__catch span { color: var(--gh-orange); }
.gf__info { margin-top: 12px; font-size: 13px; font-weight: 300; opacity: 0.8; }
.gf__cta { margin-top: 24px; padding: 14px 32px; font-size: 15px; }
.gf__nav { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px 24px; }
@media (min-width: 768px) { .gf__nav { grid-template-columns: repeat(3, 1fr); } }
.gf__head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--gh-orange);
}
.gf__head::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gh-orange); }
.gf__col li + li { margin-top: 8px; }
.gf__col a { font-weight: 300; transition: opacity 0.3s; }
.gf__col a:hover { opacity: 0.7; }
.gf__bottom {
  max-width: 1200px;
  margin: 48px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 300;
  font-size: 12px;
}
.gf__top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--gh-orange-strong);
  font-size: 18px;
  font-weight: 700;
  transition: opacity 0.3s;
}
.gf__top:hover { opacity: 0.8; }

/* WordPress管理バー表示時 */
.admin-bar .gh { top: 62px; }
@media (min-width: 783px) { .admin-bar .gh { top: 64px; } }

@media (prefers-reduced-motion: reduce) {
  .gh *, .gm, .gm * { transition-duration: 0.01ms !important; transition-delay: 0s !important; animation: none !important; }
}

/* ドロップダウンはテキストのみ（2026-10-18 FB） */
.gh__sub { width: 420px; }
.gh__sub-inner { grid-template-columns: 150px 1fr; align-items: stretch; }
.gh__sub-list { grid-template-columns: 1fr; gap: 8px; align-content: center; }
.gh__sub-card { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; }
.gh__sub-card::after { content: "›"; font-weight: 700; color: var(--gh-orange); }
.gh__sub-name { margin-top: 0; text-align: left; font-size: 15px; }

/* ドロップダウン：シンプルなテキストリスト（2026-10-18 FB） */
.gh__sub { width: 220px; }
.gh__sub-inner { display: block; padding: 8px; border-radius: 12px; }
.gh__sub-inner li + li { margin-top: 2px; }
.gh__sub-link {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--gh-brown);
  transition: background-color 0.3s, color 0.3s;
}
.gh__sub-link:hover { background: var(--gh-cream); color: var(--gh-orange-text); }

/* フッター：サービス一覧の配下をインデント（2026-10-18 FB） */
.gf__col li.gf__child { position: relative; padding-left: 20px; }
.gf__col li.gf__child::before { content: ""; position: absolute; left: 6px; top: 0.35em; width: 8px; height: 8px; border-left: 1px solid rgba(255, 255, 255, 0.45); border-bottom: 1px solid rgba(255, 255, 255, 0.45); }
