/* 全ページ共通の上部メニュー（site/tools/site_header.py が書く .sh）。トップ（top.css）と他のページ（style.css）の
   どちらでも同じ見た目になるよう、色・寸法はこのファイルの中だけで決める（2026-10-16） */
.sh {
  position: fixed; z-index: 40; inset: 0 0 auto; box-sizing: border-box;
  display: flex; align-items: center; justify-content: space-between;
  height: 76px; padding: 0 clamp(16px, 4.5vw, 64px);
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  background: linear-gradient(180deg, rgba(5, 12, 18, .94), rgba(5, 12, 18, .72));
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  font-family: "Noto Sans JP", sans-serif;
}
.sh-logo { display: grid; line-height: 1.25; color: #dfe2dc; text-decoration: none; }
.sh-reading { color: #d9b873; font: 400 .6rem ui-serif, "New York", "Source Serif 4", serif; letter-spacing: .48em; }
.sh-name { font: 700 1.1rem "Noto Serif JP", serif; letter-spacing: .14em; }
.sh-nav { display: flex; align-items: center; gap: clamp(1rem, 2.6vw, 2.6rem); }
.sh-nav a { position: relative; color: #cdd3d0; text-decoration: none; font-size: .84rem; letter-spacing: .12em; white-space: nowrap; }
.sh-nav a:not(.sh-cta)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: #d9b873; transform: scaleX(0); transition: transform .3s ease; }
.sh-nav a:not(.sh-cta):hover::after, .sh-nav a[aria-current="page"]::after { transform: scaleX(1); }
.sh-nav a:hover, .sh-nav a[aria-current="page"] { color: #f0d99f; }
.sh-cta { padding: .62rem 1rem; border: 1px solid rgba(217, 184, 115, .32); color: #f0d99f !important; transition: background .25s ease; }
.sh-cta:hover { background: rgba(217, 184, 115, .1); }
.sh-toggle { display: none; }

/* 小画面：右上のボタンへ畳む（header.js が動くときだけ。動かない環境では横並びのまま） */
@media (max-width: 860px) {
  .sh { height: 66px; }
  .sh-ready .sh-toggle {
    display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0;
    border: 1px solid rgba(217, 184, 115, .32); background: transparent; color: #f0d99f; cursor: pointer;
  }
  .sh-toggle span { position: relative; display: block; width: 18px; height: 13px; }
  .sh-toggle i { position: absolute; left: 0; width: 100%; height: 1px; background: currentColor; transition: transform .2s ease, opacity .2s ease; }
  .sh-toggle i:nth-child(1) { top: 0; }
  .sh-toggle i:nth-child(2) { top: 6px; }
  .sh-toggle i:nth-child(3) { top: 12px; }
  .sh.is-open .sh-toggle i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .sh.is-open .sh-toggle i:nth-child(2) { opacity: 0; }
  .sh.is-open .sh-toggle i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .sh-ready .sh-nav {
    position: fixed; inset: 66px 0 auto; display: grid; gap: 0; padding: .4rem 16px 1.4rem;
    border-bottom: 1px solid rgba(217, 184, 115, .24); background: #071019;
    opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .25s ease, transform .25s ease, visibility .25s;
  }
  .sh-ready .sh.is-open .sh-nav { opacity: 1; visibility: visible; transform: none; }
  .sh-ready .sh-nav a { display: flex; align-items: center; justify-content: space-between; min-height: 56px; padding: 0 16px; border-bottom: 1px solid rgba(217, 184, 115, .2); color: #dfe2dc; font-size: 1rem; }
  .sh-ready .sh-nav a::after { content: "→"; position: static; height: auto; background: none; color: #d9b873; transform: none; }
  .sh-ready .sh-nav .sh-cta { justify-content: center; margin-top: 1rem; border: 1px solid rgba(217, 184, 115, .32); }
  .sh-ready .sh-nav .sh-cta::after { content: none; }
  /* 狭い画面で JS が動かないときは、ロゴとApp Storeだけ出す */
  html:not(.sh-ready) .sh-nav a:not(.sh-cta) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .sh-nav a::after, .sh-ready .sh-nav, .sh-toggle i { transition: none; }
}

/* 全ページ共通のフッター（site/tools/site_header.py が書く .sf）。トップの旧フッターの見た目を引き継ぐ。
   style.css の footer 要素の指定（3列の格子など）に負けないよう、.sf で始まる指定で決める */
footer.sf {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.4rem 3rem;
  margin: 0; padding: 2.6rem clamp(16px, 4.5vw, 64px); border-top: 1px solid rgba(217, 184, 115, .16);
  background: #071019; color: #9aa8aa; font-family: "Noto Sans JP", sans-serif; text-align: left;
}
.sf-logo { display: grid; color: #dfe2dc; font: 600 1.05rem "Noto Serif JP", serif; letter-spacing: .16em; line-height: 1.3; }
.sf-logo span { color: #d9b873; font: 400 .56rem ui-serif, "New York", "Source Serif 4", serif; letter-spacing: .5em; }
.sf-logo small { color: #dfe2dc; opacity: .7; font: 400 .72rem "Noto Sans JP", sans-serif; letter-spacing: .12em; }
.sf-links { display: flex; flex-wrap: wrap; gap: .6rem 1.8rem; font-size: .82rem; }
.sf-links a { color: #cdd3d0; text-decoration: none; }
.sf-links a:hover { color: #f0d99f; }
.sf-copy { font-size: .7rem; }
@media (max-width: 860px) {
  footer.sf { flex-direction: column; align-items: flex-start; gap: 1.2rem; padding: 2.2rem 16px 2.6rem; }
  .sf-links { gap: .7rem 1.4rem; }
}
