/* 全ページ共通のヘッダー／フッター（site-chrome.mjs が生成）。
   ページ側の header / footer / body::before の規則に負けないよう、body 直下を指定して値を明示する。
   AIキャラチャット系のダーク表示は ai-dark.css。 */
:root { --ep-header-h: 64px; --ep-chrome-h: 64px; --ep-shu: #c0341d; --ep-chrome-accent: var(--ep-shu); --ep-chrome-ink: #231f1c; --ep-chrome-sub: #5f5852; --ep-chrome-line: #e6e0d7; }

/* 旧ページが body::before で引いていた4pxの朱線は、ヘッダー上端の3px線に置き換える */
body::before { content: none !important; }

/* ヘッダー：1行・高さ64px（上端の朱線3px込み）。ロゴの位置は全ページで同じ（内側は最大1200px） */
html body > header.ep-shell-header {
  box-sizing: border-box; position: static; display: flex; align-items: center; gap: 12px;
  width: 100%; max-width: none; min-width: 0; height: var(--ep-header-h); min-height: var(--ep-header-h); margin: 0;
  padding: 0 max(16px, calc((100% - 1200px) / 2));
  background: #fff; border: 0; border-top: 3px solid var(--ep-chrome-accent); border-bottom: 1px solid var(--ep-chrome-line); box-shadow: none; z-index: auto;
  color: var(--ep-chrome-ink); font: 700 14px/1.4 "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", "Noto Sans JP", system-ui, sans-serif; letter-spacing: .02em; white-space: nowrap;
}
body .ep-chrome-a.ep-chrome-a, body .ep-chrome-a.ep-chrome-a:visited { display: inline-flex; align-items: center; min-height: 44px; margin: 0; color: var(--ep-chrome-ink); text-decoration: none; }
body .ep-chrome-a.ep-chrome-a:hover { color: var(--ep-chrome-accent); }
body .ep-chrome-a.ep-chrome-a:focus-visible { outline: 3px solid #266bba; outline-offset: 2px; border-radius: 6px; }
.ep-chrome-accent { color: var(--ep-chrome-accent); }
body .ep-shell-header .ep-shell-logo.ep-chrome-a { flex: none; padding: 0; gap: 10px; font-size: 17px; font-weight: 900; letter-spacing: .04em; line-height: 1.2; }
body .ep-chrome-a.ep-chrome-a img { display: block; flex: none; width: 30px; height: 30px; object-fit: contain; }
body .ep-shell-header .ep-shell-nav { margin: 0; padding: 0; width: auto; max-width: none; display: flex; flex: 1 1 auto; align-items: center; justify-content: flex-end; min-width: 0; gap: 4px; }
body .ep-shell-nav .ep-chrome-a.ep-chrome-a { padding: 0 12px; }
body .ep-shell-nav .ep-shell-ext.ep-chrome-a, body .ep-shell-nav .ep-shell-ext.ep-chrome-a:visited { color: #6b645c; }
body .ep-shell-nav .ep-chrome-a.ep-chrome-a[aria-current], body .ep-shell-nav .ep-chrome-a.ep-chrome-a[aria-current]:visited { color: var(--ep-chrome-accent); }
/* 狭い画面では右から順に減らす：860px未満でエンタメパンダ、560px未満でツール一覧とトップの使い方 */
@media (max-width: 859px) { body .ep-shell-nav .ep-shell-ext.ep-chrome-a { display: none; } }
@media (max-width: 559px) {
  html body > header.ep-shell-header { gap: 8px; padding: 0 12px; }
  body .ep-shell-nav .ep-shell-ai.ep-chrome-a { display: none; }
  body .ep-shell-header .ep-shell-logo.ep-chrome-a { gap: 8px; font-size: 15px; }
  body .ep-shell-header .ep-shell-logo.ep-chrome-a img { width: 26px; height: 26px; }
  body .ep-shell-nav .ep-chrome-a.ep-chrome-a { padding: 0 8px; }
}
@media (max-width: 359px) { body .ep-shell-nav .ep-shell-howto.ep-chrome-a { display: none; } }
@media (max-width: 389px) { body .ep-shell-header .ep-shell-logo.ep-chrome-a { font-size: 14px; letter-spacing: .02em; } body .ep-shell-header .ep-shell-logo.ep-chrome-a img { width: 24px; height: 24px; } }

/* ダーク表示（AIキャラチャット系）でも、ロゴのパンダ印と「ツールズ」はトップと同じ朱。ai-dark.css の白抜きフィルターと色指定より強く指定する */
html[data-theme="dark"] body > header.ep-shell-header .ep-shell-logo img, html[data-theme="dark"] body > footer.ep-site-footer .ep-site-footer-logo img { filter: none !important; }
/* ダーク表示のロゴ文字「ツールズ」は、暗い背景で読める明るい朱にする（肉球マークは朱のまま） */
html[data-theme="dark"] body .ep-chrome-a .ep-chrome-accent.ep-chrome-accent { color: var(--d-accent, #f0846c) !important; }

/* フッター */
html body > footer.ep-site-footer {
  box-sizing: border-box; display: block; width: 100%; max-width: none; min-width: 0; margin: 64px 0 0; padding: 24px max(16px, calc((100% - 1200px) / 2)) 16px;
  background: #f6f3ef; border: 0; border-top: 1px solid var(--ep-chrome-line); color: var(--ep-chrome-sub);
  font: 500 13px/1.7 "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", "Noto Sans JP", system-ui, sans-serif; letter-spacing: .02em; text-align: left;
}
.ep-site-footer-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 40px; }
.ep-site-footer-brand { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ep-site-footer-brand p { margin: 0; color: var(--ep-chrome-sub); font-size: 13px; }
body .ep-site-footer .ep-site-footer-logo.ep-chrome-a { padding: 0; gap: 10px; font-size: 16px; font-weight: 900; letter-spacing: .04em; line-height: 1.2; }
body .ep-site-footer .ep-site-footer-nav { display: flex; flex-wrap: wrap; gap: 0 8px; width: auto; max-width: none; margin: 0; padding: 0; }
body .ep-site-footer-nav .ep-chrome-a.ep-chrome-a { padding: 0 8px; font-size: 13px; font-weight: 700; }
body .ep-site-footer-nav .ep-chrome-a.ep-chrome-a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ep-site-footer-copy { margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--ep-chrome-line); color: var(--ep-chrome-sub); font-size: 12px; }
@media (max-width: 559px) {
  html body > footer.ep-site-footer { margin-top: 48px; padding-left: 12px; padding-right: 12px; }
  body .ep-site-footer .ep-site-footer-nav { margin: 0 -8px; }
}

/* 旧フッターにあった使い方・免責の一文は、本文の下の注記として残す */
.ep-page-note { box-sizing: border-box; max-width: none; margin: 24px 0 0; padding: 0 max(16px, calc((100% - 1200px) / 2)); color: var(--ep-chrome-sub); font: 500 13px/1.8 system-ui, -apple-system, "Hiragino Sans", sans-serif; }
.ep-page-note + .ep-site-footer { margin-top: 24px; }

/* 印刷物には出さない（お品書き・値札などは本文だけを刷る） */
@media (max-width: 559px) { .ep-page-note { padding-left: 12px; padding-right: 12px; } }
@media print { html body > header.ep-shell-header, html body > footer.ep-site-footer, .ep-page-note { display: none !important; } }
