/* ヨリピタ 共通ヘッダー（1.5.0。ホームと記事）。.ypt-header・.ypt-drawer の中だけに効く。
   記事では Cocoon のスタイルの中に置くので、要素の初期化をこのファイルの中で行う（ホームの top.css の body.ypt-front に頼らない）。
   ロゴは 1.4.2 から約1.2倍：PC 40→48px・タブレット 34→41px・スマホ 32→38px（縦横比は画像のまま 2172:724）。 */
.ypt-header, .ypt-drawer {
  --ypt-green: #0d5541;
  --ypt-text: #26332e;
  --ypt-line: #e1e7e4;
  --ypt-pale: #eef5f1;
  --ypt-gray: #f6f8f7;
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ypt-text);
  text-align: left;
}
.ypt-header *, .ypt-header *::before, .ypt-header *::after,
.ypt-drawer *, .ypt-drawer *::before, .ypt-drawer *::after { box-sizing: border-box; }
.ypt-header a, .ypt-drawer a { color: inherit; text-decoration: none; box-shadow: none; }
.ypt-header ul, .ypt-drawer ul { list-style: none; margin: 0; padding: 0; }
.ypt-header li, .ypt-drawer li { margin: 0; padding: 0; list-style: none; }
.ypt-header li::before, .ypt-drawer li::before { content: none; }
.ypt-header svg, .ypt-drawer svg { display: block; }
.ypt-header form, .ypt-header input, .ypt-header button, .ypt-drawer button { margin: 0; font-family: inherit; box-shadow: none; text-shadow: none; }
.ypt-header :focus-visible, .ypt-drawer :focus-visible, .ypt-skip:focus-visible { outline: 3px solid #7fb8a1; outline-offset: 2px; }
.ypt-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ypt-skip { position: absolute; left: -9999px; top: 0; }
.ypt-skip:focus { left: 8px; top: 8px; z-index: 100001; background: #fff; color: #0d5541; padding: 8px 12px; border: 2px solid #0d5541; }
.ypt-header .ypt-wrap { width: 100%; max-width: 1180px; margin-left: auto; margin-right: auto; padding-left: 24px; padding-right: 24px; }

.ypt-header { background: #fff; border-bottom: 1px solid var(--ypt-line); position: relative; z-index: 20; }
.ypt-header__bar { display: flex; align-items: center; gap: 24px; height: 68px; }
.ypt-logo { display: inline-flex; align-items: center; flex: 0 0 auto; }
.ypt-header .ypt-logo__img { display: block; height: 48px; width: auto; max-width: none; aspect-ratio: 2172 / 724; margin: 0; border: 0; }
.ypt-logo__text { font-size: 26px; font-weight: 700; color: var(--ypt-green); letter-spacing: .04em; }
.ypt-header .ypt-search { display: flex; align-items: center; background: var(--ypt-gray); border: 1px solid var(--ypt-line); border-radius: 6px; overflow: hidden; }
.ypt-header .ypt-search input { -webkit-appearance: none; appearance: none; flex: 1 1 auto; width: auto; min-width: 0; height: auto; border: 0; border-radius: 0; background: transparent; padding: 10px 12px; font-size: 15px; line-height: 1.4; color: var(--ypt-text); outline: none; }
.ypt-header .ypt-search input::placeholder { color: #8a9590; }
/* スマホの虫眼鏡で開く検索欄は16px以上（iPhone Safari は16px未満の入力欄にフォーカスするとページを自動拡大する。2026-11-06） */
.ypt-header #ypt-s-sp { font-size: 16px; }
.ypt-header .ypt-search button { flex: 0 0 auto; width: 44px; height: 42px; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--ypt-green); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.ypt-header .ypt-search svg, .ypt-iconbtn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.ypt-search--pc { flex: 0 1 360px; margin-left: auto; }
.ypt-header__tools { display: none; margin-left: auto; gap: 4px; }
.ypt-iconbtn { width: 44px; height: 44px; padding: 0; border: 0; background: transparent; color: var(--ypt-green); border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; line-height: 1; min-height: 0; }
.ypt-iconbtn[aria-expanded="true"] { background: var(--ypt-pale); }
.ypt-search-panel { border-top: 1px solid var(--ypt-line); padding: 10px 0; background: #fff; }
.ypt-search-panel[hidden] { display: none; }
.ypt-search-panel .ypt-search { padding: 0; }
.ypt-nav { border-top: 1px solid var(--ypt-line); }
.ypt-header .ypt-nav ul { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px; row-gap: 0; padding-left: 24px; padding-right: 24px; }
.ypt-header .ypt-nav li { flex: 0 0 auto; }
.ypt-header .ypt-nav ul.is-wrapped { justify-content: center; }
.ypt-nav a { display: block; padding: 12px 6px; font-size: 14px; font-weight: 600; line-height: 1.6; color: var(--ypt-text); white-space: nowrap; border-bottom: 3px solid transparent; }
.ypt-nav a:hover { color: var(--ypt-green); border-bottom-color: var(--ypt-green); }

/* メニュー（ドロワー）。記事の追従ナビ・下部の固定メニュー・管理バーより上に出す */
.ypt-drawer { position: fixed; inset: 0; z-index: 100000; }
.ypt-drawer[hidden] { display: none; }
.ypt-drawer__backdrop { position: absolute; inset: 0; background: rgba(20, 30, 26, .45); }
.ypt-drawer__panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(86vw, 340px); background: #fff; overflow-y: auto; box-shadow: -2px 0 12px rgba(0, 0, 0, .12); }
.ypt-drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 8px 20px; border-bottom: 1px solid var(--ypt-line); font-weight: 700; color: var(--ypt-green); }
.ypt-drawer__list a { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--ypt-line); font-size: 16px; font-weight: 600; line-height: 1.6; }
.ypt-drawer__list .ypt-icon { width: 22px; height: 22px; color: var(--ypt-green); flex: 0 0 auto; }
body.ypt-noscroll { overflow: hidden; }

/* 記事：Cocoon のヘッダー（中央の大きなロゴ・グローバルナビ）とスキップリンクを隠す（二重に出さない） */
body.ypt-has-header #header-container, body.ypt-has-header .skip-link { display: none !important; }

@media (max-width: 899px) {
  .ypt-header .ypt-search--pc, .ypt-header .ypt-nav { display: none; }
  .ypt-header__tools { display: flex; }
  .ypt-header__bar { height: 58px; }
  .ypt-header .ypt-logo__img { height: 41px; }
}
@media (max-width: 599px) {
  .ypt-header .ypt-wrap { padding-left: 16px; padding-right: 16px; }
  .ypt-header__bar { height: 56px; gap: 8px; }
  .ypt-header .ypt-logo__img { height: 38px; }
}
/* 幅359px以下（320px など）：左右の余白と間隔を少し詰める（ロゴは38pxのまま。幅約114pxで、検索・メニューまで約90px空く） */
@media (max-width: 359px) {
  .ypt-header__bar.ypt-wrap { padding-left: 12px; padding-right: 8px; gap: 4px; }
}

/* 2026-11-21：記事の商品名のポップアップ（#yp-ref-pop）を開いている間だけ、Cocoon の「トップへ戻る」を出さない。
   記事の本文に埋め込む yp-finder.css と同じ規則。既存の公開記事は本文を作り直さないので、サイト全体のこの CSS で効かせる。
   display: none なのでクリックもフォーカスも受けない。閉じると規則が外れ、Cocoon がスクロール位置で表示を決める。 */
html:has(#yp-ref-pop:not([hidden])) #go-to-top {
  display: none !important;
}