/* 全ページで共通のヘッダーとフッター（色や書体の変数は各ページの :root にある） */

/* ヘッダー */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 1.5rem; padding-block: 0.85rem; max-width: 72rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--fg); font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.02em; }
.brand svg { width: 28px; height: 28px; flex: none; }
.nav { display: flex; gap: 1.25rem; margin-left: auto; font-size: 0.875rem; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--fg); }
.lang { font-family: var(--font-mono); font-size: 0.8rem; text-decoration: none; background: none; color: var(--fg); border: 1px solid var(--line); border-radius: 6px; padding: 0.3rem 0.6rem; cursor: pointer; white-space: nowrap; }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; margin-left: -0.75rem; background: none; color: var(--fg); border: 1px solid var(--line); border-radius: 6px; padding: 0; cursor: pointer; flex: none; }
.theme-toggle[hidden] { display: none; }
.nav-guide { display: none; font-size: 0.875rem; color: var(--muted); text-decoration: none; white-space: nowrap; }
@media (max-width: 640px) {
  .nav { display: none; }
  .nav-guide { display: inline; margin-left: auto; margin-right: -0.5rem; }
}

/* フッター */
.site-footer { border-top: 1px solid var(--line); font-size: 0.875rem; color: var(--muted); }
.site-footer .wrap { max-width: 72rem; padding-block: 3rem 2rem; display: grid; gap: 2.5rem; }
.footer-main { display: grid; grid-template-columns: minmax(0, 1.2fr) repeat(3, minmax(0, 1fr)); gap: 2rem; }
.footer-about .brand { font-size: 1.1rem; }
.footer-about .brand svg { width: 24px; height: 24px; }
.footer-about p { margin: 0.75rem 0 0; max-width: 22rem; line-height: 1.6; }
.footer-col p { margin: 0 0 0.75rem; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.site-footer a { color: var(--fg); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-col a[aria-current="page"] { text-decoration: underline; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; align-items: center; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.footer-bottom a { color: var(--muted); }
.footer-bottom .footer-note { flex-basis: 100%; }
@media (max-width: 820px) { .footer-main { grid-template-columns: repeat(3, minmax(0, 1fr)); } .footer-about { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer-main { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
