/* お寺のあした（oteranoashita.com）の全ページに共通の上の案内・テーマの案内・ページの下（2026-11-22〜）。
   site.css と otera-theme.css のあとに読む。色は otera-theme.css の変数だけ（紺1色・Web フォントなし）。
   作り：scripts/お寺のブログを作る.mjs の siteHeadHtml / themeBarHtml / siteFootHtml（手書きのページにも同じものを流し込む）。
   提案：docs/お寺のあした-デザインの提案-2026-11-22/提案.md §3（2026-11-22 和田さん「案Aで作る」）。
   字の大きさ：本文 16px・いちばん小さい字 14px（.875rem）。クラス名は os- で始める（各ページの .brand などとぶつけない）。 */
body { background: var(--bg); }
.os-in { max-width: 1040px; margin: 0 auto; padding-inline: 24px; }

/* ── 上の案内 ── */
.os-head { background: var(--card); border-bottom: 1px solid var(--line); }
.os-head .os-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 28px; padding-block: 14px; }
.os-brand { display: flex; align-items: center; gap: 12px; color: var(--fg); text-decoration: none; }
.os-mark { flex: none; width: 44px; height: 44px; border-radius: 10px; background: var(--accent); color: #fff; display: grid; place-items: center; }
.os-name { font-family: var(--mincho); font-weight: 600; font-size: 1.5rem; line-height: 1.2; letter-spacing: .04em; }
.os-sub { display: block; font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif;
  font-size: .875rem; color: var(--muted); letter-spacing: 0; font-weight: 400; margin-top: 3px; }
.os-nav { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.os-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; font-weight: 700; text-decoration: none; color: var(--fg); border-radius: 10px; }
.os-nav a:hover { background: var(--sunk); }
.os-nav a[aria-current] { color: var(--accent); box-shadow: inset 0 -3px 0 var(--accent); border-radius: 0; }
.os-nav a.os-hp { background: var(--accent); color: #fff; }
.os-nav a.os-hp[aria-current] { box-shadow: none; border-radius: 10px; }

/* ── テーマの案内（その場の案内・NN/g Local Navigation） ── */
.os-themes { background: var(--bg); border-bottom: 1px solid var(--line); }
.os-themes ul { list-style: none; margin: 0 auto; padding: 8px 24px; max-width: 1040px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.os-themes a { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; min-height: 44px;
  text-decoration: none; color: var(--fg); font-weight: 700; font-size: .9375rem; line-height: 1.4; text-align: center; border-radius: 10px; }
.os-themes a:hover { background: var(--card); }
.os-themes a[aria-current] { background: var(--card); box-shadow: inset 0 0 0 2px var(--accent); }
.os-themes svg { color: var(--accent); }

/* ── ページの下（サイトの地図） ── */
footer.os-foot { margin: 0; padding: 48px 0 36px; background: var(--sunk); color: var(--fg); border-top: 1px solid var(--line); font-size: 1rem; }
.os-foot a { color: var(--accent); }
.os-foot-grid { display: grid; grid-template-columns: 1.3fr 1fr .8fr 1fr 1fr; gap: 28px; }
.os-foot-h { font-weight: 700; margin: 0 0 10px; }
.os-foot ul { list-style: none; margin: 0; padding: 0; }
.os-foot li { margin: 0 0 8px; font-size: .9375rem; line-height: 1.6; }
.os-foot p { margin: 0 0 8px; font-size: .9375rem; }
.os-foot .os-foot-name { font-family: var(--mincho); font-size: 1.5rem; font-weight: 600; line-height: 1.4; }
.os-foot .os-disc { margin: 28px 0 0; font-size: .875rem; color: var(--muted); }
.os-foot .os-disc + .os-copy { margin-top: 12px; }
.os-foot .os-copy { margin: 28px 0 0; font-size: .875rem; color: var(--muted); }

/* ── 記事・テーマのページで使う、テーマのアイコンつきの小さな名前 ── */
.os-topic { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; text-decoration: none; color: var(--accent); margin: 0 0 10px; }
.os-topic svg { flex: none; }

@media (max-width: 760px) {
  .os-in { padding-inline: 16px; }
  .os-head .os-in { padding-block: 12px; }
  .os-name { font-size: 1.35rem; }
  .os-sub { display: none; }
  /* スマホは2つずつ同じ大きさで並べ、5つ目（住職の紹介）だけ1行を全部使う（提案 §3・W6：折り返しの位置がばらばらだった。2026-11-29 に並びを替えた）。 */
  .os-nav { display: grid; grid-template-columns: 1fr 1fr; width: 100%; gap: 6px; }
  .os-nav a { justify-content: center; border: 1px solid var(--line); background: var(--bg); border-radius: 10px; }
  .os-nav a[aria-current] { box-shadow: inset 0 0 0 2px var(--accent); border-radius: 10px; }
  .os-nav a.os-hp { border-color: var(--accent); }
  .os-nav a:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .os-themes ul { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 8px 12px; }
  .os-themes a { font-size: .875rem; }
  /* 記事のページのスマホだけは、本文を先に見せる（同じ案内は記事の最後の「ほかのテーマ」にある）。 */
  .os-article-page .os-themes { display: none; }
  .os-foot-grid { grid-template-columns: 1fr 1fr; }
  .os-foot-grid > div:first-child { grid-column: 1 / -1; }
}
