/* 共通ヘッダー・フッター（正本は ../partials/、反映は scripts/sync-partials.mjs） */

/* 固定ヘッダーの下にアンカー先が隠れないようにする */
[id] { scroll-margin-top: 76px; }

/* ---------- ヘッダー ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: #007D7D; border-top: 3px solid #E2231A; box-shadow: 0 1px 6px rgba(0,0,0,0.08); }
.site-header__inner { max-width: 1120px; margin: 0 auto; padding: 15px 40px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.site-brand { font-weight: 900; font-size: 17px; letter-spacing: 0.04em; color: #fff; text-decoration: none; white-space: nowrap; }

.site-nav { display: flex; align-items: center; gap: 24px; }
.site-nav__group { display: contents; }
.site-nav__heading { display: none; }
.site-nav a { text-decoration: none; color: rgba(255,255,255,0.85); font-size: 13px; font-weight: 500; white-space: nowrap; }
.site-nav a[aria-current="page"] { color: #fff; font-weight: 700; border-bottom: 2px solid rgba(255,255,255,0.7); padding-bottom: 2px; }
.site-nav a.nav-cta { color: #007D7D; background: #fff; font-weight: 700; padding: 9px 18px; border-radius: 2px; }
.site-nav a.nav-cta[aria-current="page"] { border-bottom: 0; padding-bottom: 9px; }
.site-nav .sp-only { display: none; }

.nav-mypage { display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(255,255,255,0.45); padding: 7px 12px; border-radius: 2px; }

.nav-toggle { display: none; background: none; border: 0; padding: 8px; margin: -8px -8px -8px 0; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: #fff; margin: 5px 0; transition: transform .2s ease, opacity .2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 960px) {
  .site-header__inner { padding: 15px 16px; }
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: #007D7D; border-top: 1px solid rgba(255,255,255,0.18); padding: 8px 16px 24px; box-shadow: 0 6px 12px rgba(0,0,0,0.12); max-height: calc(100vh - 60px); overflow-y: auto; }
  .site-nav.open { display: flex; }
  .site-nav__group { display: block; padding-top: 14px; }
  .site-nav__heading { display: block; font-size: 11px; letter-spacing: 0.16em; font-weight: 700; color: rgba(255,255,255,0.55); padding: 8px 0 4px; }
  .site-nav a { display: block; padding: 13px 0; font-size: 14.5px; border-bottom: 1px solid rgba(255,255,255,0.14); white-space: normal; }
  .site-nav a[aria-current="page"] { border-bottom: 1px solid rgba(255,255,255,0.14); padding-bottom: 13px; }
  .site-nav .sp-only { display: block; }
  .site-nav .pc-only { display: none; }
  .site-nav__group--actions { display: flex; flex-direction: column; gap: 10px; padding-top: 22px; }
  .site-nav__group--actions a { border-bottom: 0; text-align: center; }
  .site-nav .nav-mypage { display: flex; justify-content: center; border: 1px solid rgba(255,255,255,0.45); padding: 13px 0; }
  .site-nav a.nav-cta { padding: 14px 0; }
}

/* ---------- フッター ---------- */
.site-footer { background: #161210; color: #a89b88; padding: 56px 0 36px; }
.site-footer__inner { max-width: 1120px; margin: 0 auto; padding: 0 40px; }
.site-footer__cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.6fr); gap: 32px 40px; padding-bottom: 36px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.site-footer__col { display: flex; flex-direction: column; gap: 10px; }
.site-footer__heading { font-size: 11px; letter-spacing: 0.16em; font-weight: 700; color: #6fcece; margin-bottom: 6px; }
.site-footer__col a { font-size: 12.5px; color: #c9bfae; text-decoration: none; letter-spacing: 0.02em; }
.site-footer__col a:hover { color: #fff; opacity: 1; }
.site-footer__col--contact p { margin: 0 0 6px; font-size: 12.5px; line-height: 1.9; color: #a89b88; text-wrap: pretty; }
/* お問い合わせの誘導ボタンは CTBC の赤（#E2231A、ヘッダー上端のラインと同じ）。
   以前の青 #0072B5 は競合行を思わせるため使わない。
   同じ色のボタンが site/index.html と site/schedule.html にも直書きしてある。
   本文リンクの青（#0072B5）はリンクと分かる手掛かりなので残す。 */
.site-footer__cta { display: inline-block; align-self: flex-start; background: #E2231A; color: #fff !important; font-weight: 700; padding: 11px 22px; border-radius: 2px; }
.site-footer__cta:hover { color: #fff; }
.site-footer__bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; padding-top: 22px; font-size: 11px; letter-spacing: 0.04em; }
.site-footer__bottom a { color: #c9bfae; text-decoration: none; border-bottom: 1px solid rgba(201,191,174,0.4); }

@media (max-width: 860px) {
  .site-footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer__col--contact { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .site-footer__inner { padding: 0 16px; }
  .site-footer__cols { grid-template-columns: 1fr; }
  .site-footer__bottom { flex-direction: column; }
}

/* ------------------------------------------------------------------ */
/* ログイン状態による共通ヘッダーの出し分け                            */
/* ------------------------------------------------------------------ */
/* 印は <html data-auth="in|out">（site/assets/site.js）。
 * ログイン中はマイページだけを出し、出願するボタンは隠す。
 * 判定がつくまではマイページを出さない（/my を開けない環境があるため）。
 * display:none だけを足し、それ以外の見た目の規則には触れない。 */
html:not([data-auth]) .nav-mypage { display: none; }
html[data-auth="in"] [data-auth-hide="in"] { display: none; }
