@charset "UTF-8";

/*!
Theme Name: 本町田町内会 ほっこり
Description: 本町田町内会サイト用 Cocoon 子テーマ（ほっこり型）
Template: cocoon-master
Version: 1.0.0
*/

/* ============================================================
   本町田町内会サイト オリジナルデザインCSS
   ------------------------------------------------------------
   デザインコンセプト：
   - 全体：和紙のような温かみのある背景 × 松葉色の落ち着き
           × 柿色のアクセントで「しっかりしているが温かい」印象
   - 消防団コーナー：濃紺 × 信号赤で「頼りがいのある専門性」を表現
   ============================================================ */

/* ---------- 1. カラー・タイポグラフィ変数定義 ---------- */
:root {
  /* 町内会全体カラー */
  --hm-paper:       #F7F1E3;  /* 和紙のような温かい背景色 */
  --hm-paper-deep:  #EFE6CF;  /* セクション区切り用の濃いめ紙色 */
  --hm-ink:         #2B2B28;  /* 墨色（本文テキスト） */
  --hm-pine:        #2F4A3D;  /* 松葉色（信頼・見出し） */
  --hm-pine-deep:   #223A2F;  /* 濃い松葉色（ホバー等） */
  --hm-kaki:        #C6672E;  /* 柿色（アクセント・提灯を連想） */
  --hm-kaki-deep:   #A8511F;  /* 濃い柿色（ホバー） */
  --hm-sand:        #D9C9A3;  /* 砂色（枠線・区切り） */
  --hm-white:       #FFFDF8;

  /* 消防団コーナー専用カラー */
  --sb-navy:        #16233A;  /* 濃紺（背景） */
  --sb-navy-deep:   #0F1826;  /* さらに濃い紺（ヘッダー等） */
  --sb-red:         #C8372C;  /* 信号赤（アクセント） */
  --sb-steel:       #6B7280;  /* スチールグレー（サブ要素） */
  --sb-text:        #F5F0E6;  /* 濃色背景上の温かい白 */

  /* タイポグラフィ */
  --hm-font-display: "Noto Serif JP", serif;   /* 見出し：明朝体で品格を */
  --hm-font-body:     "Noto Sans JP", sans-serif; /* 本文：ゴシックで可読性 */
}

/* Google Fonts 読み込み */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@500;700&family=Noto+Sans+JP:wght@400;500;700&display=swap');

/* ---------- 2. 全体の基本スタイル ---------- */
body {
  background-color: var(--hm-paper);
  color: var(--hm-ink);
  font-family: var(--hm-font-body);
}

h1, h2, h3, h4,
.article h1, .article h2, .article h3,
.page-title {
  font-family: var(--hm-font-display);
  color: var(--hm-pine);
  letter-spacing: 0.02em;
}

a {
  color: var(--hm-pine);
  transition: color 0.2s ease;
}
a:hover {
  color: var(--hm-kaki);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--hm-kaki);
  outline-offset: 2px;
}

/* ---------- 3. シグネチャー要素：町内会エンブレム（丸紋） ---------- */
.hm-emblem {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--hm-white);
  border: 2px solid var(--hm-pine);
  position: relative;
  flex-shrink: 0;
}
.hm-emblem::before {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  background: var(--hm-kaki);
  border-radius: 50%;
}
.hm-emblem::after {
  content: "";
  position: absolute;
  width: 30px;
  height: 30px;
  border: 1.5px solid var(--hm-pine);
  border-radius: 50%;
  opacity: 0.5;
}

/* ---------- 4. ヘッダー・ナビゲーション ---------- */
#header-container,
.site-header {
  background-color: var(--hm-white);
  border-bottom: 3px solid var(--hm-pine);
}

.site-name a,
#site-title a {
  font-family: var(--hm-font-display);
  font-weight: 700;
  color: var(--hm-pine);
}

#navi,
.navi {
  background-color: var(--hm-pine);
}
#navi a,
.navi a {
  color: var(--hm-white) !important;
  font-family: var(--hm-font-body);
}
#navi li:hover > a,
.navi li:hover > a {
  background-color: var(--hm-pine-deep);
}

/* ---------- 5. ボタン・CTA ---------- */
.hm-button,
.wp-block-button__link,
.btn-search {
  display: inline-block;
  padding: 0.75em 1.75em;
  background-color: var(--hm-kaki);
  color: var(--hm-white) !important;
  border-radius: 4px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.15s ease;
}
.hm-button:hover,
.wp-block-button__link:hover {
  background-color: var(--hm-kaki-deep);
  transform: translateY(-1px);
}

/* ---------- 6. セクション区切り・カード ---------- */
.hm-divider {
  height: 2px;
  margin: 3em auto;
  max-width: 120px;
  background: repeating-linear-gradient(
    90deg,
    var(--hm-sand) 0, var(--hm-sand) 8px,
    transparent 8px, transparent 14px
  );
}

.hm-card {
  background-color: var(--hm-white);
  border: 1px solid var(--hm-sand);
  border-radius: 6px;
  padding: 1.5em;
  box-shadow: 0 2px 6px rgba(43, 43, 40, 0.06);
}

/* ---------- 7. フッター ---------- */
#footer,
.footer {
  background-color: var(--hm-paper-deep);
  color: var(--hm-ink);
  border-top: 1px solid var(--hm-sand);
}

/* ============================================================
   消防団コーナー専用スタイル
   使い方：固定ページ側で本文全体を
   <div class="shoubodan-section"> ... </div>
   で囲むことで、このセクションだけ配色・雰囲気が切り替わります。
   ============================================================ */
.shoubodan-section {
  background-color: var(--sb-navy);
  color: var(--sb-text);
  padding: 3em 2em;
  border-radius: 6px;
  position: relative;
  overflow: hidden;
}

.shoubodan-section::before,
.shoubodan-section::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 6px;
  background: repeating-linear-gradient(
    45deg,
    var(--sb-red) 0, var(--sb-red) 10px,
    var(--sb-navy-deep) 10px, var(--sb-navy-deep) 20px
  );
}
.shoubodan-section::before { top: 0; }
.shoubodan-section::after  { bottom: 0; }

.shoubodan-section h1,
.shoubodan-section h2,
.shoubodan-section h3 {
  color: var(--sb-text);
  border-left: 5px solid var(--sb-red);
  padding-left: 0.6em;
}

.shoubodan-section a {
  color: #FFD9A0;
}
.shoubodan-section a:hover {
  color: var(--sb-red);
}

.shoubodan-unit-number {
  display: inline-block;
  font-family: var(--hm-font-display);
  font-size: 2.4em;
  font-weight: 700;
  color: var(--sb-red);
  line-height: 1;
  margin-bottom: 0.2em;
}

.shoubodan-section .hm-button {
  background-color: var(--sb-red);
}
.shoubodan-section .hm-button:hover {
  background-color: #A32C22;
}

/* ============================================================
   レスポンシブデザイン用のメディアクエリ
   ============================================================ */
/*1023px以下*/
@media screen and (max-width: 1023px){
  /*必要ならばここにコードを書く*/
}

/*834px以下*/
@media screen and (max-width: 834px){
  .shoubodan-unit-number {
    font-size: 2em;
  }
}

/*480px以下*/
@media screen and (max-width: 480px){
  .shoubodan-unit-number {
    font-size: 1.8em;
  }
  .hm-emblem {
    width: 36px;
    height: 36px;
  }
}

/* ---------- モーション低減への配慮 ---------- */
@media (prefers-reduced-motion: reduce) {
  .hm-button,
  a {
    transition: none;
  }
}

/* ============================================================
   本町田町内会サイト 追加レイアウト部品
   2026-07-08 Codex追記
   ============================================================ */

.hm-hero {
  margin: 0 0 2.5em;
  padding: clamp(3rem, 7vw, 5.5rem) 1.5rem;
  background:
    linear-gradient(90deg, rgba(247, 241, 227, 0.96), rgba(247, 241, 227, 0.78)),
    url("./assets/honmachida/hero-hokkori.svg") center / cover no-repeat,
    var(--hm-paper);
  border-bottom: 1px solid var(--hm-sand);
}

.hm-hero__body {
  max-width: 1080px;
  margin: 0 auto;
}

.hm-eyebrow {
  margin: 0 0 0.8em;
  color: var(--hm-kaki);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.hm-hero h1 {
  max-width: 760px;
  margin: 0 0 0.6em;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.35;
}

.hm-hero p {
  max-width: 720px;
  line-height: 1.95;
}

.hm-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8em;
  margin-top: 1.6em;
}

.hm-section {
  max-width: 1080px;
  margin: 0 auto 3em;
  padding: 0 1.2rem;
}

.hm-section__heading {
  margin-bottom: 1.4em;
  padding-bottom: 0.7em;
  border-bottom: 2px solid var(--hm-sand);
}

.hm-section__heading h2 {
  margin: 0;
}

.hm-card-grid,
.shoubodan-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2em;
}

.shoubodan-feature-grid {
  margin-top: 1.4em;
}

.shoubodan-feature-grid > div {
  padding: 1.2em;
  border: 1px solid rgba(245, 240, 230, 0.28);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
}

.shoubodan-feature-grid h3 {
  margin-top: 0;
}

@media screen and (max-width: 480px) {
  .hm-hero {
    padding: 2.6rem 1rem;
  }

  .hm-hero__actions .hm-button {
    width: 100%;
    text-align: center;
  }
}




/* ============================================================
   本町田町内会サイト 写真ヒーロー・固定メニュー・消防団導線
   2026-07-08 Codex追記
   ============================================================ */
.hm-site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  max-width: 1080px;
  margin: 0 auto 1.5rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--hm-line, var(--hm-sand, #d8dee8));
}
.hm-site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 0.9rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.74);
}
.hm-site-nav a:hover {
  transform: translateY(-1px);
}
.hm-hero {
  min-height: 520px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.hm-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: inherit;
  z-index: 0;
}
.hm-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.hm-hero__body {
  position: relative;
  z-index: 2;
}
.hm-shoubodan-front {
  margin-top: 2rem;
}
.hm-shoubodan-note {
  margin-top: 1.5rem;
  padding: 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}
@media screen and (max-width: 720px) {
  .hm-site-nav {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  .hm-site-nav a {
    white-space: nowrap;
  }
  .hm-hero {
    min-height: 460px;
  }
}
.hm-hero {
  background:
    linear-gradient(90deg, rgba(255, 247, 232, 0.97), rgba(255, 247, 232, 0.78) 54%, rgba(255, 247, 232, 0.38)),
    url("./assets/honmachida/hero-photo.png") center / cover no-repeat !important;
}
.hm-hero::after {
  background: linear-gradient(180deg, rgba(255, 247, 232, 0.05), rgba(255, 247, 232, 0.30));
}

/* ============================================================
   本町田町内会サイト サイドバー非表示・1カラム固定
   2026-07-08 Codex追記
   ============================================================ */
.sidebar,
#sidebar,
.widget-area,
.sidebar-scroll,
#sidebar-scroll {
  display: none !important;
}

.content-in,
.main-in,
.wrap,
.container,
#container,
#content,
.content,
.main,
#main {
  max-width: 1280px;
}

.content-in,
#content-in {
  display: block !important;
}

.main,
#main,
.content,
#content {
  width: 100% !important;
  float: none !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.honmachida-page,
.honmachida-front-page {
  width: 100%;
}

.honmachida-page .hm-section,
.honmachida-front-page .hm-section,
.honmachida-page .hm-site-nav,
.honmachida-front-page .hm-site-nav {
  max-width: 1080px;
}

.honmachida-front-page .hm-hero {
  max-width: 1196px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================================
   本町田町内会サイト ヘッダーメニュー
   2026-07-08 Codex追記
   ============================================================ */
.hm-site-nav {
  display: none !important;
}
.hm-header-nav-wrap {
  width: 100%;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  border-bottom: 1px solid rgba(0, 0, 0, 0.10);
  background: var(--hm-white, #ffffff);
}
.hm-header-nav {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1rem;
}
.hm-header-nav__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0.8rem 0;
  list-style: none;
}
.hm-header-nav__list li {
  margin: 0;
}
.hm-header-nav__list a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 0.85rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 800;
  line-height: 1.4;
}
.hm-header-nav__list a:hover {
  background: rgba(0, 0, 0, 0.06);
}
@media screen and (max-width: 720px) {
  .hm-header-nav {
    overflow-x: auto;
  }
  .hm-header-nav__list {
    flex-wrap: nowrap;
    justify-content: flex-start;
  }
  .hm-header-nav__list a {
    white-space: nowrap;
  }
}


/* 2026-07-08 Codex fix: Cocoon body.sidebar-right/body.sidebar-left を非表示にしない */
body.sidebar-right,
body.sidebar-left {
  display: block !important;
}
/* 2026-07-08 Codex fix: Cocoon .header height:100% による上部余白を解除 */
#header,
.header {
  height: auto !important;
}
/* 2026-07-08 Codex layout fix: centered shell and slideshow hero */
body.no-sidebar #container,
body.no-sidebar .container,
#header-container,
.header-container,
#navi,
.navi,
.footer {
  max-width: 1280px;
  margin-left: auto !important;
  margin-right: auto !important;
}

body.no-sidebar #content,
body.no-sidebar .content,
body.no-sidebar #main,
body.no-sidebar .main {
  max-width: 1280px;
  margin-left: auto !important;
  margin-right: auto !important;
}

.honmachida-front-page {
  box-sizing: border-box;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

.honmachida-front-page .hm-hero {
  box-sizing: border-box;
  width: calc(100% - 4rem);
  max-width: 1196px;
  margin: 0 auto 3rem;
}

.hm-hero--slideshow {
  background: var(--hm-paper, #fff7e8) !important;
  isolation: isolate;
}

.hm-hero__slides,
.hm-hero__slide {
  position: absolute;
  inset: 0;
}

.hm-hero__slides {
  z-index: 0;
  overflow: hidden;
}

.hm-hero__slide {
  opacity: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  animation: hmHeroSlide 18s infinite;
  transform: scale(1.02);
}

.hm-hero__slide--1 {
  background-image: linear-gradient(90deg, rgba(255, 247, 232, 0.97), rgba(255, 247, 232, 0.84) 46%, rgba(255, 247, 232, 0.34)), url("./assets/carousel/carousel-01.png");
}

.hm-hero__slide--2 {
  background-image: linear-gradient(90deg, rgba(255, 247, 232, 0.97), rgba(255, 247, 232, 0.84) 46%, rgba(255, 247, 232, 0.34)), url("./assets/carousel/carousel-02.png");
  animation-delay: 6s;
}

.hm-hero__slide--3 {
  background-image: linear-gradient(90deg, rgba(255, 247, 232, 0.97), rgba(255, 247, 232, 0.84) 46%, rgba(255, 247, 232, 0.34)), url("./assets/carousel/carousel-03.png");
  animation-delay: 12s;
}

.hm-hero__body {
  box-sizing: border-box;
  width: min(58%, 680px);
  margin-left: clamp(2rem, 7vw, 6rem);
  margin-right: auto;
  text-wrap: balance;
}

.hm-hero h1 {
  max-width: 620px;
  font-size: clamp(2.3rem, 3.3vw, 3.8rem);
  line-height: 1.22;
}

.hm-hero p {
  max-width: 620px;
}

.hm-hero__actions {
  align-items: center;
}

@keyframes hmHeroSlide {
  0% { opacity: 0; transform: scale(1.02); }
  8% { opacity: 1; }
  33% { opacity: 1; }
  41% { opacity: 0; transform: scale(1.06); }
  100% { opacity: 0; transform: scale(1.02); }
}

@media (prefers-reduced-motion: reduce) {
  .hm-hero__slide {
    animation: none;
  }
  .hm-hero__slide--1 {
    opacity: 1;
  }
}

@media screen and (max-width: 900px) {
  .honmachida-front-page .hm-hero {
    width: calc(100% - 2rem);
  }
  .hm-hero__body {
    width: min(84%, 640px);
    margin-left: 2rem;
  }
}

@media screen and (max-width: 600px) {
  .honmachida-front-page .hm-hero {
    width: calc(100% - 1rem);
    min-height: 500px;
  }
  .hm-hero__body {
    width: auto;
    margin-left: 1.25rem;
    margin-right: 1.25rem;
  }
  .hm-hero h1 {
    font-size: clamp(2rem, 9vw, 2.8rem);
  }
}
/* 2026-07-08 Codex fix: main height, header carousel, force slideshow */
body.no-scrollable-main .main,
body.no-scrollable-main #main,
#main,
.main,
#content,
.content {
  height: auto !important;
  min-height: 0 !important;
}

#content,
.content,
#main,
.main,
.honmachida-front-page {
  overflow: visible !important;
}

#footer,
.footer {
  position: relative;
  z-index: 0;
  clear: both;
}

#header,
.header {
  position: relative !important;
  overflow: hidden;
  isolation: isolate;
  min-height: 132px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  background: var(--hm-paper, #fff7e8) !important;
}

#header::before,
.header::before {
  content: "" !important;
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: 1;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  animation: hmHeaderCarousel 18s infinite !important;
}

#header::after,
.header::after {
  content: "" !important;
  position: absolute;
  inset: 0;
  z-index: -1;
  display: block !important;
  clear: none !important;
  background: rgba(255, 255, 255, 0.78);
}

#header .header-in,
.header .header-in,
#header .logo,
.header .logo,
#header .site-name,
.header .site-name,
#header .site-name-text,
.header .site-name-text {
  position: relative;
  z-index: 1;
}

.hm-hero__slide {
  animation: hmHeroSlide 18s infinite !important;
}

.hm-hero__slide--1 {
  animation-delay: 0s !important;
}

.hm-hero__slide--2 {
  animation-delay: 6s !important;
}

.hm-hero__slide--3 {
  animation-delay: 12s !important;
}

@keyframes hmHeaderCarousel {
  0%, 30% {
    background-image: url("./assets/carousel/carousel-01.png");
    transform: scale(1.02);
  }
  33%, 63% {
    background-image: url("./assets/carousel/carousel-02.png");
    transform: scale(1.05);
  }
  66%, 96% {
    background-image: url("./assets/carousel/carousel-03.png");
    transform: scale(1.03);
  }
  100% {
    background-image: url("./assets/carousel/carousel-01.png");
    transform: scale(1.02);
  }
}

@media screen and (max-width: 720px) {
  #header,
  .header {
    min-height: 110px;
  }
}
/* 2026-07-08 Codex design differentiation: hokkori rounded parts */
:root {
  --hm-radius-soft: 24px;
  --hm-radius-pill: 999px;
  --hm-soft-shadow: 0 14px 34px rgba(89, 74, 48, 0.12);
}

body.wp-child-theme-honmachida-hokkori,
body.wp-theme-honmachida-hokkori {
  background:
    radial-gradient(circle at 12% 12%, rgba(213, 100, 43, 0.08), transparent 28rem),
    radial-gradient(circle at 88% 22%, rgba(42, 83, 67, 0.08), transparent 24rem),
    var(--hm-bg, #f7f1e3);
}

body.wp-child-theme-honmachida-hokkori #header,
body.wp-child-theme-honmachida-hokkori .header,
body.wp-child-theme-honmachida-hokkori #navi,
body.wp-child-theme-honmachida-hokkori .navi,
body.wp-child-theme-honmachida-hokkori #content,
body.wp-child-theme-honmachida-hokkori .content,
body.wp-child-theme-honmachida-hokkori #footer,
body.wp-child-theme-honmachida-hokkori .footer {
  border-radius: var(--hm-radius-soft);
}

body.wp-child-theme-honmachida-hokkori #header,
body.wp-child-theme-honmachida-hokkori .header {
  margin-top: 1.2rem;
  border-bottom: 0 !important;
  box-shadow: var(--hm-soft-shadow);
}

body.wp-child-theme-honmachida-hokkori #navi,
body.wp-child-theme-honmachida-hokkori .navi {
  margin-top: 0.75rem;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(42, 83, 67, 0.10);
}

body.wp-child-theme-honmachida-hokkori .navi-in a,
body.wp-child-theme-honmachida-hokkori .hm-header-nav__list a {
  border-radius: var(--hm-radius-pill);
}

body.wp-child-theme-honmachida-hokkori .honmachida-front-page .hm-hero {
  border-radius: 32px;
  box-shadow: var(--hm-soft-shadow);
}

body.wp-child-theme-honmachida-hokkori .hm-hero__body {
  padding: clamp(1.2rem, 2vw, 2rem);
  border-radius: 28px;
  background: rgba(255, 247, 232, 0.24);
}

body.wp-child-theme-honmachida-hokkori .hm-eyebrow {
  display: inline-flex;
  padding: 0.35rem 0.9rem;
  border-radius: var(--hm-radius-pill);
  background: rgba(213, 100, 43, 0.12);
}

body.wp-child-theme-honmachida-hokkori .hm-button,
body.wp-child-theme-honmachida-hokkori .wp-block-button__link {
  border-radius: var(--hm-radius-pill) !important;
  box-shadow: 0 8px 18px rgba(213, 100, 43, 0.18);
}

body.wp-child-theme-honmachida-hokkori .hm-card,
body.wp-child-theme-honmachida-hokkori .shoubodan-feature-grid > div {
  border-radius: 22px;
  box-shadow: 0 10px 26px rgba(89, 74, 48, 0.10);
}

body.wp-child-theme-honmachida-hokkori .hm-card {
  border: 1px dashed rgba(213, 100, 43, 0.32);
  background: rgba(255, 253, 247, 0.92);
}

body.wp-child-theme-honmachida-hokkori .hm-section__heading {
  border-bottom-style: dashed;
}

body.wp-child-theme-honmachida-hokkori .shoubodan-section {
  border-radius: 26px;
  box-shadow: 0 16px 38px rgba(11, 31, 59, 0.22);
}

@media screen and (max-width: 720px) {
  body.wp-child-theme-honmachida-hokkori #header,
  body.wp-child-theme-honmachida-hokkori .header,
  body.wp-child-theme-honmachida-hokkori #navi,
  body.wp-child-theme-honmachida-hokkori .navi,
  body.wp-child-theme-honmachida-hokkori #content,
  body.wp-child-theme-honmachida-hokkori .content,
  body.wp-child-theme-honmachida-hokkori #footer,
  body.wp-child-theme-honmachida-hokkori .footer {
    border-radius: 16px;
  }
}
/* 2026-07-08 Codex fix: mobile footer buttons */
@media screen and (max-width: 834px) {
  .mobile-footer-menu-buttons {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    min-height: 58px;
    border-top: 1px solid rgba(15, 43, 79, 0.16);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
  }

  .mobile-footer-menu-buttons .menu-button {
    min-width: 0;
  }

  .mobile-footer-menu-buttons .menu-button-in,
  .mobile-footer-menu-buttons .menu-open {
    display: flex !important;
    min-height: 58px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.18rem;
    color: var(--hm-navy, #10243f) !important;
    text-decoration: none;
  }

  .mobile-footer-menu-buttons .menu-icon {
    line-height: 1;
    font-size: 1.35rem;
  }

  .mobile-footer-menu-buttons .menu-caption {
    font-size: 0.72rem;
    line-height: 1.2;
    white-space: nowrap;
  }

  .mobile-footer-menu-buttons .sidebar-menu-button {
    display: none !important;
  }

  .mobile-footer-menu-buttons #search-menu-content {
    position: fixed !important;
    left: 12px !important;
    right: 12px !important;
    bottom: 72px !important;
    z-index: 99999 !important;
    box-sizing: border-box;
    width: auto !important;
    height: auto !important;
    max-height: none !important;
    padding: 14px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
    border: 1px solid rgba(15, 43, 79, 0.16);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 42px rgba(15, 43, 79, 0.22);
  }

  .mobile-footer-menu-buttons #search-menu-input:checked ~ #search-menu-content {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  .mobile-footer-menu-buttons #search-menu-content .search-box {
    display: grid !important;
    grid-template-columns: 1fr 48px;
    gap: 8px;
    margin: 0;
  }

  .mobile-footer-menu-buttons #search-menu-content .search-edit {
    box-sizing: border-box;
    width: 100% !important;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid rgba(15, 43, 79, 0.22);
    border-radius: 10px;
    font-size: 16px;
  }

  .mobile-footer-menu-buttons #search-menu-content .search-submit {
    min-height: 48px;
    border: 0;
    border-radius: 10px;
    color: #fff;
    background: var(--hm-pine, var(--hm-navy, #10243f));
  }

  .mobile-footer-menu-buttons #navi-menu-input:checked ~ #navi-menu-content,
  .mobile-footer-menu-buttons #sidebar-menu-input:checked ~ #sidebar-menu-content {
    z-index: 99998;
  }
}
/* 2026-07-09 Codex fix: static header image and stable mobile footer */
#header::before,
.header::before {
  animation: none !important;
  background-image: url("./assets/header/header-image.png") !important;
  background-position: center !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
  transform: none !important;
}

#header::after,
.header::after {
  background: rgba(255, 255, 255, 0.74) !important;
}

@media screen and (max-width: 834px) {
  .mobile-footer-menu-buttons.mobile-menu-buttons {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    width: 100% !important;
    min-height: 58px !important;
    overflow: visible !important;
    background: rgba(255, 255, 255, 0.96) !important;
  }

  .mobile-footer-menu-buttons .sidebar-menu-button {
    display: none !important;
  }

  .mobile-footer-menu-buttons .navi-menu-button,
  .mobile-footer-menu-buttons .home-menu-button,
  .mobile-footer-menu-buttons .search-menu-button,
  .mobile-footer-menu-buttons .top-menu-button {
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
  }

  .mobile-footer-menu-buttons .menu-button-in,
  .mobile-footer-menu-buttons .menu-open {
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 58px !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2px !important;
    color: var(--hm-navy, #10243f) !important;
    text-decoration: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
  }

  .mobile-footer-menu-buttons .navi-menu-icon::before {
    content: "\f0c9";
    font-family: FontAwesome;
    display: block;
    font-size: 20px;
    line-height: 1;
  }

  .mobile-footer-menu-buttons .navi-menu-icon .fa,
  .mobile-footer-menu-buttons .navi-menu-icon > span {
    display: none !important;
  }

  .mobile-footer-menu-buttons .menu-caption {
    display: block !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
  }

  .mobile-footer-menu-buttons .menu-icon {
    display: block !important;
    min-height: 20px !important;
    line-height: 1 !important;
    font-size: 20px !important;
  }

  .mobile-footer-menu-buttons #navi-menu-content,
  .mobile-footer-menu-buttons #search-menu-content {
    box-sizing: border-box !important;
  }

  .mobile-footer-menu-buttons #search-menu-content {
    position: fixed !important;
    left: 12px !important;
    right: 12px !important;
    bottom: 72px !important;
    z-index: 99999 !important;
    width: auto !important;
    height: auto !important;
    max-height: none !important;
    padding: 14px !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
    border: 1px solid rgba(15, 43, 79, 0.16);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 42px rgba(15, 43, 79, 0.22);
  }

  .mobile-footer-menu-buttons #search-menu-input:checked ~ #search-menu-content {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
  }

  .mobile-footer-menu-buttons #search-menu-content .search-box {
    display: grid !important;
    grid-template-columns: 1fr 48px !important;
    gap: 8px !important;
    margin: 0 !important;
  }

  .mobile-footer-menu-buttons #search-menu-content .search-edit {
    width: 100% !important;
    min-height: 48px !important;
    font-size: 16px !important;
  }
}
/* 2026-07-09 Codex fix: mobile drawer visibility */
@media screen and (max-width: 834px) {
  .mobile-footer-menu-buttons #navi-menu-content {
    position: fixed !important;
    left: 12px !important;
    right: 12px !important;
    bottom: 72px !important;
    z-index: 99998 !important;
    box-sizing: border-box !important;
    width: auto !important;
    height: auto !important;
    max-height: min(70vh, 520px) !important;
    padding: 14px !important;
    overflow-y: auto !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
    border: 1px solid rgba(15, 43, 79, 0.16);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 42px rgba(15, 43, 79, 0.22);
  }

  .mobile-footer-menu-buttons #navi-menu-input:checked ~ #navi-menu-content {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
  }

  .mobile-footer-menu-buttons #navi-menu-content .menu-drawer {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
  }

  .mobile-footer-menu-buttons #navi-menu-content .menu-drawer li {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    border-bottom: 1px solid rgba(15, 43, 79, 0.10);
  }

  .mobile-footer-menu-buttons #navi-menu-content .menu-drawer a {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 13px 12px !important;
    color: var(--hm-navy, #10243f) !important;
    text-decoration: none !important;
    font-weight: 700 !important;
  }

  .mobile-footer-menu-buttons #navi-menu-content .menu-close-button {
    display: flex !important;
    width: 38px !important;
    height: 38px !important;
    margin: 0 0 8px auto !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 999px !important;
    background: rgba(15, 43, 79, 0.08) !important;
    color: var(--hm-navy, #10243f) !important;
  }

  .mobile-footer-menu-buttons #navi-menu-open .navi-menu-icon::before {
    content: "☰" !important;
    font-family: sans-serif !important;
    display: block !important;
    font-size: 22px !important;
    line-height: 1 !important;
  }

  .mobile-footer-menu-buttons #navi-menu-open .navi-menu-caption {
    display: block !important;
    color: var(--hm-navy, #10243f) !important;
  }
}


/* 2026-07-09 Codex fix: keep mobile footer primary labels visible */
@media screen and (max-width: 834px) {
  .mobile-footer-menu-buttons #navi-menu-open,
  .mobile-footer-menu-buttons #search-menu-open,
  .mobile-footer-menu-buttons #sidebar-menu-open {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .mobile-footer-menu-buttons #navi-menu-close,
  .mobile-footer-menu-buttons #search-menu-close,
  .mobile-footer-menu-buttons #sidebar-menu-close {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  .mobile-footer-menu-buttons #navi-menu-open .navi-menu-icon::before,
  .mobile-footer-menu-buttons #navi-menu-input:checked + #navi-menu-open .navi-menu-icon::before {
    content: "☰" !important;
    display: block !important;
    font-family: sans-serif !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
  }

  .mobile-footer-menu-buttons #navi-menu-open .navi-menu-caption,
  .mobile-footer-menu-buttons #navi-menu-input:checked + #navi-menu-open .navi-menu-caption {
    display: block !important;
    color: var(--hm-navy, #10243f) !important;
    font-size: 10px !important;
    line-height: 1.2 !important;
    margin-top: 3px !important;
  }
}

/* 2026-07-09 Codex fix: narrow mobile footer height and no horizontal scroll */
@media screen and (max-width: 480px) {
  html,
  body {
    overflow-x: hidden !important;
  }

  body.mobile-button-fmb {
    padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .mobile-footer-menu-buttons,
  .mobile-footer-menu-buttons.mobile-menu-buttons,
  body.scrollable-mobile-buttons .mobile-footer-menu-buttons,
  body.scrollable-mobile-buttons .mobile-footer-menu-buttons.mobile-menu-buttons {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 99997 !important;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    grid-auto-flow: initial !important;
    width: 100vw !important;
    min-width: 0 !important;
    max-width: 100vw !important;
    height: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
    min-height: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
    max-height: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
    padding: 0 0 env(safe-area-inset-bottom, 0px) !important;
    overflow: hidden !important;
    overflow-x: hidden !important;
    overflow-y: hidden !important;
    transform: none !important;
  }

  .mobile-footer-menu-buttons .menu-button,
  .mobile-footer-menu-buttons .navi-menu-button,
  .mobile-footer-menu-buttons .home-menu-button,
  .mobile-footer-menu-buttons .search-menu-button,
  .mobile-footer-menu-buttons .top-menu-button {
    display: block !important;
    box-sizing: border-box !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 64px !important;
    min-height: 64px !important;
    margin: 0 !important;
    overflow: hidden !important;
  }

  .mobile-footer-menu-buttons .sidebar-menu-button {
    display: none !important;
  }

  .mobile-footer-menu-buttons .menu-button-in,
  .mobile-footer-menu-buttons .menu-open,
  .mobile-footer-menu-buttons #navi-menu-open,
  .mobile-footer-menu-buttons #search-menu-open {
    display: flex !important;
    box-sizing: border-box !important;
    width: 100% !important;
    height: 64px !important;
    min-height: 64px !important;
    max-height: 64px !important;
    padding: 7px 2px 6px !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    overflow: hidden !important;
    line-height: 1 !important;
  }

  .mobile-footer-menu-buttons .menu-icon,
  .mobile-footer-menu-buttons .navi-menu-icon,
  .mobile-footer-menu-buttons .home-menu-icon,
  .mobile-footer-menu-buttons .search-menu-icon,
  .mobile-footer-menu-buttons .top-menu-icon {
    display: flex !important;
    width: 24px !important;
    height: 24px !important;
    min-height: 24px !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: visible !important;
    font-size: 22px !important;
    line-height: 1 !important;
  }

  .mobile-footer-menu-buttons #navi-menu-open .navi-menu-icon::before,
  .mobile-footer-menu-buttons .navi-menu-icon::before {
    content: "☰" !important;
    display: block !important;
    width: 24px !important;
    height: 24px !important;
    font-family: sans-serif !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    line-height: 24px !important;
    text-align: center !important;
  }

  .mobile-footer-menu-buttons .menu-caption,
  .mobile-footer-menu-buttons .navi-menu-caption,
  .mobile-footer-menu-buttons .home-menu-caption,
  .mobile-footer-menu-buttons .search-menu-caption,
  .mobile-footer-menu-buttons .top-menu-caption {
    display: block !important;
    height: 13px !important;
    min-height: 13px !important;
    max-height: 13px !important;
    margin: 0 !important;
    overflow: hidden !important;
    color: var(--hm-navy, #10243f) !important;
    font-size: 10px !important;
    line-height: 13px !important;
    text-align: center !important;
    white-space: nowrap !important;
  }

  .mobile-footer-menu-buttons #navi-menu-content,
  .mobile-footer-menu-buttons #search-menu-content {
    bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* 2026-07-09 Codex fix: mobile footer menu visible up to tablet width */
@media screen and (max-width: 834px) {
  html,
  body,
  #container,
  .container {
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  body.mobile-button-fmb {
    padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .mobile-footer-menu-buttons,
  .mobile-footer-menu-buttons.mobile-menu-buttons,
  body.scrollable-mobile-buttons .mobile-footer-menu-buttons,
  body.scrollable-mobile-buttons .mobile-footer-menu-buttons.mobile-menu-buttons {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 99997 !important;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    grid-auto-flow: initial !important;
    width: 100vw !important;
    min-width: 0 !important;
    max-width: 100vw !important;
    height: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
    min-height: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
    max-height: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
    padding: 0 0 env(safe-area-inset-bottom, 0px) !important;
    overflow: hidden !important;
    overflow-x: hidden !important;
    overflow-y: hidden !important;
    white-space: normal !important;
    transform: none !important;
  }

  .mobile-footer-menu-buttons .menu-button,
  .mobile-footer-menu-buttons .navi-menu-button,
  .mobile-footer-menu-buttons .home-menu-button,
  .mobile-footer-menu-buttons .search-menu-button,
  .mobile-footer-menu-buttons .top-menu-button {
    display: block !important;
    box-sizing: border-box !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 64px !important;
    min-height: 64px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  .mobile-footer-menu-buttons .sidebar-menu-button {
    display: none !important;
  }

  .mobile-footer-menu-buttons .menu-button-in,
  .mobile-footer-menu-buttons .menu-open,
  .mobile-footer-menu-buttons #navi-menu-open,
  .mobile-footer-menu-buttons #search-menu-open {
    display: flex !important;
    box-sizing: border-box !important;
    width: 100% !important;
    height: 64px !important;
    min-height: 64px !important;
    max-height: 64px !important;
    padding: 7px 2px 6px !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    overflow: hidden !important;
    color: var(--hm-navy, #10243f) !important;
    line-height: 1 !important;
    text-decoration: none !important;
    cursor: pointer !important;
  }

  .mobile-footer-menu-buttons #navi-menu-open .navi-menu-icon,
  .mobile-footer-menu-buttons .navi-menu-icon {
    display: flex !important;
    width: 24px !important;
    height: 24px !important;
    min-height: 24px !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: visible !important;
    color: var(--hm-navy, #10243f) !important;
    font-size: 0 !important;
    line-height: 1 !important;
  }

  .mobile-footer-menu-buttons #navi-menu-open .navi-menu-icon::before,
  .mobile-footer-menu-buttons .navi-menu-icon::before {
    content: "☰" !important;
    display: block !important;
    width: 24px !important;
    height: 24px !important;
    color: var(--hm-navy, #10243f) !important;
    font-family: Arial, sans-serif !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    line-height: 24px !important;
    text-align: center !important;
  }

  .mobile-footer-menu-buttons .navi-menu-icon .fa,
  .mobile-footer-menu-buttons .navi-menu-icon svg,
  .mobile-footer-menu-buttons .navi-menu-icon > span {
    display: none !important;
  }

  .mobile-footer-menu-buttons .menu-caption,
  .mobile-footer-menu-buttons .navi-menu-caption,
  .mobile-footer-menu-buttons .home-menu-caption,
  .mobile-footer-menu-buttons .search-menu-caption,
  .mobile-footer-menu-buttons .top-menu-caption {
    display: block !important;
    height: 13px !important;
    min-height: 13px !important;
    max-height: 13px !important;
    margin: 0 !important;
    overflow: hidden !important;
    color: var(--hm-navy, #10243f) !important;
    font-size: 10px !important;
    line-height: 13px !important;
    text-align: center !important;
    white-space: nowrap !important;
  }

  .mobile-footer-menu-buttons #navi-menu-content,
  .mobile-footer-menu-buttons #search-menu-content {
    bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .mobile-footer-menu-buttons #navi-menu-input:checked ~ #navi-menu-content {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
  }
}

/* 2026-07-09 Codex fix: hamburger icon without unicode dependency */
@media screen and (max-width: 834px) {
  .mobile-footer-menu-buttons #navi-menu-open .navi-menu-icon,
  .mobile-footer-menu-buttons .navi-menu-icon {
    position: relative !important;
    display: flex !important;
    width: 26px !important;
    height: 24px !important;
    min-height: 24px !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--hm-navy, #10243f) !important;
    font-size: 0 !important;
    line-height: 1 !important;
  }

  .mobile-footer-menu-buttons #navi-menu-open .navi-menu-icon::before,
  .mobile-footer-menu-buttons .navi-menu-icon::before {
    content: "" !important;
    display: block !important;
    width: 22px !important;
    height: 2px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: currentColor !important;
    box-shadow: 0 -7px 0 currentColor, 0 7px 0 currentColor !important;
    font-size: 0 !important;
    line-height: 0 !important;
    transform: none !important;
  }

  .mobile-footer-menu-buttons #navi-menu-open .navi-menu-icon::after,
  .mobile-footer-menu-buttons .navi-menu-icon::after {
    content: none !important;
    display: none !important;
  }

  .mobile-footer-menu-buttons #navi-menu-open .navi-menu-caption,
  .mobile-footer-menu-buttons .navi-menu-caption {
    display: block !important;
    color: var(--hm-navy, #10243f) !important;
    font-size: 10px !important;
    line-height: 13px !important;
    text-align: center !important;
  }
}

/* 2026-07-09 Codex fix: mobile drawer must not be clipped by footer bar */
@media screen and (max-width: 834px) {
  html,
  body {
    overflow-x: hidden !important;
  }

  .mobile-footer-menu-buttons,
  .mobile-footer-menu-buttons.mobile-menu-buttons,
  body.scrollable-mobile-buttons .mobile-footer-menu-buttons,
  body.scrollable-mobile-buttons .mobile-footer-menu-buttons.mobile-menu-buttons {
    overflow: visible !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    clip: auto !important;
    contain: none !important;
  }

  .mobile-footer-menu-buttons .menu-button,
  .mobile-footer-menu-buttons .navi-menu-button,
  .mobile-footer-menu-buttons .home-menu-button,
  .mobile-footer-menu-buttons .search-menu-button,
  .mobile-footer-menu-buttons .top-menu-button,
  .mobile-footer-menu-buttons .menu-button-in,
  .mobile-footer-menu-buttons .menu-open {
    overflow: hidden !important;
  }

  .mobile-footer-menu-buttons #navi-menu-content,
  .mobile-footer-menu-buttons #search-menu-content,
  .mobile-footer-menu-buttons #sidebar-menu-content {
    position: fixed !important;
    left: 12px !important;
    right: 12px !important;
    bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
    z-index: 100000 !important;
    box-sizing: border-box !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: calc(100vw - 24px) !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: calc(100vh - 120px) !important;
    padding: 14px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    border: 1px solid rgba(15, 43, 79, 0.16) !important;
    border-radius: 14px !important;
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 18px 42px rgba(15, 43, 79, 0.22) !important;
  }

  .mobile-footer-menu-buttons #navi-menu-input:checked ~ #navi-menu-content,
  .mobile-footer-menu-buttons #search-menu-input:checked ~ #search-menu-content,
  .mobile-footer-menu-buttons #sidebar-menu-input:checked ~ #sidebar-menu-content {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
  }

  .mobile-footer-menu-buttons #navi-menu-content .menu-drawer,
  .mobile-footer-menu-buttons #sidebar-menu-content .menu-drawer {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
  }

  .mobile-footer-menu-buttons #navi-menu-content .menu-drawer li,
  .mobile-footer-menu-buttons #sidebar-menu-content .menu-drawer li {
    display: block !important;
    width: 100% !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    border-bottom: 1px solid rgba(15, 43, 79, 0.10) !important;
  }

  .mobile-footer-menu-buttons #navi-menu-content .menu-drawer a,
  .mobile-footer-menu-buttons #sidebar-menu-content .menu-drawer a {
    display: block !important;
    box-sizing: border-box !important;
    width: 100% !important;
    min-height: 44px !important;
    padding: 13px 12px !important;
    overflow: visible !important;
    color: var(--hm-navy, #10243f) !important;
    font-size: 16px !important;
    line-height: 1.35 !important;
    text-decoration: none !important;
    white-space: normal !important;
  }
}

/* 2026-07-09 Codex fix: use top hamburger instead of Cocoon mobile footer */
@media screen and (max-width: 834px) {
  .mobile-footer-menu-buttons,
  .mobile-footer-menu-buttons.mobile-menu-buttons,
  body.scrollable-mobile-buttons .mobile-footer-menu-buttons,
  body.scrollable-mobile-buttons .mobile-footer-menu-buttons.mobile-menu-buttons {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  body.mobile-button-fmb {
    padding-bottom: 0 !important;
  }

  body.hm-mobile-top-menu-enabled {
    padding-top: 58px !important;
  }

  .hm-mobile-top-menu {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    z-index: 100001 !important;
    display: block !important;
    box-sizing: border-box !important;
    width: 100% !important;
    min-height: 58px !important;
    background: rgba(255, 255, 255, 0.98) !important;
    border-bottom: 1px solid rgba(15, 43, 79, 0.16) !important;
    box-shadow: 0 8px 24px rgba(15, 43, 79, 0.12) !important;
  }

  body.admin-bar .hm-mobile-top-menu {
    top: 46px !important;
  }

  body.admin-bar.hm-mobile-top-menu-enabled {
    padding-top: 104px !important;
  }

  .hm-mobile-top-menu__button {
    display: flex !important;
    width: 100% !important;
    min-height: 58px !important;
    padding: 0 18px !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--hm-navy, #10243f) !important;
    font: inherit !important;
    font-weight: 700 !important;
    cursor: pointer !important;
  }

  .hm-mobile-top-menu__icon {
    position: relative !important;
    display: inline-flex !important;
    width: 28px !important;
    height: 22px !important;
    align-items: center !important;
    justify-content: center !important;
    color: currentColor !important;
  }

  .hm-mobile-top-menu__icon span,
  .hm-mobile-top-menu__icon::before,
  .hm-mobile-top-menu__icon::after {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    left: 2px !important;
    width: 24px !important;
    height: 2px !important;
    border-radius: 999px !important;
    background: currentColor !important;
    transition: transform 0.18s ease, opacity 0.18s ease !important;
  }

  .hm-mobile-top-menu__icon::before {
    top: 3px !important;
  }

  .hm-mobile-top-menu__icon span {
    top: 10px !important;
  }

  .hm-mobile-top-menu__icon::after {
    top: 17px !important;
  }

  .hm-mobile-top-menu.is-open .hm-mobile-top-menu__icon::before {
    transform: translateY(7px) rotate(45deg) !important;
  }

  .hm-mobile-top-menu.is-open .hm-mobile-top-menu__icon span {
    opacity: 0 !important;
  }

  .hm-mobile-top-menu.is-open .hm-mobile-top-menu__icon::after {
    transform: translateY(-7px) rotate(-45deg) !important;
  }

  .hm-mobile-top-menu__label {
    display: inline-block !important;
    font-size: 16px !important;
    line-height: 1 !important;
  }

  .hm-mobile-top-menu__panel {
    display: block !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-height: calc(100vh - 120px) !important;
    padding: 6px 18px 18px !important;
    overflow-y: auto !important;
    background: rgba(255, 255, 255, 0.99) !important;
    border-top: 1px solid rgba(15, 43, 79, 0.08) !important;
  }

  .hm-mobile-top-menu__panel[hidden] {
    display: none !important;
  }

  .hm-mobile-top-menu__list {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
  }

  .hm-mobile-top-menu__list li {
    display: block !important;
    margin: 0 !important;
    border-bottom: 1px solid rgba(15, 43, 79, 0.10) !important;
  }

  .hm-mobile-top-menu__list a {
    display: block !important;
    min-height: 48px !important;
    padding: 15px 4px !important;
    color: var(--hm-navy, #10243f) !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    text-decoration: none !important;
  }
}

@media screen and (min-width: 835px) {
  .hm-mobile-top-menu {
    display: none !important;
  }
}

@media screen and (min-width: 783px) and (max-width: 834px) {
  body.admin-bar .hm-mobile-top-menu {
    top: 32px !important;
  }

  body.admin-bar.hm-mobile-top-menu-enabled {
    padding-top: 90px !important;
  }
}

/* 2026-07-09 Codex fix: show top hamburger panel when open even if hidden remains */
@media screen and (max-width: 834px) {
  .hm-mobile-top-menu.is-open .hm-mobile-top-menu__panel,
  .hm-mobile-top-menu.is-open .hm-mobile-top-menu__panel[hidden] {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .hm-mobile-top-menu__button {
    position: relative !important;
    z-index: 2 !important;
  }

  .hm-mobile-top-menu__panel {
    position: relative !important;
    z-index: 1 !important;
  }
}

/* 2026-07-09 Codex fix: desktop fixed header nav layout */
.hm-desktop-fixed-nav {
  display: block;
  box-sizing: border-box;
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto 24px;
  padding: 0 24px;
  background: #fff;
  border-bottom: 1px solid rgba(15, 43, 79, 0.16);
}

.hm-desktop-fixed-nav__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hm-desktop-fixed-nav__list li {
  margin: 0;
  padding: 0;
}

.hm-desktop-fixed-nav__list a {
  display: block;
  padding: 18px 22px;
  color: var(--hm-navy, #10243f);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.hm-desktop-fixed-nav__list a:hover {
  color: var(--hm-gold, #c59b35);
  text-decoration: none;
}

body.wp-child-theme-honmachida-hokkori .hm-desktop-fixed-nav {
  border-radius: 18px;
  border: 1px solid rgba(42, 82, 60, 0.14);
  box-shadow: 0 10px 24px rgba(42, 82, 60, 0.08);
}

body.wp-child-theme-honmachida-hokkori .hm-desktop-fixed-nav__list a {
  border-radius: 999px;
}

body.wp-child-theme-honmachida-hokkori .hm-desktop-fixed-nav__list a:hover {
  background: rgba(199, 95, 42, 0.10);
  color: var(--hm-persimmon, #c75f2a);
}

@media screen and (max-width: 834px) {
  .hm-desktop-fixed-nav {
    display: none !important;
  }
}

@media screen and (min-width: 835px) {
  #navi,
  .navi {
    display: none !important;
  }
}

/* 2026-07-09 Codex fix: restore desktop nav position and bar design */
@media screen and (min-width: 835px) {
  .hm-desktop-fixed-nav {
    display: block !important;
    box-sizing: border-box !important;
    width: min(1280px, 100%) !important;
    margin: 0 auto 28px !important;
    padding: 0 !important;
    background: var(--hm-pine, #2d5241) !important;
    border: 0 !important;
    border-bottom: 3px solid var(--hm-gold, #c79a35) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .hm-desktop-fixed-nav__list {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    align-items: stretch !important;
    gap: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
  }

  .hm-desktop-fixed-nav__list li {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .hm-desktop-fixed-nav__list a {
    display: flex !important;
    min-height: 58px !important;
    padding: 0 28px !important;
    align-items: center !important;
    justify-content: center !important;
    color: #fff !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    border-radius: 0 !important;
  }

  .hm-desktop-fixed-nav__list a:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.12) !important;
    text-decoration: none !important;
  }

  body.wp-child-theme-honmachida-hokkori .hm-desktop-fixed-nav {
    background: var(--hm-pine, #2f5a43) !important;
    border-bottom-color: var(--hm-persimmon, #c75f2a) !important;
  }

  body.wp-child-theme-honmachida-hokkori .hm-desktop-fixed-nav__list a {
    border-radius: 0 !important;
  }

  body.wp-child-theme-honmachida-hokkori .hm-desktop-fixed-nav__list a:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.14) !important;
  }
}

/* 2026-07-11 Codex fix: firefighter navigation emphasis. */
@media screen and (min-width: 835px) {
  .hm-desktop-fixed-nav__list a[href$="/shoubodan/"] {
    background: #102b4d !important;
    box-shadow: inset 0 3px 0 #e13a32 !important;
  }

  .hm-desktop-fixed-nav__list a[href$="/shoubodan/"]:hover {
    background: #173c68 !important;
  }
}

@media screen and (max-width: 834px) {
  .hm-mobile-top-menu__list a[href$="/shoubodan/"] {
    margin: 7px 0 !important;
    padding: 15px 12px !important;
    background: #102b4d !important;
    color: #fff !important;
    box-shadow: inset 4px 0 0 #e13a32 !important;
  }
}