/* 全ページ共通のヘッダーとフッター(ページの枠)。
   src/layout.ts のページに加え、static/ に置いた独自デザインのページ(/entry/<slug>/ など)にも
   build.ts が差し込む。どのページの CSS とも衝突しないよう、変数は --hd-* にし、
   要素ではなくクラスを使う。色・寸法を変えるときは site.css の値とそろえること。 */
:root {
  --hd-brand: #1c4e98;
  --hd-fg: #1d232a;
  --hd-line: #e2e6ea;
  --hd-bg: #ffffff;
}

/* ヘッダー・フッターの文字(ページ独自の body の書体に左右されないようにする) */
.site-header, .site-footer {
  font-family: system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", sans-serif;
  line-height: 1.75;
}
.site-header *, .site-header *::before, .site-header *::after,
.site-footer *, .site-footer *::before, .site-footer *::after { box-sizing: border-box; }
/* 固定ヘッダーの下に、ページ内リンク(#apply など)の行き先が隠れないようにする */
html { scroll-padding-top: 72px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 10; background: var(--hd-bg); padding: 8px 12px; }

.site-header {
  position: sticky; top: 0; z-index: 5;
  background: var(--hd-bg); border-bottom: 1px solid var(--hd-line);
  font-size: 16px; color: var(--hd-fg);
}
.site-header .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.header-inner { display: flex; align-items: center; gap: 16px; min-height: 64px; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.site-logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.25rem; color: var(--hd-fg); text-decoration: none; margin-right: auto; white-space: nowrap; }
/* 文字ロゴ(assets/logo-text.svg)。縦横比は変えない */
.site-logo img { display: block; width: auto; height: 28px; }
.site-header ul { margin: 0; padding: 0; list-style: none; }
.site-header nav a { color: var(--hd-fg); text-decoration: none; font-weight: 600; font-size: .95rem; }
.site-header nav a:hover, .site-header nav a[aria-current] { color: var(--hd-brand); }
.nav-wide { display: none; }
.nav-wide ul { display: flex; gap: 20px; }

/* radiko 公式ボタン(画像)。縦横比は変えない。/listen/ の大きいボタン(.radiko-l)も使う */
.radiko-btn { display: inline-block; flex: none; line-height: 0; }
.radiko-btn img { display: block; width: auto; max-width: none; }
.radiko-s img { height: 40px; }

/* スマホのメニュー */
.nav-toggle { order: 3; }
.nav-toggle summary { list-style: none; cursor: pointer; padding: 10px; }
.nav-toggle summary::-webkit-details-marker { display: none; }
.burger, .burger::before, .burger::after { display: block; width: 22px; height: 2px; background: var(--hd-fg); position: relative; }
.burger::before, .burger::after { content: ""; position: absolute; left: 0; }
.burger::before { top: -7px; }
.burger::after { top: 7px; }
.nav-toggle[open] nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--hd-bg); border-bottom: 1px solid var(--hd-line); }
.nav-toggle nav li a { display: block; padding: 12px 16px; border-top: 1px solid var(--hd-line); }

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .nav-wide { display: block; }
}
/* スマホ・タブレット(メニューを畳んでいる幅): 左に局ロゴ、右に radiko ボタン(小さめ)と三本線のメニュー。
   2026-11-13 変更: ロゴを中央に置く形をやめ、ロゴを大きく、radiko ボタンを控えめにした。
   radiko ボタンは公式画像なので色・縦横比(685:165)は変えず、高さだけ小さくする */
@media (max-width: 899px) {
  .header-inner { gap: 6px; }
  .site-logo { margin-right: auto; }
  .site-logo img { height: 30px; }
  .site-header .radiko-btn { order: 2; }
  .radiko-s img { height: 28px; }
  .nav-toggle { order: 3; margin-right: -10px; } /* 三本線を右端にそろえる(summary の余白ぶん) */
}
/* スマホ: ロゴは入るだけ大きく(最大 26px)。radiko ボタンは高さ 24px(幅 約100px) */
@media (max-width: 520px) {
  .header-inner { min-height: 58px; }
  .site-logo img { height: min(26px, (100vw - 186px) * .15); } /* 186px = 左右の余白 32 + radiko 100 + 三本線 42 + 間 6×2。.15 ≒ 44 / 293 */
  .radiko-s img { height: 24px; }
}
@media (max-width: 359px) {
  .site-header .radiko-btn { display: none; } /* 幅 359px 以下はロゴとメニューを優先する */
  .site-logo img { height: 24px; }
}

/* フッター。ページ独自の footer { ... } や footer p { ... } に負けないよう、クラスで指定し値を明示する */
.site-footer { margin-top: 56px; padding: 0; background: var(--hd-fg); color: #cfd6dd; font-size: .9rem; text-align: left; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.footer-inner, .site-footer .copyright { max-width: 1080px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
/* .site-footer を付けて書くのは、site.css の .wrap { padding: 0 16px } に上下の余白を消されないため(2026-11-11) */
.site-footer .footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px 32px; padding-top: 40px; padding-bottom: 20px; }
.site-footer .footer-inner p { margin: 0 0 6px; line-height: 1.7; }
.site-footer .footer-name { color: #fff; font-weight: 700; }
.site-footer .footer-inner .footer-freqs { display: flex; flex-wrap: wrap; gap: 0 18px; margin: 6px 0 12px; }
.footer-freqs span { white-space: nowrap; }
/* スマホ幅では住所を郵便番号のあとで改行する(2026-11-14) */
@media (max-width: 760px) { .site-footer .footer-addr .footer-zip { display: block; } }
.footer-freqs strong { color: #fff; font-size: 1rem; }
.site-footer ul { display: flex; flex-wrap: wrap; gap: 10px 20px; line-height: 1.7; margin: 0; padding: 0; list-style: none; max-width: 560px; }
.site-footer .copyright { padding-top: 16px; padding-bottom: 32px; margin-bottom: 0; color: #8f9aa5; font-size: .8rem; }
