body {
        --doshisha_color: var(--color-brand);
        --rekikan_theme: var(--color-theme);
    }

    #head {
        --header-top-height: 112px;
        position: -webkit-sticky;
        position: sticky;
        top: 0;
        z-index: 1000;
        background: #fff;

        /* ヘッダーは body の子として差し込まれるため、そのままだと
           ページごとに異なる body の margin / padding の内側に収まって
           しまい、幅や左位置がページごとにばらつく（実測でヘッダー幅が
           1200px〜1280px、左位置が0px〜40pxとページ差があった）。
           header.js が実測した body の内側の左位置と表示領域の幅を
           カスタムプロパティで渡してくるので、それを使って body の
           余白の外側まで広げ、常に画面幅いっぱいに揃える。
           JS が動かなかった場合に備えて 100% を初期値にしてある。
           幅に 100vw を使わないのは、100vw が縦スクロールバーの幅を
           含むため横スクロールが発生してしまうため。 */
        width: var(--head-viewport-width, 100%);
        margin-left: calc(-1 * var(--head-offset-left, 0px));

        /* ページ側の body に font-size や line-height の指定があると、
           ヘッダーの文字までそれを継承してしまい高さが変わる。
           （例：remains/index.html は body に font-size:1.1rem があり
             ナビが2px高くなっていた。多くの記事ページは line-height:16px
             を持っており、ナビの高さが54px→46pxになっていた）
           継承は CSS の優先順位では解決できないので、ヘッダー側で明示して
           断ち切り、全ページで同じ大きさに揃える。 */
        font-size: 16px;
        line-height: normal;

        /* かつてここに overflow-x: clip を置き、画面右外へ退避した
           .nav-menu のはみ出しを切っていたが、.nav-menu を position:
           fixed に変えたため不要になった。fixed 要素はスクロール可能
           領域を広げず、祖先の overflow でも切られない。
           (iOS の WebKit は片側軸だけ clip を掛けたとき縦方向にも
             クリップが及ぶことがあり、開いたメニューが #head の下端で
             切られて表示されない不具合があった) */
    }

    #head .navi {
        background: var(--rekikan_theme);
    }



    /* .navi ul:after {
        content: "";
        clear: both;
        display: block;
    } */

    /* 横レイアウトにする（8項目で100%に収める） */
    #head .navi ul li {
        width: 12.5%;
        float: left;
        text-align: center;
        list-style: none;
        font-size: 100%;
    }

    /* .navi ul li:first-child {
        border-left: none;
    } */

    #head .navi ul li a {
        text-decoration: none;
        display: block;
        padding: 1px 0;
        display: block;
        padding: 15px 0;
        color: #fff;
        background: var(--rekikan_theme);
        border-right: 1px solid #fff;
        text-decoration: none;
    }

    #head .navi ul li a:hover,
    #head .navi ul li a:focus-visible,
    #head .navi ul li a[aria-current="page"] {
        color: #fff;
        filter: hue-rotate(-30deg);
    }

    /* ページ側に残っている旧ナビゲーション用のCSSからヘッダーを守る。

       旧ナビは共通ヘッダーと同じセレクタ（#globalnavi / #pageHead /
       #Header / .navi）を使っており、その指定が各ページのCSSファイルに
       今も残っている（それぞれ約200ファイル）。しかもページごとに内容が
       食い違っているため、共通ヘッダーの見た目がページごとにばらついて
       いた（実測でヘッダー高さ127px〜165px）。
       それらは #globalnavi のようにID1つ分の詳細度なので、#head を頭に
       付けてID2つ分にし、確実に打ち勝つようにする。

       本来はページ側の旧CSSを消すのが筋だが、対象が約200ファイルに
       およぶためCSS整理（フェーズ6）の課題とし、ここでは防御しておく。 */
    #head #globalnavi li a {
        font-size: 16px;
        line-height: normal;
        padding: 15px 0;
    }

    #head #Header {
        margin: 0;
    }


    @keyframes fadeIn {
            from {
                opacity: 0;
            }

            to {
                opacity: 1;
            }
        }

    #head .hamburger-menu {
        width: 30px;
        height: 22px;
        padding: 0;
        border: 0;
        background: transparent;
        appearance: none;
        position: absolute;
        top: 50%;
        right: 20px;
        margin: 0;
        transform: translateY(-50%);
        cursor: pointer;
        user-select: none;
        z-index: 1000;
    }

    #head .hamburger-menu:focus-visible {
        outline: 2px solid var(--color-brand);
        outline-offset: 4px;
    }

    /* 見た目は30×22pxのまま、擬似要素でタップ領域を44px級に広げる。
       .line は幅100%の絶対配置なので、padding で拡げると線まで伸びて
       しまうため、ボタンの一部として扱われる ::after で外側に拡張する。 */
    #head .hamburger-menu::after {
        content: "";
        position: absolute;
        top: -11px;
        right: -10px;
        bottom: -11px;
        left: -10px;
    }

    #head .line {
        display: block;
        background-color: #1a1a1a;
        height: 4px;
        width: 100%;
        position: absolute;
        transition: all 0.3s;
    }

    #head .line:nth-of-type(1) {
        top: 0;
    }

    #head .line:nth-of-type(2) {
        top: 50%;
        transform: translateY(-50%);
    }

    #head .line:nth-of-type(3) {
        bottom: 0;
    }

    #head .hamburger-menu.active>.line:nth-of-type(1) {
        top: 50%;
        transform: translateY(-50%) rotate(45deg);
    }

    #head .hamburger-menu.active>.line:nth-of-type(2) {
        opacity: 0;
    }

    #head .hamburger-menu.active>.line:nth-of-type(3) {
        top: 50%;
        transform: translateY(-50%) rotate(-45deg);
    }

    /* position:fixed にするのは、absolute だと祖先 #head の overflow
       指定の影響を受け、iOS の WebKit でパネルがクリップされて表示
       されない不具合があったため。fixed 要素は overflow では切られず、
       閉じたときの transform のはみ出しが横スクロールも生まない。
       top/bottom 指定にして高さは content-box 任せにすることで、
       iOS で不安定な 100vh/100dvh の計算にも依存しない。
       デザインは docs/naito/design-ref-mobile-menu.html(案Cモノトーン) */
    #head .nav-menu {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(300px, 84vw);
        padding-right: env(safe-area-inset-right);
        display: flex;
        flex-direction: column;
        background: #fff;
        box-shadow: -8px 0 24px rgba(0, 0, 0, .18);
        transform: translateX(100%);
        /* visibility を含めることで、閉じるときはスライドアウトが
           終わってから hidden になる（visibility は遷移中ずっと
           visible として扱われる）。対応しない古いブラウザでは
           従来どおり即時に消えるだけで実害はない。 */
        transition: transform .3s ease, visibility .3s ease;
        z-index: 920;
        visibility: hidden;
    }

    #head .nav-menu__head {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 88px;
        padding: 0 8px 0 20px;
        border-bottom: 1px solid var(--color-border);
    }

    #head .nav-menu__title {
        font-size: .8125rem;
        font-weight: 600;
        color: var(--color-muted);
        letter-spacing: .05em;
    }

    #head .nav-menu__list {
        flex: 1 1 auto;
        margin: 0;
        padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
        list-style: none;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    /* メニュー項目は行全体をタップ領域にし、罫線区切り+シェブロンの
       モバイルアプリ風リストにする */
    #head .nav-menu__list a {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 14px 20px;
        font-size: .9375rem;
        color: #222;
        text-decoration: none;
        border-bottom: 1px solid var(--color-border);
        -webkit-tap-highlight-color: transparent;
    }

    #head .nav-menu__list a:active {
        background: #f5f5f5;
    }

    #head .nav-menu__list a[aria-current="page"] {
        font-weight: 600;
        background: #f5f5f5;
        box-shadow: inset 3px 0 0 var(--color-text);
    }

    #head .nav-menu__ext {
        font-size: .75rem;
        color: var(--color-muted);
    }

    #head .nav-menu__list a::after {
        content: "";
        margin-left: auto;
        width: 8px;
        height: 8px;
        flex: 0 0 auto;
        border-top: 2px solid #cccccc;
        border-right: 2px solid #cccccc;
        transform: rotate(45deg);
    }

    /* メニュー展開中は背面の本文スクロールを止める */
    body.menu-open {
        overflow: hidden;
    }

    @media (prefers-reduced-motion: reduce) {
        #head *,
        #head *::before,
        #head *::after {
            scroll-behavior: auto !important;
            animation-duration: 0.01ms !important;
            transition-duration: 0.01ms !important;
        }
    }

    /* 表示状態：右からスライドイン */
    #head .nav-menu.active {
        transform: none;
        visibility: visible;
    }

     /* --- 旧ページ内レイアウトの共通スタイル --- */
    .flex-container {
        position: sticky;
        top: 0;
        padding-top: 30px;
        display: flex;
        width: 100%;
    }

    .left {
        width: 50%;
        padding: 0;
        box-sizing: border-box;
    }

    .right {
        width: 50%;
        box-sizing: border-box;
    }

    /* --- 共通ヘッダーの上段 --- */
    #head .site-header__top {
        position: relative;
        display: flex;
        align-items: flex-end;
        box-sizing: border-box;
        width: 100%;
        height: var(--header-top-height);
        padding: 0 20px 28px;
    }

    #head .site-header__brand {
        flex: 1 1 auto;
        min-width: 0;
        box-sizing: border-box;
    }

    #head .site-header__menu {
        flex: 0 0 30px;
        box-sizing: border-box;
    }

    #head #Header,
    #head #Header a {
        display: block;
    }

    #head #Header img {
        display: block;
        width: min(180px, 100%);
        height: auto;
    }
    /* 　追加内容　*/
    .bannerContainer {
        display: flex;
        align-items: center;
        flex-direction: row;
    }

    .bannerContainer div {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin: 5em;

    }

    /* --- Facebookバナー：ヘッダー上段右端（ハンバーガー手前） ---
       ハンバーガーと同じ top:50%+translateY(-50%) の絶対配置にして
       上下中央を一致させる（right はアイコン右端20px+幅30px+余白） */
    #head .bannerContainer {
        position: absolute;
        top: 50%;
        right: 68px;
        transform: translateY(-50%);
    }

    /* 上の #head なしルールの margin:5em を打ち消す */
    #head .bannerContainer div {
        margin: 0;
        display: block;
    }

    #head .bannerContainer img {
        display: block;
        height: 40px;
        width: auto;
        border-radius: 8px;
    }

    #head .bannerContainer a:hover img {
        opacity: .8;
    }

    @media screen and (max-width: 768px) {
        #head .bannerContainer img {
            height: 32px;
        }
    }
    .news-list-detail-text img {
        width: 200px !important;
        height: auto !important;
        display: block;
        margin-left: auto;
        margin-right: auto;
    }
    #head .navi {
        color: #fff;
    }
    #head #globalnavi {
        margin: 0;
        padding: 0;
        list-style: none;
        display: flex; /* 横並びを維持 */
    }

    @media screen and (max-width: 768px) {
        /* 1. 横スクロールを有効にする */
        #head .navi {
            /* 公開環境へスマホ向け非表示設定を再反映するための更新トリガー */
            display: none !important;
            width: 100%;
            overflow-x: auto;
            -webkit-overflow-scrolling: touch; /* スマホでのスクロールを滑らかにする */
        }

        /* 2. Flexboxで横並びを維持し、はみ出させる */
        #head #globalnavi {
            display: flex;
            flex-wrap: nowrap; /* 絶対に折り返さない設定 */
            width: max-content; /* 中身のサイズに合わせてコンテナを広げる */
        }

        /* 3. PC時の指定（幅14%やfloat）を解除し、スマホ用に調整 */
        #head .navi ul li {
            width: auto;
            float: none;
            flex: 0 0 auto; /* 画面幅に合わせて勝手に縮まないようにする */
        }

        /* 4. タップしやすいようにボタンのサイズ・文字を調整 */
        #head .navi ul li a {
            padding: 12px 15px; /* 上下左右の余白（指で押しやすい広さに） */
            font-size: 14px; /* 文字サイズを少し小さく */
            white-space: nowrap; /* 「データベース検索」などの文字が途中で改行されるのを防ぐ */
        }
    }

    /* ============================================================
       d5リスキンのヘッダー層（トップページ index.html と同じ見た目）
       index.html のページ内 <style> にあった #head #pageHead 起点の
       上書きルールをここへ移植し、全ページで共有する。
       詳細度はID2〜3個なので、上の素のルールや各ページに残る
       旧ナビ用CSSより必ず後勝ちになる。
       カスタムプロパティは #head スコープで定義し、ページ本文には
       漏らさない。 */
    #head {
        --col: min(calc(100% - 2rem), 1100px);
        --radius: 8px;
        --ease: cubic-bezier(.2,.8,.2,1);
        --gap-s: 8px;
        --gap-m: 16px;
        --gap-l: 24px;
        --surface: var(--color-surface);
        --theme-hover: var(--color-brand);
        --rekikan_theme: var(--color-theme);

        /* stickyヘッダー：下端ヘアラインのみ。
           backdrop-filter は fixed 配置子孫の包含ブロックを自身に
           してしまい .nav-menu/.nav-backdrop が潰れるため使わない */
        background: rgba(255,255,255,.96);
        border-bottom: 1px solid rgba(0,0,0,.06);
    }

    /* --- Facebookバナー：ヘッダー上段・右端（ハンバーガー手前）--- */
    #head #pageHead .bannerContainer { position: absolute; top: 50%; right: 52px; transform: translateY(-50%); display: flex; align-items: center; }
    #head #pageHead .bannerContainer div { margin: 0; display: block; }
    #head #pageHead .bannerContainer img { display: block; height: 40px; width: auto; border-radius: var(--radius); }
    #head #pageHead .bannerContainer a:hover img { opacity: .8; }

    /* --- ヘッダー内側を本文カラムと左右端で揃える --- */
    #head #pageHead .site-header__top {
        width: var(--col);
        margin-inline: auto;
        height: auto;
        padding: var(--gap-m) 0;
        /* ナビ文字とロゴ文字の下端を揃えるため下端揃えに */
        align-items: flex-end;
    }
    #head #pageHead .hamburger-menu { right: 0; }
    /* ドロワー見出し高さをヘッダー上段に合わせる */
    #head #pageHead .nav-menu__head { min-height: 92px; }
    /* ホバー時の hue-rotate をやめ、金茶を一段濃くするだけに。
       現行項目(aria-current)も同じ濃い金茶で統一する */
    #head #pageHead .navi ul li a:hover,
    #head #pageHead .navi ul li a:focus-visible,
    #head #pageHead .navi ul li a[aria-current="page"] {
        filter: none;
        background: var(--theme-hover);
        color: #fff;
    }
    #head #pageHead .line { border-radius: 2px; }
    /* ドロワーは画面右端に張り付け、黄土色の帯が右端から続く見た目に。
       メニュー項目の右端はサイト右マージン(=本文カラム右端)に揃える。
       パネル幅は「項目領域340px + サイト右マージン」とし、
       マージン分で項目が削られないようにする */
    #head #pageHead .nav-menu {
        right: 0;
        width: min(calc(340px + (100% - var(--col)) / 2), 90vw);
        box-sizing: border-box;
        padding-right: calc((100% - var(--col)) / 2 + env(safe-area-inset-right));
        border-radius: var(--radius) 0 0 var(--radius);
        overflow: hidden;
        background: var(--rekikan_theme);
    }
    /* 黄土色背景に合わせ、文字・罫線・シェブロンは白系に。
       ホバーと現行項目はナビ帯と同じ濃い金茶(--theme-hover)で統一 */
    #head #pageHead .nav-menu__head { border-bottom-color: rgba(255,255,255,.35); }
    #head #pageHead .nav-menu__title { color: rgba(255,255,255,.85); }
    #head #pageHead .nav-menu__list a {
        color: #fff;
        border-bottom-color: rgba(255,255,255,.25);
    }
    #head #pageHead .nav-menu__list a::after { border-color: rgba(255,255,255,.65); }
    #head #pageHead .nav-menu__list a:hover,
    #head #pageHead .nav-menu__list a:active { background: var(--theme-hover); }
    #head #pageHead .nav-menu__list a[aria-current="page"] {
        color: #fff;
        background: var(--theme-hover);
        box-shadow: inset 3px 0 0 #fff;
    }
    #head #pageHead .nav-menu__ext { color: rgba(255,255,255,.8); }

    /* --- グローバルナビ：ヘッダー下段の帯として配置 ---
       上段: ロゴ（左）・バナー（右）・ハンバーガー（右端absolute）、
       下段: 本文カラムと同幅のナビ帯、の2行構成 */
    /* ロゴ画像は下端をクリップ済みのため、flex-end揃えでは画像
       ボックス下端が基準になる。その分だけ負マージンで下げ、
       ロゴの文字下端をナビ文字下端に揃える */
    #head #pageHead .site-header__brand { flex: 0 1 auto; width: 180px; margin-bottom: -5px; }
    /* ロゴ画像：文字部分だけ残すため外周の余白をクリップ */
    #head #pageHead #Header a { display: inline-block; clip-path: inset(3% 1% 8% 1%); }
    #head #pageHead #Header img { clip-path: inset(3% 1% 8% 1%); }
    /* ナビ帯は本文カラムと同幅。項目は帯いっぱいに等分配列 */
    #head #pageHead .navi { width: var(--col); margin-inline: auto; background: var(--rekikan_theme); border-radius: var(--radius); overflow: hidden; }
    /* バナーとハンバーガーアイコンの間に余白を確保 */
    #head #pageHead .site-header__menu { margin-left: var(--gap-l); }
    #head #pageHead .navi ul li { float: none; width: auto; flex: 1 1 0; display: flex; align-items: center; justify-content: center; position: relative; }
    /* 帯上は白の区切り線 */
    #head #pageHead .navi ul li + li::before {
        content: "";
        width: 1px;
        height: .9em;
        background: rgba(255,255,255,.5);
        position: absolute;
        left: 0;
        top: 50%;
        transform: translate(-50%, -50%);
    }
    #head #pageHead #globalnavi {
        align-items: center;
        justify-content: flex-start;
        flex-wrap: nowrap;
        padding: 0 4px;
    }
    #head #pageHead #globalnavi li a {
        flex: 1 1 auto;
        align-self: stretch;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 10px 8px;
        font-size: .8125rem;
        line-height: normal;
        font-weight: 500;
        letter-spacing: .03em;
        color: #fff;
        background: transparent;
        border-right: none;
        white-space: nowrap;
        transition: color .15s var(--ease), background-color .15s var(--ease);
    }
    #head #pageHead #globalnavi li a:hover,
    #head #pageHead #globalnavi li a:focus-visible,
    #head #pageHead #globalnavi li a[aria-current="page"] {
        filter: none;
        background: var(--theme-hover);
        color: #fff;
        box-shadow: none;
    }

    /* モバイルではナビ帯を畳み、ハンバーガー内メニューに集約 */
    @media (max-width: 940px) {
        #head #pageHead .navi { display: none; }
    }

    @media (max-width: 768px) {
        #head #pageHead .site-header__top { padding: var(--gap-s) 0; }
        #head #pageHead .nav-menu__head { min-height: 76px; }
        /* モバイルでもバナーは表示。ロゴより一回り小さくして収める */
        #head #pageHead .bannerContainer img { height: 32px; }
    }

    /* --- 全ページ共通のフッター（header.js 内の FOOTER_HTML と対応） --- */
    footer.site-footer {
        margin-top: 24px;
        border-top: 1px solid var(--color-border);
        border-bottom: 4px solid var(--color-brand);
        color: var(--color-muted);
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
        font-size: 0.875rem;
        line-height: 1.8;
    }

    footer.site-footer .site-footer__inner {
        width: min(calc(100% - 2rem), 1100px);
        margin-inline: auto;
        padding: 1rem 0;
        /* 最終更新日（左）とコピーライト（右）を同一行に */
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        gap: 16px;
        flex-wrap: wrap;
    }

    footer.site-footer p {
        margin: 0;
    }

    footer.site-footer .site-footer__name {
        font-weight: 600;
    }

    /* 最終更新：コピーライトと同じ行・同じ字サイズに */
    footer.site-footer .pagetop { width: auto; margin: 0; }
    footer.site-footer .last-updated { color: var(--color-theme); font-size: .875rem; }

    footer.site-footer .site-footer__right {
        display: flex;
        align-items: baseline;
        gap: 16px;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    footer.site-footer .site-footer__copyright {
        text-align: right;
    }

    /* --- フッターメニュー --- */
    .footer-nav { margin-top: 24px; }
    .footer-nav ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        margin: 0;
        padding: 0;
        list-style: none;
    }
    .footer-nav li { display: flex; align-items: center; }
    .footer-nav li + li::before {
        content: "";
        width: 1px;
        height: .9em;
        background: #cccccc;
        margin: 0 12px;
    }
    .footer-nav a {
        color: var(--color-theme);
        font-size: .8125rem;
        text-decoration: none;
        padding: 6px 0;
    }

    @media screen and (max-width: 768px) {
        footer.site-footer .site-footer__copyright {
            text-align: left;
        }
        .footer-nav li + li::before { margin: 0 8px; }
        .footer-nav a { padding: 6px 10px; }
    }

    /* --- 全ページ共通のパンくずリスト ---
       header.js が #head の直後に生成する。#head は sticky のため
       外側に置き、本文と一緒にスクロールアウトさせる。
       幅はヘッダーの --col と同じ計算（#head の外なので変数は使えず
       値を直書きする）。ページ側の li/a 指定から守るため margin・
       padding も明示する。 */
    .site-breadcrumb {
        /* body がビューポートより広い旧ページでも左右マージンが
           守られるよう、#head と同じく JS 計測の実ビューポート幅
           (--head-viewport-width) と body の左オフセット
           (--head-offset-left) を使って位置を決める。
           未対応ブラウザ用に margin-inline: auto を先に置く */
        width: min(calc(var(--head-viewport-width, 100%) - 2rem), 1100px);
        margin-inline: auto;
        margin-left: calc(max((var(--head-viewport-width, 100%) - 1100px) / 2, 1rem) - var(--head-offset-left, 0px));
        padding: 8px 0;
        box-sizing: border-box;
        font-size: .8125rem;
        line-height: 1.6;
        color: var(--color-theme);
    }
    .site-breadcrumb ol {
        display: flex;
        flex-wrap: wrap;
        gap: 0 .5em;
        margin: 0;
        padding: 0;
        list-style: none;
    }
    .site-breadcrumb li {
        margin: 0;
        padding: 0;
    }
    .site-breadcrumb li + li::before {
        content: "＞";
        margin-right: .5em;
        color: #cccccc;
    }
    .site-breadcrumb a {
        color: var(--color-brand);
    }
    .site-breadcrumb [aria-current="page"] {
        color: #1a1a1a;
    }
