body {
      font-family: "Helvetica Neue", "Noto Sans JP", sans-serif;
      margin: 0;
      background: #FFFFFF;
    }

    .container {
      max-width: 1200px;
      margin: 0 auto;
      padding: 20px;
    }

    .header {
        background: #FFFFFF;
        position: relative; /* ← 基準にする */
    } 

    /* リンク */    
    .link-group {
        position: absolute;
        top: 20px;
        right: 50px;
        display: flex;
        gap: 10px;
    }
    .link-button {
        color: #555;
        display: flex;
        text-decoration: none;
    }

    .link-button:hover {
    color: #b4b4b4;
    }

    .header-inner {
        margin: 0 auto;
        padding: 20px;
    }

    /* 右寄せエリア */
    .right-area {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* ← 右寄せのキモ */
    padding-left: 20px;
    }
    
    .title-small {
      font-size: 14px;
      color: #555;
    }

    /* タイトル */
    .site-title {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 10px;
    }

    /* メニュー */
    .menu {
    display: flex;
    justify-content: center;
    border-top: 2px solid #a0d8ef;
    border-bottom: 2px solid #a0d8ef;
    padding: 8px 0;
    gap: 20px; 
    }

    /* ボタン */
    .menu-item {
    display: inline-block;
    padding: 10px 18px;
    background: #FFFFFF;
    color: #007acc;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: 0.2s;
    position: relative;
    }

    .menu-item:hover {
    background: #a0d8ef;
    color: #FFFFFF;
    }

h1 {
  font-size: 28px;
  border-bottom: 2px solid #003366;
  padding-bottom: 10px;
  margin-bottom: 30px;
}

h2 {
  font-size: 20px;
  margin-top: 20px;
}

h3 {
  font-size: 25px;
  border-left: 5px solid #003366;
  padding-left: 10px;
}

h4 {
  font-size: 20px;
  margin-top: 20px;
}

a {
  color: #000000;
  text-decoration: underline;
  border-bottom: 1px solid transparent;
  transition: 0.2s;
}

a:hover {
  color: #007acc;
}

/* 強調 */
.highlight {
  color: #007acc;
  font-weight: bold;
}

.indent {
  text-indent: 1em;
}


.award-table {
  border-collapse: collapse;
}

.award-table td {
  padding: 2px 10px;
  vertical-align: top;
}

.label {
  white-space: nowrap;
  font-weight: bold;
}

.center {
  text-align: center;
}

.info {
  margin-top: 20px;
}

hr {
  margin: 40px 0;
}

    /* メンバー */

.member-list {
  display: grid;
  grid-template-columns: 1fr 1fr; /* ← 2列 */
  gap: 30px; /* 間隔 */
}

.member {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.member img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
}

.tab {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
}

.tab-item {
  padding: 8px 16px;
  text-decoration: none;
  color: #003366;
  border-bottom: 2px solid transparent;
}

.tab-item.active {
  border-bottom: 2px solid #003366;
  font-weight: bold;
}

.layout {
  display: flex;
}

/* 研究テーマ */
.research-list {
  display: grid;
  grid-template-columns: 1fr; /* ←1列にすると見やすい */
  gap: 30px;
}

/* 各テーマ */
.research-item {
  display: flex;
  align-items: center;

  padding: 20px;
  border-bottom: 1px solid #ddd;
}

/* テキスト */
.research-text {
  flex: 2;
}

/* 画像 */
.research-img {
  flex: 1;
  text-align: right;
}

.research-img img {
  width: 60%;
  border-radius: 10px;
}

/* ホバー */
.research-item:hover {
  transform: translateY(-5px);
  transition: 0.2s;
}

.reference-list {
  line-height: 1.8;
  padding-left: 20px;
}

.reference-list li {
  margin-bottom: 10px;
}


/* 年メニュー */
.year-menu {
  display: flex;
  justify-content: center;
  gap: 15px;
  padding: 15px;
  background: #f5f5f5;
  flex-wrap: wrap;
}

.year-menu a {
  text-decoration: none;
  color: #333;
  padding: 5px 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.year-menu a:hover {
  background: #ddd;
}

.year-menu-active{
  text-decoration: none;
  color: #333;
  padding: 5px 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  background: #ddd;
}

/* コンテンツ */
.content {
  max-width: 900px;
  margin: auto;
  padding: 20px;
}

/* 論文 */
/* ===== paperカード ===== */
.paper {
  display: grid;
  grid-template-columns: 1fr 500px;
  gap: 20px;
  align-items: start;

  margin-bottom: 30px;
  padding-bottom: 20px;

  border-bottom: 1px solid #ddd;
}

/* ===== テキスト側 ===== */
.paper .text {
  flex-grow: 1;
  min-width: 0;
}

.paper .title {
  font-weight: bold;
  font-size: 20px;
  margin-bottom: 8px;
}

.paper .title a {
  text-decoration: none;
  color: #000;
}

.paper .title a:hover {
  text-decoration: underline;
}

.paper .author {
  font-size: 14px;
  color: #555;
}

/* ===== 画像側 ===== */
.paper .thumb {
  position: relative;
  width: 100%;
  flex-shrink: 0;
  display: flex;
  justify-content: flex-end;
}

.paper img {
  width: 80%;
  height: auto;
  display: block;
  z-index: 1;

  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.paper .journal {
  display: inline-block;
  border: 1px solid #ccc;
  color: #000000;
  background: transparent;

  font-size: 13px;
  padding: 3px 3px;
  border-radius: 6px;
  margin: 1px 0;
}


/* ===== ホバーでちょい拡大（任意） ===== */
.paper img:hover {
  transform: scale(1.03);
  transition: 0.2s;
}

.award {
  padding: 15px 20px;
  margin-bottom: 15px;
  background: #f9f9f9;
  border-radius: 10px;
  transition: 0.2s;
}

.award:hover {
  background: #f0f0f0;
}

/* モットー */
.policy li {
  font-weight: bold;
}

/* テーブル */
.event-table {
  width: 100%;
  border-collapse: collapse;
}

.event-table th,
.event-table td {
  border: 1px solid #ccc;
  padding: 8px;
  text-align: center;
}

.event-table th {
  background: #e0f0ff;
}

/* ===================== テキスト ===================== */
.title {
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 5px;
}

.title a {
  text-decoration: none;
  color: #000;
}

.title a:hover {
  text-decoration: underline;
}

.author {
  font-size: 14px;
  color: #555;
}

/* ===================== 画像 ===================== */
.images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.images img {
  width: 100%;
  border-radius: 10px;
}

/* グリッド */
.photo-images {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

/* カード */
.photo-images a {
  display: block;
  text-decoration: none;
  color: #000;

  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  transition: 0.2s;
}

/* 画像 */
.photo-images img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

/* タイトル */
.photo-images p {
  margin: 0;
  padding: 12px 15px;
  font-size: 14px;
  text-align: center;
}

/* ホバー（控えめ） */
.photo-images a:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.12);
}

.photo-masonry {
  column-count: 3;        /* 列数（PC） */
  column-gap: 3px;
  padding: 6px;
}

.photo-masonry img {
  width: 100%;
  margin-bottom: 3px;
  border-radius: 0;
  break-inside: avoid;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  transition: transform 0.2s ease;
}

/* モーダル背景 */
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.9);
}

/* 拡大画像 */
.modal-content {
  display: block;
  margin: auto;
  max-width: 90%;
  max-height: 80%;
}

/* 閉じるボタン */
.close, .prev, .next {
  position: absolute;
  color: white;
  font-size: 40px;
  cursor: pointer;
  user-select: none;
}

.close { top: 20px; right: 30px; }

.prev {
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.next {
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}


/* ホバー */
.prev:hover, .next:hover, .close:hover {
  color: #ccc;
}

.lightbox {
  display: none;
  position: fixed;
  inset: 0; /* ← これで完全中央基準 */
  background: rgba(0,0,0,0.9);

  align-items: center;   /* 縦中央 */
  justify-content: center; /* 横中央 */

  z-index: 9999;
}

.lightbox.active {
  display: flex; /* ←表示時だけ */
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
}

/* メイン */
.main {
  flex: 1;
  padding: 40px;
}

    /* HOMEボタン*/
.home-link {
  text-align: center;
  margin-top: 20px;
}

.home-link a {
  color: #003366;
  text-decoration: none;
}

.home-link a:hover {
  text-decoration: underline;
}

/* フッター */
.footer {
    background: #d9f4ff;
    padding-left: 20px;
    padding: 20px;
}

.foot-inner {
    display: flex;
    justify-content: space-between; /* ← これがキモ */
    align-items: center;
}

.menu-foot {
    display: flex;
    padding: 8px 0;
    gap: 40px; 
}

.menu-item-foot {
    display: inline-block;
    color: #646464;
    text-decoration: none;
    transition: 0.2s;
    position: relative;
    }

.menu-item-foot:hover {
    color: #b4b4b4;
    }

.left-area {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding-left: 20px
}

.foot-samll{
    color: #555;
    font-size: 25px;
    padding: 20px;
}

.foot-title{
    color: #555;
    font-size: 30px;
    padding: 20px;
}

.small {
  font-size: 12px;
  text-align: right;
  margin-top: 10px;
}

/* スマホ対応 */
@media (max-width: 768px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

/* タブレット */
@media (max-width: 900px) {
  .photo-images {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* スマホ */
@media (max-width: 500px) {
  .photo-images {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .photo-masonry {
    column-count: 2;
  }
}

@media (max-width: 500px) {
  .photo-masonry {
    column-count: 1;
  }
}