/* =====================================================================
   carheart.jp ヘッダー：白地＋墨のロゴ（SVG）
   - 文字ロゴ「カーハート」はHTMLに残したまま、見た目だけSVGロゴに置き換え
   - 今いるページのメニュー項目は、ほかの項目と同じ見た目にする（色・下線を変えない）
   - ドロップダウン（Max Mega Menu のパネル）は今のまま
   ===================================================================== */

:root{
  --chh-bg:#FFFFFF;      /* 白 */
  --chh-fg:#16181A;      /* 墨（ロゴ・文字） */
  --chh-sub:#4A4A4A;     /* 補助文字 */
  --chh-line:#E6E3DF;    /* 下線 */
  --chh-hover:#6E2B49;   /* ホバー（ワイン） */
  --chh-logo:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -4 1059 115'%3E%3Cpath d='M0,53.85C0,20.25,29.7-3.6,71.85-3.6c35.1,0,61.5,15.3,68.55,39.9l-39.6,7.5c-3.3-12.3-13.2-18.9-29.1-18.9-19.35,0-31.2,10.95-31.2,28.35s11.7,28.35,31.35,28.35c15.75,0,26.1-6.75,29.1-18.9l39.3,8.7c-8.55,24.45-34.2,38.7-69.75,38.7C27.6,110.1,0,88.2,0,53.85Z'/%3E%3Cpath d='M175.2,0h49.65l49.5,106.5h-41.1l-8.25-20.25h-49.95l-8.25,20.25h-41.1L175.2,0ZM215.69,63.15l-7.5-18.45c-1.8-4.5-6-16.05-7.95-22.95h-.45c-1.8,6.9-6.15,18.45-7.95,22.95l-7.5,18.45h31.35Z'/%3E%3Cpath d='M269.8,0h74.55c36.75,0,47.4,17.7,47.4,34.95,0,12-5.55,25.65-22.2,32.25l25.8,39.3h-42.3l-22.5-34.8h-22.35v34.8h-38.4V0ZM335.35,24.45h-27.15v24.3h27c12.3,0,16.05-5.7,16.05-12.45s-3.9-11.85-15.9-11.85Z'/%3E%3Cpath d='M559.24,106.5h-38.25v-40.95h-51.3v40.95h-38.4V0h38.4v40.05h51.3V0h38.25v106.5Z'/%3E%3Cpath d='M679.05,80.7v25.8h-112.35V0h111.3v25.8h-72.9v15.15h70.35v23.7h-70.35v16.05h73.95Z'/%3E%3Cpath d='M722.63,0h49.65l49.5,106.5h-41.1l-8.25-20.25h-49.95l-8.25,20.25h-41.1L722.63,0ZM763.13,63.15l-7.5-18.45c-1.8-4.5-6-16.05-7.95-22.95h-.45c-1.8,6.9-6.15,18.45-7.95,22.95l-7.5,18.45h31.35Z'/%3E%3Cpath d='M817.23,0h74.55c36.75,0,47.4,17.7,47.4,34.95,0,12-5.55,25.65-22.2,32.25l25.8,39.3h-42.3l-22.5-34.8h-22.35v34.8h-38.4V0ZM882.78,24.45h-27.15v24.3h27c12.3,0,16.05-5.7,16.05-12.45s-3.9-11.85-15.9-11.85Z'/%3E%3Cpath d='M978.84,29.25h-40.95V0h120.29v29.25h-41.1v77.25h-38.25V29.25Z'/%3E%3C/svg%3E");
}

/* ---- 1. ヘッダー帯（PC・固定時とも） ---- */
#header-full #headbox-bg,
#header-full #headbox-bg.st-header-fixed,
#headbox-bg,
#headbox-bg.st-header-fixed{
  background:var(--chh-bg) !important;
  background-image:none !important;
  border-bottom:1px solid var(--chh-line) !important;
}

/* ---- 2. ロゴ（PC） ---- */
header h1.sitename,
header #st-text-logo p.sitename{
  margin:0 !important;
  line-height:1 !important;
}
header h1.sitename a,
header #st-text-logo p.sitename a{
  display:block !important;
  width:184px;
  height:20px;
  font-size:0 !important;
  line-height:0 !important;
  color:transparent !important;
  text-decoration:none !important;
  background:var(--chh-fg) !important;
  -webkit-mask:var(--chh-logo) no-repeat left center / contain;
          mask:var(--chh-logo) no-repeat left center / contain;
}
/* キャッチ（サイトの説明）が出ている場合 */
header #st-text-logo .descr,
header .descr{ color:var(--chh-sub) !important; }

/* ---- 3. メニュー（Max Mega Menu の第一階層） ---- */
#headbox-bg [id^="mega-menu-wrap"],
#headbox-bg .mega-menu-wrap,
#headbox-bg .mega-menu{
  background:transparent !important;
}
#headbox-bg .mega-menu > li.mega-menu-item > a.mega-menu-link{
  color:var(--chh-fg) !important;
  background:transparent !important;
}

/* 今いるページの項目：色・下線を変えない */
#headbox-bg .mega-menu > li.mega-menu-item.mega-current-menu-item > a.mega-menu-link,
#headbox-bg .mega-menu > li.mega-menu-item.mega-current-menu-ancestor > a.mega-menu-link,
#headbox-bg .mega-menu > li.mega-menu-item.mega-current-menu-parent > a.mega-menu-link,
#headbox-bg .mega-menu > li.mega-menu-item.mega-current_page_item > a.mega-menu-link,
#headbox-bg .mega-menu > li.mega-menu-item.mega-current_page_ancestor > a.mega-menu-link,
#headbox-bg .mega-menu > li.mega-menu-item.mega-current_page_parent > a.mega-menu-link,
#headbox-bg .mega-menu li.mega-menu-item.mega-current-menu-item > a.mega-menu-link,
#headbox-bg .mega-menu li.mega-menu-item.mega-current_page_item > a.mega-menu-link{
  color:var(--chh-fg) !important;
  background:transparent !important;
  text-decoration:none !important;
  border-color:transparent !important;
  box-shadow:none !important;
  font-weight:700 !important;   /* ほかの項目（Max Mega Menu の設定）と同じ太さ */
}
#headbox-bg .mega-menu li.mega-current-menu-item > a.mega-menu-link::before,
#headbox-bg .mega-menu li.mega-current-menu-item > a.mega-menu-link::after,
#headbox-bg .mega-menu li.mega-current_page_item > a.mega-menu-link::before,
#headbox-bg .mega-menu li.mega-current_page_item > a.mega-menu-link::after,
#headbox-bg .mega-menu > li.mega-current-menu-ancestor > a.mega-menu-link::after,
#headbox-bg .mega-menu > li.mega-current_page_ancestor > a.mega-menu-link::after{
  border-color:transparent !important;
  background:transparent !important;
}
/* ドロップダウン内の今いるページの項目も、ほかと同じ見た目にする */
#headbox-bg .mega-sub-menu li.mega-current-menu-item > a.mega-menu-link,
#headbox-bg .mega-sub-menu li.mega-current_page_item > a.mega-menu-link{
  color:inherit !important;
  text-decoration:none !important;
}

/* ホバー・ドロップダウンを開いているとき */
#headbox-bg .mega-menu > li.mega-menu-item > a.mega-menu-link:hover,
#headbox-bg .mega-menu > li.mega-menu-item.mega-toggle-on > a.mega-menu-link{
  color:var(--chh-hover) !important;
  background:transparent !important;
}

/* 横列メニュー（#header-r に出している場合） */
#header-r .footermenubox li a{ color:var(--chh-fg) !important; }
#header-r .footermenubox li a:hover{ color:var(--chh-hover) !important; }
#header-r .footermenubox li.current-menu-item a{ color:var(--chh-fg) !important; text-decoration:none !important; border-color:transparent !important; }

/* ---- 4. スマホ・タブレット ---- */
@media only screen and (max-width:959px){
  #s-navi dl.acordion,
  #s-navi dl.acordion.st-header-fixed{
    background:var(--chh-bg) !important;
    background-image:none !important;
    border-bottom:1px solid var(--chh-line) !important;
  }
  /* ヘッダーの高さ：90px → 60px（car-film-kobe.jp と同じ） */
  #s-navi dt.trigger{
    height:60px !important;
    min-height:0 !important;
  }
  /* ハンバーガー・検索などのアイコン */
  #s-navi dt.trigger .op,
  #s-navi dt.trigger .op-st,
  #s-navi dt.trigger .op-st2,
  #s-navi dt.trigger .op-menu,
  #s-navi dt.trigger .st-fa,
  #s-navi dt.trigger .acordion_button{
    color:var(--chh-fg) !important;
    background:transparent !important;
  }

  /* ロゴ（スマホ）：幅210px（car-film-kobe.jp と同じ） */
  header h1#st-mobile-logo,
  header #st-mobile-logo{ line-height:1 !important; }
  header h1#st-mobile-logo a,
  header #st-mobile-logo h1 a,
  header #st-mobile-logo a,
  #st-mobile-logo a{
    display:block !important;
    width:210px;
    height:auto;
    aspect-ratio:1059 / 119;
    font-size:0 !important;
    line-height:0 !important;
    color:transparent !important;
    background:var(--chh-fg) !important;
    -webkit-mask:var(--chh-logo) no-repeat left center / contain;
            mask:var(--chh-logo) no-repeat left center / contain;
  }
  header #st-mobile-logo .descr{ color:var(--chh-sub) !important; }
}

/* ロゴ上の小さなキャッチ「神戸の車のコーティング専門店」（style.css の ::before）を非表示 */
#st-mobile-logo::before{
  content:none !important;
  display:none !important;
}

/* ---- 5. スマホのフッター固定メニュー（AFFINGER の #st-footermenubox） ----
   ワインの太い帯をやめ、白地に墨の細い帯にする（ヘッダーと同じ配色） */
#st-footermenubox{
  background:rgba(255,255,255,.96) !important;
  -webkit-backdrop-filter:saturate(1.4) blur(8px);
          backdrop-filter:saturate(1.4) blur(8px);
  border-top:1px solid var(--chh-line) !important;
  box-shadow:none !important;
  padding:7px 8px calc(6px + env(safe-area-inset-bottom, 0px)) !important;
}
#st-footermenubox .st-footer-ul ul.menu{ display:flex !important; margin:0 !important; padding:0 !important; }
#st-footermenubox .st-footer-ul li{ flex:1 1 0 !important; margin:0 !important; padding:0 !important; border:0 !important; background:none !important; }
body #st-footermenubox .st-footer-ul ul.menu li a{
  display:flex !important; flex-direction:column; align-items:center; gap:3px;
  padding:0 !important; color:var(--chh-fg) !important; background:none !important;
  font-family:"Noto Sans JP","Hiragino Sans","Yu Gothic",sans-serif !important;
  font-size:10px !important; font-weight:400 !important; line-height:1.3 !important; letter-spacing:.06em;
}
#st-footermenubox .st-footer-ul li a br{ display:none; }
#st-footermenubox .st-footer-ul li a:active{ color:var(--chh-hover) !important; }

/* ---- 6. フッター固定メニューのアイコン（細い線のアイコンに置き換え） ----
   Font Awesome のアイコンは隠し、リンク先ごとに線画のアイコンを出す */
:root{
  --chh-ic-mail:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5.5' width='18' height='13' rx='0.8'/%3E%3Cpath d='M3.6 6.4 12 12.8l8.4-6.4'/%3E%3C/svg%3E");
  --chh-ic-works:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4.5' width='18' height='15' rx='0.8'/%3E%3Ccircle cx='8.6' cy='9.6' r='1.5'/%3E%3Cpath d='M3.6 17.2l5.2-5 3.8 3.6 3-2.8 4.8 4.4'/%3E%3C/svg%3E");
  --chh-ic-service:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 3.5c.55 4.3 2.2 5.95 6.5 6.5-4.3.55-5.95 2.2-6.5 6.5-.55-4.3-2.2-5.95-6.5-6.5 4.3-.55 5.95-2.2 6.5-6.5z'/%3E%3Cpath d='M18 14.5c.22 1.5.8 2.08 2.3 2.3-1.5.22-2.08.8-2.3 2.3-.22-1.5-.8-2.08-2.3-2.3 1.5-.22 2.08-.8 2.3-2.3z'/%3E%3C/svg%3E");
  --chh-ic-price:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.6'/%3E%3Cpath d='M8.9 7.4 12 11.9l3.1-4.5M12 11.9v5M9.4 12.6h5.2M9.4 14.8h5.2'/%3E%3C/svg%3E");
}
body #st-footermenubox .st-footer-ul ul.menu li a i{ display:none !important; }
body #st-footermenubox .st-footer-ul ul.menu li a::before{
  content:""; display:block; width:22px; height:22px;
  background:currentColor;
  -webkit-mask:var(--chh-ic-mail) center / contain no-repeat;
          mask:var(--chh-ic-mail) center / contain no-repeat;
}
body #st-footermenubox .st-footer-ul ul.menu li a[href*="result_car"]::before{ -webkit-mask-image:var(--chh-ic-works); mask-image:var(--chh-ic-works); }
body #st-footermenubox .st-footer-ul ul.menu li a[href$="/service/"]::before{ -webkit-mask-image:var(--chh-ic-service); mask-image:var(--chh-ic-service); }
body #st-footermenubox .st-footer-ul ul.menu li a[href*="price-list"]::before,
body #st-footermenubox .st-footer-ul ul.menu li a[href*="%e6%96%99%e9%87%91"]::before,
body #st-footermenubox .st-footer-ul ul.menu li a[href*="%E6%96%99%E9%87%91"]::before{ -webkit-mask-image:var(--chh-ic-price); mask-image:var(--chh-ic-price); }

/* ---- 7. ヘッダー下のお知らせバー（AFFINGER のインフォメーションウィジェット） ----
   ワインの帯をやめ、生成りの地に墨の小さな文字にする */
#st-header-top-widgets-box{
  background:#F6F5F3 !important;
  border-bottom:1px solid var(--chh-line) !important;
}
#st-header-top-widgets-box .st-content-width{ padding:9px 16px !important; }
#st-header-top-widgets-box #st-infomation-widget p{
  color:var(--chh-sub) !important;   /* ウィジェットの「文字色」の設定より優先 */
  font-size:12px !important;
  letter-spacing:.08em !important;
  line-height:1.6 !important;
  margin:0 !important;
}

/* お知らせが2つ以上あるとき：PCは1行に並べて縦線で区切り、スマホは2段に積む */
#st-header-top-widgets-box .st-content-width{ display:flex !important; flex-wrap:wrap; justify-content:center; align-items:center; gap:4px 0; }
#st-header-top-widgets-box .widget_st_info_mation_widget{ width:auto !important; max-width:100%; margin:0 !important; padding:0 !important; float:none !important; }
#st-header-top-widgets-box .widget_st_info_mation_widget + .widget_st_info_mation_widget{ position:relative; margin-left:20px !important; padding-left:20px !important; }
#st-header-top-widgets-box .widget_st_info_mation_widget + .widget_st_info_mation_widget::before{ content:""; position:absolute; left:0; top:50%; width:1px; height:12px; margin-top:-6px; background:#D9D5D0; }
/* リンクは太字・黒の下線をやめ、ワインの細い下線と矢印にする */
#st-header-top-widgets-box #st-infomation-widget a{
  color:#6E2B49 !important; font-weight:400 !important; text-decoration:none !important;
  border-bottom:1px solid rgba(110,43,73,.35); padding-bottom:1px; outline:none; transition:border-color .2s;
}
#st-header-top-widgets-box #st-infomation-widget a::after{ content:"→"; display:inline-block; margin-left:.5em; transition:transform .2s; }
#st-header-top-widgets-box #st-infomation-widget a:hover{ border-bottom-color:#6E2B49; }
#st-header-top-widgets-box #st-infomation-widget a:hover::after{ transform:translateX(3px); }
#st-header-top-widgets-box #st-infomation-widget a:focus-visible{ outline:1px solid #6E2B49; outline-offset:3px; }
@media (max-width:599px){
  #st-header-top-widgets-box .st-content-width{ flex-direction:column; gap:2px; padding:8px 16px !important; }
  #st-header-top-widgets-box .widget_st_info_mation_widget + .widget_st_info_mation_widget{ margin-left:0 !important; padding-left:0 !important; }
  #st-header-top-widgets-box .widget_st_info_mation_widget + .widget_st_info_mation_widget::before{ display:none; }
}

/* ---- 8. スマホのスライドメニュー（AFFINGER の #s-navi .acordion_tree） ----
   構成（メニューの項目）は WordPress のメニュー設定のまま。見た目だけを整える */
@media only screen and (max-width:959px){
  :root{ --chh-drawer:min(84vw, 320px); }   /* メニューの幅 */
  /* 閉じているときは幅の分だけ左に隠し、開いたときに左端へ出す（AFFINGER の -250px を上書き） */
  #s-navi dd.acordion_tree{ left:calc(-1 * var(--chh-drawer)) !important; }
  .s-navi-active #s-navi dd.acordion_tree{ left:0 !important; }
  #s-navi dd.acordion_tree{
    width:var(--chh-drawer) !important;
    max-width:none !important;
    background:#FFFFFF !important;
    box-shadow:none !important;
    -webkit-overflow-scrolling:touch;
  }
  #s-navi dd.acordion_tree .acordion_tree_content{
    padding:0 0 calc(32px + env(safe-area-inset-bottom, 0px)) !important;
    font-family:"Noto Sans JP","Hiragino Sans","Yu Gothic",sans-serif !important;
  }
  /* 上部：ロゴ（ヘッダーと同じ高さ56px） */
  #s-navi dd.acordion_tree .acordion_tree_content::before{
    content:""; display:block; height:60px; margin:0 24px;
    border-bottom:1px solid var(--chh-line);
    background:var(--chh-fg);
    -webkit-mask:var(--chh-logo) no-repeat left center / 132px auto;
            mask:var(--chh-logo) no-repeat left center / 132px auto;
  }
  #s-navi dd.acordion_tree ul.menu{ margin:8px 0 0 !important; padding:0 !important; }
  #s-navi dd.acordion_tree ul.menu li{ margin:0 !important; padding:0 !important; border:0 !important; background:none !important; list-style:none !important; }

  /* 第一階層 */
  #s-navi dd.acordion_tree ul.menu > li > a{
    position:relative; display:flex !important; align-items:center; justify-content:space-between; gap:16px;
    margin:0 24px !important; padding:17px 0 !important;
    border:0 !important; border-bottom:1px solid var(--chh-line) !important;
    background:none !important; color:var(--chh-fg) !important;
    font-size:15px !important; font-weight:400 !important; line-height:1.6 !important; letter-spacing:.06em !important;
    text-decoration:none !important;
  }
  /* 第二階層 */
  #s-navi dd.acordion_tree ul.sub-menu{ background:#F6F5F3 !important; margin:0 !important; padding:6px 0 !important; border-bottom:1px solid var(--chh-line); }
  #s-navi dd.acordion_tree ul.sub-menu li a{
    display:flex !important; align-items:center; justify-content:space-between; gap:12px;
    margin:0 24px !important; padding:11px 0 11px 14px !important;
    border:0 !important; background:none !important; color:var(--chh-sub) !important;
    font-size:13px !important; font-weight:400 !important; line-height:1.7 !important; letter-spacing:.04em !important;
    text-decoration:none !important;
  }
  #s-navi dd.acordion_tree ul.menu > li.menu-item-has-children.menu-item-expanded > a{ border-bottom-color:transparent !important; }

  /* 矢印：細く、グレーに */
  #s-navi dd.acordion_tree .menu-item-icon{
    flex:none; font-size:11px !important; color:#8A8A8A !important; margin:0 !important;
    transition:transform .25s ease;
  }
  #s-navi dd.acordion_tree ul.sub-menu .menu-item-icon{ font-size:10px !important; }
  #s-navi dd.acordion_tree li.menu-item-expanded > a > .menu-item-icon.st-svg-angle-down{ transform:rotate(180deg); }

  /* 押したとき */
  #s-navi dd.acordion_tree a:active{ color:var(--chh-hover) !important; }

  /* 今いるページの項目も、ほかと同じ見た目にする */
  #s-navi dd.acordion_tree li.current-menu-item > a,
  #s-navi dd.acordion_tree li.current_page_item > a,
  #s-navi dd.acordion_tree li.current-menu-ancestor > a,
  #s-navi dd.acordion_tree li.current_page_parent > a{ color:var(--chh-fg) !important; font-weight:400 !important; }
  #s-navi dd.acordion_tree ul.sub-menu li.current-menu-item > a,
  #s-navi dd.acordion_tree ul.sub-menu li.current_page_item > a{ color:var(--chh-sub) !important; }

  /* メニューを開いたとき、ページ側をメニューの幅だけずらす（AFFINGER の 250px を上書き） */
  .s-navi-active #st-ami,
  .s-navi-active #s-navi dl.acordion,
  .s-navi-active #st-footermenubox{ left:var(--chh-drawer) !important; }

  /* 背景の暗幕：少し明るく、ぼかしを入れる */
  #s-navi-overlay{
    background:rgba(22,24,26,.45) !important;
    -webkit-backdrop-filter:blur(3px);
            backdrop-filter:blur(3px);
  }
  /* 閉じるボタン（メニューを開いているときのヘッダー左のボタン） */
  #s-navi .op.active,
  #s-navi .op.active i{ color:var(--chh-fg) !important; }
}

/* ---- 9. スマホのロゴを出さない端末（タブレット・トップページ）のロゴ ----
   AFFINGER は、スマホ以外の端末（iPad など）とトップページでは、スマホのロゴ欄（#st-mobile-logo）を空にし、
   PC用のロゴ（#header-l）をバーの下に出す。PC用のロゴをバーの中央に重ねて、スマホと同じ見た目にする */
@media only screen and (max-width:959px){
  #headbox{ position:relative !important; }
  #header-l{
    position:absolute !important; top:0; left:50%; transform:translateX(-50%);
    width:auto !important; height:60px; margin:0 !important; padding:0 !important; float:none !important;
    display:flex !important; align-items:center; z-index:100001 !important; pointer-events:none;
  }
  #header-l a{ pointer-events:auto; }
  #header-l #st-text-logo{ margin:0 !important; padding:0 !important; }
  #header-l .descr{ display:none !important; }
  header #st-text-logo h1.sitename a,
  header #st-text-logo p.sitename a{ width:210px !important; height:auto !important; aspect-ratio:1059 / 119; }
  #st-mobile-logo:empty{ display:none !important; }
  /* トップページでは、タブレットなど #header-l（PC用ロゴ）が出る端末だけ #st-mobile-logo を隠す（二重表示を防ぐ）。
     スマホは #header-l が出力されないので、#st-mobile-logo をそのまま表示する */
  .home:has(#header-l) #st-mobile-logo{ display:none !important; }
  html.s-navi-active #header-l{ display:none !important; }
}

/* ---- 10. 横幅 960〜1109px（iPad の横向きなど） ----
   PCのレイアウトのまま幅が足りず、メニューが2段に折り返し、ロゴと本文が画面の端に付くため、
   左右に余白を取り、メニューの文字と間隔を少し詰めて1段に収める */
@media only screen and (min-width:960px) and (max-width:1109px){
  #headbox{ padding-left:24px !important; padding-right:24px !important; }
  body .chw .chw-wrap{ padding-inline:24px; }
  #headbox-bg .mega-menu > li.mega-menu-item > a.mega-menu-link{
    padding-left:9px !important; padding-right:9px !important;
    font-size:13px !important; letter-spacing:.02em !important;
  }
  #headbox-bg [id^="mega-menu-wrap"] > ul.mega-menu{ white-space:nowrap; }
}

/* ---- 11. Max Mega Menu のドロップダウン（PC） ----
   style.css の旧デザイン（生成り・明朝・Cormorant・角丸）を、白地・墨・Archivo の現行デザインに上書きする */
#headbox-bg .mega-menu .mega-menu-megamenu > .mega-sub-menu,
#headbox-bg .mega-menu .mega-menu-flyout > .mega-sub-menu{
  background:var(--chh-bg) !important;
  border:0 !important;
  border-top:1px solid var(--chh-line) !important;
  border-radius:0 !important;
  box-shadow:0 24px 48px rgba(22,24,26,.10) !important;
  padding:40px 32px 44px !important;
}
#headbox-bg .mega-menu .mega-menu-column{ padding:0 24px !important; }

/* 列見出し（子リンクを持つ項目）：日本語 500 ＋ 英字ラベル（Archivo・ワイン）＋ 細い墨の罫線 */
#headbox-bg .mega-menu .mega-menu-column > .mega-sub-menu > li.mega-menu-item-has-children > a.mega-menu-link{
  font-family:"Noto Sans JP","Hiragino Sans","Yu Gothic",sans-serif !important;
  font-weight:500 !important;
  font-size:15px !important;
  line-height:1.5 !important;
  letter-spacing:.04em !important;
  color:var(--chh-fg) !important;
  background:transparent !important;
  padding:0 !important;
  margin:0 0 16px !important;
}
#headbox-bg .mega-menu .mega-menu-column > .mega-sub-menu > li.mega-menu-item-has-children > a.mega-menu-link .mega-menu-description{
  display:block !important;
  font-family:"Archivo","Helvetica Neue",Arial,sans-serif !important;
  font-stretch:125%;
  font-style:normal !important;
  font-weight:600 !important;
  font-size:10px !important;
  letter-spacing:.2em !important;
  text-transform:uppercase !important;
  color:var(--chh-hover) !important;
  margin-top:4px !important;
}
#headbox-bg .mega-menu .mega-menu-column > .mega-sub-menu > li.mega-menu-item-has-children > a.mega-menu-link::after{
  content:"" !important;
  display:block !important;
  width:24px !important;
  height:1px !important;
  background:var(--chh-fg) !important;
  margin-top:14px !important;
}
#headbox-bg .mega-menu .mega-menu-column > .mega-sub-menu > li.mega-menu-item-has-children > a.mega-menu-link .mega-indicator{ display:none !important; }

/* リンク（見出しの下の3階層目、見出しのない列の直置き） */
#headbox-bg .mega-menu .mega-menu-column > .mega-sub-menu > li.mega-menu-item-has-children > ul.mega-sub-menu > li.mega-menu-item > a.mega-menu-link,
#headbox-bg .mega-menu .mega-menu-column > .mega-sub-menu > li.mega-menu-item:not(.mega-menu-item-has-children) > a.mega-menu-link{
  font-family:"Noto Sans JP","Hiragino Sans","Yu Gothic",sans-serif !important;
  font-weight:400 !important;
  font-size:13px !important;
  line-height:1.7 !important;
  letter-spacing:.02em !important;
  color:var(--chh-sub) !important;
  background:transparent !important;
  padding:7px 0 !important;
  border:0 !important;
  transition:color .15s, padding .15s !important;
}
#headbox-bg .mega-menu .mega-menu-column > .mega-sub-menu > li.mega-menu-item:not(.mega-menu-item-has-children) > a.mega-menu-link .mega-menu-title{ font-weight:400 !important; }
#headbox-bg .mega-menu .mega-menu-column > .mega-sub-menu > li.mega-menu-item:not(.mega-menu-item-has-children) > a.mega-menu-link .mega-menu-description{
  display:block !important; font-family:"Archivo","Helvetica Neue",Arial,sans-serif !important; font-stretch:112%; font-size:10px !important; letter-spacing:.14em !important; text-transform:uppercase !important; color:#8A8A8A !important; margin-top:2px !important;
}
#headbox-bg .mega-menu .mega-sub-menu a.mega-menu-link:hover,
#headbox-bg .mega-menu .mega-sub-menu a.mega-menu-link:focus{
  color:var(--chh-hover) !important;
  background:transparent !important;
  padding-left:4px !important;
}

/* ピックアップ（カスタムHTMLウィジェット）：角丸をなくし、英字ラベルを Archivo に */
#headbox-bg .mega-menu .custom-html-widget > a{ border-radius:0 !important; background:var(--chh-fg) !important; }
#headbox-bg .mega-menu .custom-html-widget > a > div:first-child{ background:#F6F5F3 !important; }
#headbox-bg .mega-menu .custom-html-widget > a span{ font-family:"Noto Sans JP","Hiragino Sans","Yu Gothic",sans-serif !important; font-weight:400 !important; }
#headbox-bg .mega-menu .custom-html-widget > a span:first-of-type{ font-family:"Archivo","Helvetica Neue",Arial,sans-serif !important; font-stretch:125%; font-weight:600 !important; letter-spacing:.2em !important; color:#B87E9C !important; }
#headbox-bg .mega-menu .custom-html-widget > a span:last-of-type{ font-family:"Archivo","Helvetica Neue",Arial,sans-serif !important; font-stretch:125%; font-weight:600 !important; font-size:11px !important; letter-spacing:.18em !important; text-transform:uppercase; }

/* ---- 9. ページの見出し（h1）の折り返し ----
   js/ch-heading.js が語の区切りに <wbr> を入れ、そこだけで改行する（トップページ以外）。
   スクリプトが動かないブラウザでは、行の長さをそろえる指定だけが効く */
body:not(.home) h1.entry-title{ text-wrap:balance; }
body:not(.home) h1.entry-title.is-phrased{ word-break:keep-all; overflow-wrap:anywhere; }

/* ---- 10. 本文の表 ----
   AFFINGER のテーマ設定（テーブルのヘッダー色 #565656 と1行目の装飾、偶数行の色）を打ち消し、
   生成りのヘッダー・墨の文字・細い罫線にそろえる。料金表（.chp）とカーフィルム料金表（.chfp-）は対象外 */
:is(.chw-content,.entry-content) table:not(.chp table):not([class*="chfp"]){ width:100%; border-collapse:collapse !important; border:0 !important; margin:28px 0 !important; font-size:14px; line-height:1.75; }
:is(.chw-content,.entry-content) table:not(.chp table):not([class*="chfp"]) tr,
:is(.chw-content,.entry-content) table:not(.chp table):not([class*="chfp"]) thead tr{ background:transparent !important; }
:is(.chw-content,.entry-content) table:not(.chp table):not([class*="chfp"]) th,
:is(.chw-content,.entry-content) table:not(.chp table):not([class*="chfp"]) td{
  border:0 !important; border-bottom:1px solid #E6E3DF !important; padding:12px 14px !important; text-align:left; vertical-align:top;
}
:is(.chw-content,.entry-content) table:not(.chp table):not([class*="chfp"]) th{
  background:#F6F5F3 !important; color:#16181A !important; font-weight:500 !important; letter-spacing:.04em;
}
:is(.chw-content,.entry-content) table:not(.chp table):not([class*="chfp"]) thead th{ border-bottom-color:#16181A !important; }
:is(.chw-content,.entry-content) table:not(.chp table):not([class*="chfp"]) td{ background:transparent !important; color:#16181A !important; }
/* セルの中に段落や太字が入っている古い表でも、色と余白が崩れないようにする */
:is(.chw-content,.entry-content) table:not(.chp table):not([class*="chfp"]) :is(th,td) :is(p,b,strong,span){ color:inherit !important; margin:0 !important; padding:0 !important; font-size:inherit !important; line-height:inherit !important; }
:is(.chw-content,.entry-content) table:not(.chp table):not([class*="chfp"]) :is(th,td) b{ font-weight:inherit !important; }
@media (max-width:599px){
  :is(.chw-content,.entry-content) table:not(.chp table):not([class*="chfp"]){ font-size:13px; }
  :is(.chw-content,.entry-content) table:not(.chp table):not([class*="chfp"]) :is(th,td){ padding:10px 8px !important; }
}

/* ---- 11. 投稿下のカテゴリー・タグ（AFFINGER の .tagst） ----
   左右に -9999px で広げる灰色の帯がページ全体の横スクロールを起こしていたため、帯をやめて枠内に収める */
.tagst{ margin:32px 0 0 !important; padding:20px 0 0 !important; background:none !important; border-top:1px solid #E6E3DF; line-height:2 !important; color:#8A8A8A !important; font-size:12px !important; max-width:100%; overflow-wrap:anywhere; }
.tagst a{ display:inline-block; margin:4px 6px 4px 0 !important; padding:3px 12px !important; border:1px solid #E6E3DF; border-radius:2px !important; background:#FFFFFF !important; color:#4A4A4A !important; font-size:12px; text-decoration:none !important; transition:border-color .2s,color .2s; }
.tagst a:hover{ border-color:#16181A; color:#16181A !important; }
.tagst a::before{ content:none !important; }
.tagst .st-fa{ display:none; }

/* ---- 12. 旧ショートコードの受け皿（ch-html-parts.php） ---- */
.ch-aside{ margin:28px 0; padding:20px 22px; background:#F6F5F3; border-left:2px solid #6E2B49; font-size:14px; line-height:1.9; }
.ch-aside > :last-child{ margin-bottom:0 !important; }
.ch-taggroup{ display:grid; grid-template-columns:1fr 1fr; gap:24px 12px; margin:28px 0; }
.ch-taggroup__item{ display:flex; flex-direction:column; gap:8px; color:#16181A !important; text-decoration:none !important; }
.ch-taggroup__ph{ display:block; aspect-ratio:4/3; overflow:hidden; background:#ECEAE6; }
.ch-taggroup__ph img{ width:100% !important; height:100% !important; object-fit:cover; margin:0 !important; display:block; }
.ch-taggroup__nm{ font-size:13px; line-height:1.6; }
.ch-taggroup__more{ grid-column:1 / -1; margin:4px 0 0 !important; font-size:13px; }
.ch-taggroup__more a{ color:#6E2B49 !important; }
@media (min-width:960px){ .ch-taggroup{ grid-template-columns:repeat(3,minmax(0,1fr)); gap:32px 20px; } .ch-taggroup__nm{ font-size:14px; } }
