/* 全体のリセット */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
ul {
  list-style: none;
}

html {
  /* 固定ヘッダーの高さ分を指定（例：ヘッダーが80pxなら80px〜100pxくらい） */
  scroll-padding-top: 80px; 
}

body {
  font-family: "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #333;
}

/* 全ページ共通のメインコンテンツ幅制御 */
main {
  max-width: 1200px;   /* 最大幅を設定 */
  margin: 0 auto;      /* 中央寄せ */
  padding: 20px;       /* 左右に余白 */
}
main h1 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  font-weight: bold;
  color: #333; /* 本文色に合わせて落ち着いた印象 */
}
.library main h1 {
  border-bottom: 3px solid #b22222; /* 図書館テーマカラーで下線 */
}
.system main h1 {
  border-bottom: 3px solid #555; /* 情報・システムテーマカラーで下線 */
}
.facility main h1 {
  border-bottom: 3px solid #004080; /* 施設・機器利用テーマカラーで下線 */
}

/* ヘッダー */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  color: #1e1e1e;
  position: fixed;   /* 固定表示 */
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;     /* コンテンツより前面に */
}

/* ヘッダー高さ分の余白を本文に追加 */
body {
  font-family: "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  padding-top: 70px; /* ヘッダーの高さに合わせて調整 */
}

header .logo {
  font-size: 1.2rem;
  font-weight: bold;
  color: #353535;
}

/* ナビゲーション（PC） */
.nav-menu ul {
  display: flex;
  list-style: none;
}

.nav-menu li {
  margin-left: 20px;
}

.nav-menu a {
  position: relative;
  display: inline-block;
  padding: 10px;
  color: #1e1e1e;
  text-decoration: none;
}

/* 下線アニメーション */
.nav-menu a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: #1e1e1e;
  transition: width 0.3s ease;
}
.nav-menu a:hover::after {
  width: 100%;
}

/* フッター */
footer {
  background-color: #E9F2F9;
  color: #333;
  text-align: center;
  padding: 40px 20px;
  font-size: 0.9rem;
  line-height: 1.8;
}

.university-name {
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.footer-credits {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #ddd; /* 区切り線 */
  font-size: 0.85rem;
  color: #333;
}

.designer-info {
  margin-bottom: 8px;
}

.designer-info .name {
  font-weight: bold;
  color: #333;
}

.no-break {
  display: inline-block; /* 塊として扱う */
  white-space: nowrap;  /* 塊の中では改行させない */
}

.affiliation {
  font-size: 0.8rem; /* 所属は少し小さくしてバランスを取る */
  color: #333;
}
.sp-only {
  display: none;
}

/* スマホ表示（768px以下など）で表示 */
@media (max-width: 768px) {
  .sp-only {
    display: block; /* スマホでは "Icon Design by" の後で必ず改行 */
  }
  .affiliation {
    display: block; /* スマホでは所属をさらに次の行へ送る */
    margin-top: 2px;
  }
}
/* アコーディオンのスタイル */
.circle-details {
  display: inline-block;
  text-align: left;
  max-width: 600px;
  margin: 0 auto;
}

.circle-details summary {
  cursor: pointer;
  color: #333;
  text-decoration: underline;
  list-style: none; /* デフォルトの矢印を消す（ブラウザによる） */
}

.circle-details summary::-webkit-details-marker {
  display: none; /* Safari用 */
}

.circle-details summary:hover {
  color: #000;
}

/* 開いた時の中身 */
.circle-content {
  margin-top: 10px;
  padding: 15px;
  background-color: #f9f9f9;
  border-radius: 5px;
  line-height: 1.6;
  color: #444;
}

.circle-link {
  display: inline-block;
  margin-top: 10px;
  font-weight: bold;
  color: #004080;
  text-decoration: none;
}

/* 連絡先エリア全体の調整 */
.footer-contact {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin: 10px 0;
}

/* 各電話番号のグループ */
.contact-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.contact-label {
  background: #616161; /* 落ち着いたグレー */
  color: #fff;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 3px;
}

.contact-number {
  font-weight: 600;
  font-family: 'Verdana', sans-serif;
}

.separator {
  color: #ccc;
}

.footer-email {
  margin-top: 5px;
}

.copyright {
  margin-top: 20px;
  font-size: 0.8rem;
}

/* スマホ表示（768px以下） */
@media (max-width: 768px) {
  .footer-contact {
    flex-direction: column; /* 縦に並べる */
    gap: 10px;
  }
  .separator {
    display: none; /* スマホでは区切り線を消す */
  }
}

/* ページごとのテーマカラー */
body.main {
  background-color: #f0f8f5; /* 淡い緑系で全体を包む */
}
body.main header,
body.main footer {
  background: #8fd3aa; /* 緑系 */
}

body.library header,
body.library footer {
  background: #e48c8c; /* 赤系 */
}

body.system header,
body.system footer {
  background: #6c6c6c; /* グレー系 */
}

body.facility header,
body.facility footer {
  background: #7ab0e6; /* 青系 */
}

/* ハンバーガーボタン */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1000;
}
.hamburger span {
  display: block;
  height: 3px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* 開いたときのアニメーション */
.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* メインビジュアル */
.main-visual {
  color: #fff;
  text-align: center;
  padding: 120px 20px; /* 上下の高さを増やしてインパクトを出す */
  min-height: 350px;   /* 少しだけ低めに調整してもOK */
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.main-visual .inner {
  max-width: 1200px;
  margin: 0 auto;
}
.main-visual h1 {
  font-size: 2.5rem; /* 見出しを少し大きく */
  margin-bottom: 15px;
  text-shadow: 0 2px 5px rgba(0,0,0,0.6); /* 文字に影をつけてクッキリ */
}
.main-visual p {
  font-size: 1.2rem;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);

  max-width: 700px;  /* 文字が広がりすぎないように幅を固定 */
  margin: 0 auto;    /* Pタグ自体を中央に配置 */
  line-height: 1.8;  /* 行間を広めに取ると読みやすい */
  text-align: justify; /* 両端揃え（左右の端がビシッと揃って四角いシルエットになります） */
}

/* スマホ対応（文字サイズと高さを少し抑える） */
@media (max-width: 768px) {
  .main-visual {
    padding: 80px 20px;
    min-height: 250px;
  }
  .main-visual h1 {
    font-size: 1.8rem;
  }
  .main-visual p {
    font-size: 1rem;
  }
}

/* =========================================
   ページごとの背景画像 ＋ 半透明グラデーション
========================================= */
/* トップページ */
body.main .main-visual {
  background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.6)), 
              url("../../images/main-visual.png") no-repeat center center/cover;
}

/* 図書館ページ */
body.library .main-visual {
  background: linear-gradient(rgba(178, 34, 34, 0.3), rgba(0, 0, 0, 0.6)), /* 少し赤みがかったグラデーションにするのもオシャレです */
              url("../../images/library-visual.png") no-repeat center center/cover;
}

/* 情報・システムページ */
body.system .main-visual {
  background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.6)), 
              url("../../images/system-visual.png") no-repeat center center/cover;
}

/* 施設・機器利用ページ */
body.facility .main-visual {
  background: linear-gradient(rgba(0, 64, 128, 0.3), rgba(0, 0, 0, 0.6)), /* 少し青みがかったグラデーション */
              url("../../images/facility-visual.png") no-repeat center center/cover;
}

/* クイックアクセス */
.quick-access {
  padding: 60px 20px; /* 余白を少し広げてゆったりさせる */
  text-align: center;
}
.quick-access h2 {
  margin-bottom: 30px;
  color: #2e8b57;
  font-size: 1.8rem;
  letter-spacing: 0.05em; /* 文字の間隔を少し開けて上品に */
}
.cards {
  display: flex;
  justify-content: center;
  flex-wrap: wrap; /* 画面が狭い時に折り返す */
  gap: 30px; /* カード間の隙間を広げる */
}
.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 20px;
  background: #ffffff; /* 白背景に変更 */
  border-radius: 16px; /* 丸みを強くしてイマドキに */
  text-decoration: none;
  color: #333;
  font-weight: bold;
  width: 220px; /* サイズを大きく */
  box-shadow: 0 4px 15px rgba(0,0,0,0.05); /* ふんわりした影をつける */
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* アニメーションを滑らかに */
}
.card span {
  font-size: 1.1rem;
  margin-top: 5px;
}
.card .icon {
  width: 90px;
  height: 90px;
  margin-bottom: 15px;
  transition: transform 0.3s; /* アイコン単体も動かす準備 */
}

/* 個別 hover 色と浮き上がりアクション */
.card:hover {
  transform: translateY(-8px); /* ホバーで上に浮く */
  box-shadow: 0 12px 25px rgba(0,0,0,0.1); /* 影を濃く・広くする */
}
.card:hover .icon {
  transform: scale(1.1); /* ホバーでアイコンが少し大きくなる */
}
/* ホバー時の背景色を少し薄く上品に調整 */
.card.library:hover { background: #fff0f0; }
.card.system:hover { background: #f8f8f8; }
.card.facility:hover { background: #f0f6ff; }


/* お知らせ */
.news {
  padding: 40px 20px;
  background: #fafafa;
}
.news h2 {
  margin-bottom: 20px;
  text-align: center;
  font-size: 1.5rem;
  color: #2e8b57;
}
.news-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}
.news-card {
  display: block; /* aタグにしたのでblock化 */
  text-decoration: none; /* リンクの下線を消す */
  background: #fff;
  border-left: 5px solid #8fd3aa; /* 左側に緑のアクセントライン */
  border-radius: 4px; /* 丸みを抑えてシャープに */
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: all 0.2s;
  color: #333;
}
.news-card:hover {
  transform: translateX(5px); /* ホバーで「右」に少しズレる（読ませる誘導） */
  border-left-color: #2e8b57; /* アクセントカラーを濃く */
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
/* 日付とカテゴリを横並びにする箱 */
.news-meta {
  display: flex;
  align-items: center;
  gap: 10px;         /* 日付とカテゴリの隙間 */
  margin-bottom: 8px; /* 下のタイトルとの余白 */
}

/* time要素の修正（display:block と margin-bottom を削除） */
.news-card time {
  font-size: 0.85rem;
  color: #888;
  font-family: 'Verdana', sans-serif;
}

/* ニュースのタイトル */
.news-card h3 {
  font-size: 1.05rem;
  margin: 0;
  color: #333;
  line-height: 1.4;
}

/* ニュースの本文（もしあれば） */
.news-card p {
  font-size: 0.9rem;
  color: #555;
}

/* お知らせカテゴリラベル */
.news-category {
  font-size: 0.75rem;
  font-weight: bold;
  padding: 3px 8px;
  border-radius: 4px;
  color: #ffffff;
  line-height: 1.2;
}

/* カテゴリ別の色分け */
.cat-library {
  background-color: #b22222; /* 図書館 */
}
.cat-library::before {
  content: "図書館";
}
.cat-system {
  background-color: #555; /* 情報システム */
}
.cat-system::before {
  content: "情報・システム";
}
.cat-facility {
  background-color: #004080; /* 施設 */
}
.cat-facility::before {
  content: "学習環境・施設";
}

/* サイトマップ */
.sitemap {
  padding: 40px 20px;
  background: #fafafa;
}
.sitemap h2 {
  text-align: center;
  margin-bottom: 30px;
  font-size: 1.5rem;
  color: #2e8b57;
}
.sitemap-blocks {
  display: flex;
  justify-content: space-around;
  gap: 20px;
  align-items: flex-start;
}
.sitemap-block {
  flex: 1;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 20px;
}
.sitemap-block h3 {
  margin-bottom: 15px;
  color: #2e8b57;
  font-size: 1.2rem;
}
.sitemap-block ul {
  list-style: none;
  padding: 0;
}
.sitemap-block li {
  margin-bottom: 10px;
}
.sitemap-block a {
  text-decoration: none;
  color: #333;
}
.sitemap-block a:hover {
  text-decoration: underline;
  color: #2e8b57;
}

/* パンくずリスト */
.breadcrumb {
  font-size: 0.9rem;
  margin: 10px 20px 10px 0px;
}

.breadcrumb a {
  text-decoration: none;
}

.breadcrumb ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
}

.breadcrumb li {
  margin-right: 5px;
}

.breadcrumb li::after {
  content: ">";
  margin-left: 5px;
}

.breadcrumb li:last-child::after {
  content: "";
}
/* 現在位置を強調 */
.breadcrumb .current {
  font-weight: bold;
}
.library .breadcrumb .current {
  color: #b22222; /* 図書館テーマカラーに合わせる */
}
.system .breadcrumb .current {
  color: #555; /* 情報・システムテーマカラーに合わせる */
}
.facility .breadcrumb .current {
  color: #004080; /* 施設・機器利用テーマカラーに合わせる */
}

/* スマホ対応 */
@media (max-width: 768px) {
  .nav-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px;
    right: 0;
    width: 200px;
    padding: 10px;
  }

  /* ページごとの背景色を反映 */
  body.main .nav-menu { background: #2e8b57; }
  body.library .nav-menu { background: #b22222; }
  body.system .nav-menu { background: #555; }
  body.facility .nav-menu { background: #004080; }

  .nav-menu.active {
    display: flex;
  }

  .nav-menu ul {
    flex-direction: column;
    width: 100%;
  }

  .nav-menu li {
    margin: 10px 0;
  }

  .nav-menu a {
    display: block;
    padding: 10px;
    color: #fff;
    text-decoration: none;
    position: relative;
  }

  /* スマホでも下線アニメーションを統一 */
  .nav-menu a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: #fff;
    transition: width 0.3s ease;
  }
  .nav-menu a:hover::after {
    width: 100%;
  }

  .hamburger {
    display: flex;
  }

  .cards {
    flex-direction: column;
    align-items: center;
  }
  .card {
    width: 80%;
  }

  .main-visual h1 {
    font-size: 1.5rem;
  }
  .main-visual p {
    font-size: 1rem;
  }

  .sitemap-blocks {
    flex-direction: column;
    align-items: center;
  }
  .sitemap-block {
    width: 90%;
  }
}

/* topに戻るボタン（基本設定） */
#back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  background-size: cover;
  background-position: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  overflow: hidden;
}

#back-to-top.show {
  opacity: 1;
  visibility: visible;
}

/* --- 重ねる文字（TOP）の設定 --- */
#back-to-top::after {
  content: "TOP";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #000;
  font-size: 10px; /* スマホで見やすいよう少し小さめに調整 */
  font-weight: bold;
  letter-spacing: 0.05em;
  transition: opacity 0.3s ease;
  pointer-events: none;
  text-shadow: 0 0 4px rgba(0,0,0,0.6); /* 文字の視認性を上げる影 */
}

/* --- PC（マウス操作）の設定 --- */
@media (hover: hover) {
  #back-to-top::after {
    opacity: 0; /* PCでは通常時は隠す */
  }
  
  #back-to-top:hover {
    transform: translateY(-8px);
    filter: brightness(0.7);
    box-shadow: 0 8px 15px rgba(0,0,0,0.3);
  }

  #back-to-top:hover::after {
    opacity: 1; /* ホバー時だけ表示 */
  }
}

/* --- スマホ（タッチ操作）の設定 --- */
@media (hover: none) {
  #back-to-top {
    /* 最初から少し暗くして文字を浮かび上がらせる */
    filter: brightness(0.8); 
  }

  #back-to-top::after {
    opacity: 1; /* スマホでは最初から表示 */
  }

  /* タップした時だけ少し凹ませてフィードバック */
  #back-to-top:active {
    transform: scale(0.9);
    filter: brightness(0.6);
  }
}

/* --- 各ページごとの画像設定 --- */

/* 通常時の画像 */
body.library #back-to-top { background-image: url("../../images/top-library.png"); }
body.system  #back-to-top { background-image: url("../../images/top-system.png"); }
body.facility #back-to-top { background-image: url("../../images/top-facility.png"); }
body.main     #back-to-top { background-image: url("../../images/top-main.png"); }

/* ホバー時に画像を変えたい場合はここに追記（例：図書館ページ） */
body.library #back-to-top:hover {
  /* background-image: url("../../images/top-library-hover.png"); */ /* もし別画像があれば */
}

/* CSS Grid */
/* セクション全体のレイアウト */
/* パターンA：画像が左、文章が右 */
.section-block {
  display: grid;
  grid-template-columns: 35% 1fr;
  grid-template-areas:
    "image title"
    "image text";
  gap: 20px;
  align-items: start;
  margin-bottom: 40px;
}

/* パターンB：文章が左、画像が右 */
.section-block-reverse {
  display: grid;
  grid-template-columns: 1fr 35%;
  grid-template-areas:
    "title ."
    "text  image";
  gap: 20px;
  align-items: start;
  margin-bottom: 40px;
}

/* 各要素の配置 */
.section-image {
  grid-area: image;
  display: grid;
  grid-template-columns: 1fr; /* PCでは縦に1枚ずつ並べる */
  gap: 15px;
}

.section-image img {
  width: 100%;
  height: auto;
  display: block;
  margin-top: 10px; /* 画像が複数ある場合の隙間 */
}
.section-image img:first-child {
  margin-top: 0;
}

.section-title {
  grid-area: title;
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 10px;
}

.section-text {
  grid-area: text;
  line-height: 1.6;
}

/* 画像無し */
.section-block.no-image {
  /* PC・スマホ共通：左の35%の空洞をなくし、1列（全幅）にする */
  grid-template-columns: 1fr;
  grid-template-areas: 
    "title"
    "text"; /* imageエリアの指定を消す */
}

/* スマホ表示（縦並びに変更） */
@media (max-width: 768px) {
  .section-block,
  .section-block-reverse {
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "text"
      "image";/* 上から タイトル → 文章 → 画像 の順 */
  }

  /* スマホの時は画像を横2列に並べる */
  .section-image {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 10px; /* テキストと画像の間に少し余白 */
  }

  /* 奇数枚のときの最後の画像を2列分（全幅）に広げる */
  .section-image img:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

/* ファイル表現 */
.filetype {
  font-size: 0.85em;
  color: #555;
  margin: 0px 4px;
  white-space: nowrap;
}
/* checkアイコン */
.check-icon svg {
  width: 1em;
  height: 1em;
  vertical-align: -0.15em; /* 行の中での上下位置を微調整 */
}
/* 注意喚起 */
.note {
  background: #fff8d6;       /* 薄い黄色（優しい） */
  border-left: 4px solid #f0c200;
  padding: 0.75em 1em;
  border-radius: 4px;
  line-height: 1.6;
}
/* 区切り線 */
.divider {
  height: 1px;
  background: #e5e5e5;
  margin: 2rem 0;
}
/* Warning Sign */
.warn {
  background: #fff8d6;
  font-style: normal;
}
.warn::before {
  content: "⚠";
}

/* ハイライト */
.hl {
  background: #fff8d6; /* 薄い黄色 */
  padding: 0.1em 0.3em;
  border-radius: 4px;
  font-weight: 600;
}


/* =========================================
   汎用ボックス（アラート・お知らせ）
========================================= */
.alert-box {
  margin: 30px 0;
  padding: 15px 20px;
  background-color: #ffffff;
  border: 2px solid #ddd; /* デフォルトの枠線 */
  border-radius: 6px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}
.alert-box strong, 
.alert-box .box-title {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 8px;
  font-weight: bold;
}
.alert-box p {
  margin: 0;
  line-height: 1.6;
  font-size: 0.95rem;
}

.alert-box a {
  color: #333;
  font-weight: bold;
  text-decoration: none;
}
.alert-box.warning {
  background-color: #fff8e1;
  border-color: #f5a623;
}
.alert-box.warning strong, .alert-box.warning .box-title {
  color: #5c4300;
}

/* ページごとのテーマカラー上書き（図書館） */
body.library .alert-box {
  border-color: #b22222;
  box-shadow: 0 4px 6px rgba(178, 34, 34, 0.1);
}
body.library .alert-box strong,
body.library .alert-box .box-title { color: #b22222; }

/* ページごとのテーマカラー上書き（施設・機器） */
body.facility .alert-box {
  border-color: #004080;
  box-shadow: 0 4px 6px rgba(0, 64, 128, 0.1);
}
body.facility .alert-box strong,
body.facility .alert-box .box-title { color: #004080; }


/* =========================================
   テーブル・開館時間カード
========================================= */
/* 汎用テーブル（元の .limit-table） */
.info-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}
.info-table th {
  color: #ffffff;
  padding: 12px;
  text-align: center;
  font-weight: bold;
  border: 1px solid rgba(0,0,0,0.1);
}
.info-table td {
  padding: 12px;
  border: 1px solid #ddd;
  text-align: center;
}

/* テーマカラー反映（テーブル見出し） */
body.library .info-table th { background-color: #b22222; }
body.system .info-table th { background-color: #555; }
body.facility .info-table th { background-color: #004080; }

/* 開館時間コンテナ（元の .hours-container） */
.hours-container {
  max-width: 500px;
  margin: 20px 0;
}
.hours-title {
  font-size: 1.2rem;
  margin-bottom: 15px;
  padding-left: 10px;
  color: #333;
}
/* テーマカラー反映（左の縦線） */
body.library .hours-title { border-left: 4px solid #b22222; }
body.facility .hours-title { border-left: 4px solid #004080; }

/* =========================================
   共通ボタン
========================================= */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1rem;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 2px solid transparent;
}
.btn-primary:hover {
  transform: translateY(-2px);
}

/* テーマカラー反映（図書館：白背景＋赤枠線パターン） */
body.library .btn-primary {
  background-color: #ffffff;
  border-color: #b22222;
  color: #333;
  box-shadow: 0 4px 6px rgba(178, 34, 34, 0.05);
}
body.library .btn-primary:hover {
  background-color: #fffafa;
  box-shadow: 0 6px 12px rgba(178, 34, 34, 0.15);
}
body.library .btn-primary.solid {
  background-color: #b22222;
  color: #ffffff;
}
body.library .btn-primary.solid:hover { background-color: #8b0000; }

/* 施設ページ（.facility）のボタンカラー */
body.facility .btn-primary {
  border-color: #004080;
  color: #004080;
}
body.facility .btn-primary:hover {
  background-color: #E9F2F9; /* 淡いブルー */
}
body.facility .btn-primary.solid {
  background-color: #004080;
  color: #ffffff;
}
body.facility .btn-primary.solid:hover { background-color: #333333; }

/* =========================================================
   【共通】スクロールアニメーション（フワッと表示）
========================================================= */
/* 初期状態：透明（opacity: 0） ＆ 少し下（translateY: 30px）に配置 */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* 画面内に入ったとき（is-visible）の状態：表示 ＆ 元の位置へ */
.fade-in-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   目的別タグリスト（アンカーリンク等）
========================================================= */
.purpose-anchor-list {
  margin: 0;
}
.purpose-row {
  display: flex;
  align-items: center;
  border-bottom: 1px dashed #ddd; /* 優しい点線で区切る */
  padding: 16px 0;
}
.purpose-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* 左側（目的のテキスト） */
.purpose-row dt {
  font-weight: bold;
  color: #333;
  width: 45%; /* 左側の幅を45%に */
  padding-right: 20px;
  line-height: 1.5;
}

/* 右側（リンクのグループ） */
.purpose-row dd {
  margin: 0;
  width: 55%; /* 右側の幅を55%に */
  display: flex;
  flex-wrap: wrap; /* ボタンが溢れたら自動で改行 */
  gap: 10px;
}

/* タグ型リンクボタン */
.tag-link {
  display: inline-block;
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  padding: 6px 16px;
  border-radius: 20px; /* 角を完全に丸くしてタグっぽく */
  font-size: 0.9rem;
  color: #555;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.2s ease;
}

/* ホバーアクションとテーマカラーの反映 */
body.library .tag-link:hover {
  background-color: #b22222;
  border-color: #b22222;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(178, 34, 34, 0.15);
}
body.system .tag-link:hover {
  background-color: #555;
  border-color: #555;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(178, 34, 34, 0.15);
}

/* スマホ対応（縦並びに変更） */
@media (max-width: 768px) {
  .purpose-row {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 0;
  }
  .purpose-row dt {
    width: 100%;
    margin-bottom: 12px;
    font-size: 1.05rem;
  }
  .purpose-row dd {
    width: 100%;
  }
}

/* 文章の中に埋め込むアイコン画像用のスタイル */
.inline-icon {
  height: 1.5em; /* 文字の高さに合わせてサイズを自動調整 */
  width: auto;   /* 縦横比を崩さない */
  vertical-align: middle; /* 文字の中央の高さにピッタリ合わせる */
  margin: 0 4px; /* 画像の左右にほんの少し余白を開けて読みやすくする */
  transform: translateY(-2px); /* もし少し下にズレて見える場合は、これで上に微調整できます */
}

/* =========================================================
   リスト内の注釈（※）スタイル
========================================================= */
.list-note {
  font-size: 0.9em;       /* 本文より少しだけ小さく */
  color: #666;            /* 濃いグレーにして、メインテキストと差をつける */
  margin-top: 8px;        /* 上の文章との隙間 */
  margin-bottom: 0;
  line-height: 1.5;
  padding-left: 1em;      /* 全体を1文字分右にずらす */
  text-indent: -1em;      /* 1行目（※）だけを1文字分左に戻す */
}

/* 注釈の中のリンクも少し落ち着いた色にする場合（お好みで） */
.list-note a {
  color: #555;
}

/* =========================================================
   コンテンツ内の画像（はみ出し防止＆レスポンシブ対応）
========================================================= */
.content-image {
  max-width: 100%; /* ★重要：親要素の幅を絶対に超えない */
  height: auto;    /* 縦横比を自動でキープ */
  display: block;  /* 画像の下にできる不要な隙間を消す */
  margin-top: 12px; /* 上のテキストとの間に少し余白をとる */
  border: 1px solid #ddd; /* 白いキャプチャ画像などが背景に溶け込まないように薄い枠線 */
  border-radius: 4px;     /* 角をほんの少し丸くする */
  box-shadow: 0 2px 4px rgba(0,0,0,0.05); /* ほんの少し影をつけて紙が浮いているように */
}

/* =========================================================
   プラットフォーム案内用カード（深い階層用）
========================================================= */
/* カードを包む外枠 */
.platform-wrapper {
  margin-top: 15px;
  display: flex;
  flex-direction: column;
  gap: 15px; /* カード同士の隙間 */
}

/* 個別のカード */
.platform-card {
  background: #fdfdfd;       /* ほんのり明るい背景 */
  border: 1px solid #e2e8f0; /* 薄いグレーの枠線 */
  border-radius: 8px;
  padding: 15px 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

/* プラットフォーム名 */
.platform-card .platform-name {
  font-size: 1.05rem;
  color: #333;
  margin: 0 0 10px 0;
  border-bottom: 1px dashed #cbd5e0; /* 下線で区切る */
  padding-bottom: 8px;
}

/* メインのアクセスリンク */
.platform-card .platform-main-link {
  display: inline-block;
  font-weight: bold;
  color: #b22222; /* 図書館のテーマカラーなどで目立たせる */
  margin-bottom: 12px;
  font-size: 1.05rem;
}
.platform-card .platform-main-link:hover {
  text-decoration: underline;
}

/* サブリンク（利用案内やPDF）のリスト */
.platform-card .platform-sub-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap; /* 横に並べて、画面が狭ければ自動で改行 */
  gap: 8px 20px;   /* 縦8px、横20pxの隙間 */
}

/* 親リスト（.number-list）の設定を打ち消すためのリセット */
.platform-card .platform-sub-links li {
  margin: 0 !important;
  padding: 0 !important;
  font-size: 0.95rem;
}