body {
  margin: 0;
  font-family: "Hiragino Kaku Gothic Pro", Meiryo, sans-serif;
  background-color: #fffdf8;
  color: #333;
}

/* 木目調背景 */
body {
  margin: 0;
  font-family: "Hiragino Kaku Gothic Pro", Meiryo, sans-serif;
  background-image: url('back2.png');  /* ← 木目画像ファイル名 */
  background-size: cover;
  background-repeat: repeat;
  background-attachment: fixed;
  color: #333;
}

/* メニューバー */
nav {
  background-color: #6d4c41;
  padding: 0.5em;
  text-align: center;
}

nav a {
  color: white;
  margin: 0 15px;
  text-decoration: none;
  font-weight: bold;
}

/* 見出しや本文背景を読みやすく調整（白背景＋透過） */
main, section {
  background-color: rgba(255, 255, 255, 0.9);
  margin: 2em auto;
  padding: 1.5em;
  border-radius: 8px;
  max-width: 960px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
/* 右上ロゴ表示 */
.lab-logo {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 999;
  width: 100px;
}

.lab-logo img {
  width: 100%;
  height: auto;
}
.banner {
  background-image: url('img/wood.jpg'); /* 木目画像をここに */
  background-size: cover;
  background-position: center;
  height: 250px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

      .title-container h3,
    .title-container h1,
    .title-container h2 { margin: 0; }

    .title-container h3 { font-size: 1.05rem; letter-spacing: .12em; }
    .title-container h1 { font-size: clamp(2rem, 5vw, 3.3rem); margin: 4px 0; letter-spacing: .08em; }
    .title-container h2 { font-size: 1.15rem; font-weight: 500; opacity: .95; }


/* ヘッダー（背景画像） */
.lab-header {
  background-image: url('hed.png');
  background-size: auto;
  background-position: center;
  height: 250px;
}

/* フッター（背景画像） */
/*.lab-footer {
  background-image: url('fod.png');
  background-size: cover;
  background-position: center;
  height: 50px;
}*/
.overlay-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #4B2E0F;
  text-shadow: 1px 1px 3px #ffffffaa;
}

.overlay-text h1 {
  font-size: 3em;
  margin: 0.3em 0;
  font-weight: bold;
}

.overlay-text h2 {
  font-size: 1.5em;
  margin: 0;
}

nav {
  background-color: #6d4c41;
  padding: 0.5em;
  text-align: center;
}

nav a {
  color: white;
  margin: 0 15px;
  text-decoration: none;
  font-weight: bold;
}

main {
  padding: 2em;
}

footer {
  text-align: center;
  padding: 1em;
  background-color: #eee;
  font-size: 1.5em;
}

.scroll-gallery {
  display: flex;
  overflow-x: auto;
  white-space: nowrap;
  padding: 10px;
  background: #f8f8f8;
}
.scroll-gallery img {
  height: 250px;
  margin-right: 10px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.slideshow-container {
  position: relative;
  max-width: 100%;
  margin: auto;
  overflow: hidden;
  height: 400px;
}

.slide {
  display: none;
  width: 100%;
  height: 100%;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fade {
  animation-name: fade;
  animation-duration: 1s;
}

@keyframes fade {
  from {opacity: .4}
  to {opacity: 1}
}
/*横スライド*/
.carousel {
  width: 100%;
  overflow: hidden;
  height: 400px;
  position: relative;
}

.carousel-track {
  display: flex;
  width: 500%; /* 画像5枚分 */
  animation: scroll 25s linear infinite;
}

.carousel-track img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  flex-shrink: 0;
}

@keyframes scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-400%); } /* -100% × (枚数 - 1) */
}

h1 {
  font-size: 2em; /* 通常の2倍くらい */
  font-weight: bold;
  margin-bottom: 0.5em;
  color: #4b2e00; /* 木材っぽい色合い */
}
p { font-size: 1.0em; /* 通常の2倍くらい */
  font-weight: bold;
  margin-bottom: 0.5em;
  color: #4b2e00; /* 木材っぽい色合い */
}
p1 { font-size: 1.5em; /* 通常の2倍くらい */
  font-weight: bold;
  margin-bottom: 0.5em;
  color: #4b2e00; /* 木材っぽい色合い */
}

.links {
  text-align: center;
  margin: 2em auto;
}

.link-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.btn {
  background-color: #006699;
  color: white;
  padding: 12px 24px;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  transition: background-color 0.3s;
}

.btn:hover {
  background-color: #004466;
}


/* =====================================================
   研究室HP 共通リニューアル用スタイル
   元の木目背景・ヘッダー画像・ナビの雰囲気を活かしながら、
   各ページのカード表示、右サイドバー、ロゴメニューを追加
===================================================== */
:root {
  --wood-dark: #4b2e00;
  --wood-main: #6d4c41;
  --wood-soft: #f7ead7;
  --wood-border: rgba(109, 76, 65, 0.35);
  --paper: rgba(255, 255, 255, 0.92);
  --paper-strong: rgba(255, 253, 248, 0.97);
  --shadow-soft: 0 6px 18px rgba(0,0,0,0.15);
}

body {
  line-height: 1.8;
}

/* Google翻訳の表示位置を少し整える */
#google_translate_element {
  position: relative;
  z-index: 10000;
  padding: 6px 10px;
  background: rgba(255,255,255,0.8);
}

/* ヘッダー画像上の文字 */
.lab-header {
  position: relative;
  overflow: hidden;
}

.overlay-text {
  width: min(92%, 900px);
}

.overlay-text h1,
.overlay-text h2 {
  letter-spacing: 0.04em;
}

/* ナビゲーション */
nav a {
  display: inline-block;
  padding: 0.25em 0.4em;
  border-radius: 6px;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

nav a:hover,
nav a.active {
  background-color: rgba(255,255,255,0.18);
  transform: translateY(-1px);
}

/* 右上ロゴ＋クリックメニュー */
.logo-menu-wrap {
  position: fixed;
  top: 14px;
  right: 18px;
  z-index: 9999;
}

.logo-menu-wrap .lab-logo {
  position: static;
  width: 95px;
  height: 95px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  display: block;
}

.logo-menu-wrap .lab-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  background: rgba(255,255,255,0.15);
}

.logo-dropdown {
  display: none;
  position: absolute;
  top: 105px;
  right: 0;
  width: 235px;
  background: var(--paper-strong);
  border: 2px solid #8b5a2b;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  overflow: hidden;
}

.logo-dropdown.show {
  display: block;
}

.logo-dropdown a {
  display: block;
  padding: 11px 16px;
  color: var(--wood-dark);
  text-decoration: none;
  font-weight: bold;
  border-bottom: 1px solid rgba(139, 90, 43, 0.25);
  background: rgba(255,255,255,0.55);
}

.logo-dropdown a:last-child {
  border-bottom: none;
}

.logo-dropdown a:hover {
  background: #f3e1c2;
}

/* ページ全体の2カラム構成 */
.page-layout {
  max-width: 1260px;
  margin: 0 auto;
  padding: 0 1.5em;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
  align-items: start;
}

.page-layout main {
  max-width: none;
  margin: 2em 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.page-layout main section,
.content-card {
  max-width: none;
  background-color: var(--paper);
  margin: 0 0 1.5em 0;
  padding: 1.6em;
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(109, 76, 65, 0.18);
}

.page-layout h1,
.page-layout h2,
.page-layout h3 {
  color: var(--wood-dark);
}

.page-title {
  text-align: center;
}

.page-title .lead {
  font-size: 1.05em;
  font-weight: bold;
  color: var(--wood-dark);
  max-width: 850px;
  margin: 0.5em auto 0;
}

/* 右サイドバー */
.external-sidebar {
  background-color: var(--paper);
  margin: 2em 0;
  padding: 1.2em;
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  border: 2px solid var(--wood-border);
  position: sticky;
  top: 85px;
}

.external-sidebar h2 {
  text-align: center;
  font-size: 1.15em;
  margin: 0 0 0.8em 0;
  color: var(--wood-dark);
}

   .side-links {
      position: sticky;
      top: 72px;
      padding: 16px;
      background: linear-gradient(180deg, #fffdf8 0%, #fff5e7 100%);
    }

    .side-links h2 {
      text-align: left;
      font-size: 1.18rem;
      margin-bottom: 14px;
    }

    .side-note {
      margin: 0 0 12px;
      font-size: .88rem;
      color: #6b5641;
    }

    .side-banner {
      display: block;
      text-decoration: none;
      margin-bottom: 11px;
      padding: 13px 14px;
      border-radius: 15px;
      background: white;
      border: 1px solid rgba(92, 53, 24, 0.13);
      box-shadow: 0 4px 12px rgba(76, 48, 22, 0.10);
      transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    }

    .side-banner:hover {
      transform: translateY(-2px);
      box-shadow: 0 8px 16px rgba(76, 48, 22, 0.18);
      border-color: rgba(92, 53, 24, 0.28);
    }

    .link-badge {
      display: inline-block;
      margin-right: 6px;
      padding: 2px 7px;
      border-radius: 999px;
      background: rgba(92, 53, 24, 0.10);
      font-size: .72rem;
      vertical-align: 1px;
    }

    .side-banner.instagram .link-badge {
      background: rgba(179, 49, 107, 0.12);
    }

    .side-banner.primary .link-badge {
      background: rgba(49, 95, 57, 0.12);
    }

    .side-banner strong {
      display: block;
      font-size: .98rem;
      line-height: 1.45;
    }

    .side-banner span {
      display: block;
      font-size: .78rem;
      color: #80684f;
      margin-top: 2px;
    }

    .side-banner.instagram {
      background: linear-gradient(135deg, #ffe7ef, #fff7dc);
      color: var(--accent-pink-text);
      border: 2px solid rgba(179, 49, 107, 0.18);
    }

    .side-banner.primary {
      background: linear-gradient(135deg, #eaf5e8, #fffdf8);
      color: #315f39;
    }

    .mini-links {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
      margin-top: 12px;
    }

    .mini-links a {
      display: block;
      text-align: center;
      text-decoration: none;
      background: rgba(92, 53, 24, 0.08);
      border-radius: 999px;
      padding: 6px 8px;
      font-weight: 700;
      font-size: .82rem;
      color: var(--wood-dark);
    }

    .contact-footer {
      background: #edceb7;
      color: #9e5f05;
      padding: 24px 20px;
  } 

    .contact-footer a { color: #fff0c5; }
    .footer-bottom { text-align: center; margin-top: 16px; opacity: .8; }

    @media screen and (max-width: 820px) {
      .lab-logo { width: 54px; height: 54px; font-size: .85rem; }
      .page-layout { display: block; }
      .side-links { position: static; margin-top: 22px; }
      nav { position: static; }
      main section { padding: 18px; }
    }

/* 汎用カード */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 1em;
}

.mini-card,
.research-card,
.paper-card {
  background: rgba(255,253,248,0.95);
  border: 1px solid rgba(109, 76, 65, 0.18);
  border-radius: 12px;
  padding: 1em;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

.mini-card h3,
.research-card h3 {
  margin-top: 0;
}

/* 教員紹介 */
.staff-profile {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.staff-photo {
  width: 100%;
  max-width: 210px;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  background: #fff;
}

.profile-list {
  margin: 1em 0;
  padding: 0;
  list-style: none;
}

.profile-list li {
  padding: 0.45em 0;
  border-bottom: 1px dashed rgba(109, 76, 65, 0.28);
}

.cta-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 1em;
}

.cta-button {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 999px;
  background: #6d4c41;
  color: #fff !important;
  text-decoration: none;
  font-weight: bold;
  box-shadow: 0 3px 8px rgba(0,0,0,0.18);
}

.cta-button:hover {
  background: #4b2e00;
}

/* 研究紹介 */
.research-card {
  margin-bottom: 1.5em;
}

.research-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--wood-soft);
  color: var(--wood-dark);
  font-weight: bold;
  font-size: 0.88em;
  margin-bottom: 0.5em;
}

.research-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
  margin: 1em 0;
}

.research-images img,
.about-photo {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.15);
  background: #fff;
}

/* 研究室ページ */
.about-carousel {
  width: 100%;
  overflow: hidden;
  height: 330px;
  background: rgba(255,255,255,0.7);
}

.about-carousel-track {
  display: flex;
  width: max-content;
  animation: labScroll 55s linear infinite;
}

.about-carousel-track img {
  width: 420px;
  height: 330px;
  object-fit: cover;
  flex: 0 0 auto;
}

@keyframes labScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.location-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 20px;
  align-items: center;
}

/* 研究業績 */
.publication-list {
  counter-reset: pubnum;
  list-style: none;
  padding: 0;
  margin: 1em 0 0;
}

.publication-list li {
  counter-increment: pubnum;
  position: relative;
  padding: 1em 1em 1em 3.2em;
  margin-bottom: 0.9em;
  background: rgba(255,253,248,0.96);
  border-radius: 12px;
  border: 1px solid rgba(109,76,65,0.16);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.publication-list li::before {
  content: counter(pubnum);
  position: absolute;
  top: 1em;
  left: 1em;
  width: 1.7em;
  height: 1.7em;
  border-radius: 50%;
  background: #6d4c41;
  color: white;
  display: grid;
  place-items: center;
  font-weight: bold;
}

.pub-title {
  font-weight: bold;
  color: var(--wood-dark);
}

/* フッター */
.contact-footer {
  background: rgba(255,255,255,0.92);
  color: var(--wood-dark);
  font-size: 1em;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
  gap: 22px;
  align-items: start;
  max-width: 1180px;
  margin: 2em auto 0;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 -3px 12px rgba(0,0,0,0.12);
  text-align: left;
}

.contact-footer p {
  font-size: 1em;
  font-weight: normal;
  color: var(--wood-dark);
}

.contact-footer a {
  color: var(--wood-dark);
  font-weight: bold;
}

.footer-map iframe {
  width: 100%;
  max-width: 100%;
  height: 360px;
  border-radius: 10px;
}

.footer-bottom {
  grid-column: 1 / -1;
  text-align: center;
  border-top: 1px solid rgba(109,76,65,0.25);
  padding-top: 0.8em;
  font-size: 0.92em;
}

/* スマホ対応 */
@media screen and (max-width: 900px) {
  .page-layout {
    display: block;
    padding: 0 1em;
  }

  .external-sidebar {
    position: static;
    margin: 0 0 2em 0;
  }

  .staff-profile,
  .location-card,
  .contact-footer {
    display: block;
  }

  .staff-photo {
    display: block;
    margin: 0 auto 1em;
  }

  .logo-menu-wrap {
    top: 10px;
    right: 10px;
  }

  .logo-menu-wrap .lab-logo {
    width: 72px;
    height: 72px;
  }

  .logo-dropdown {
    top: 82px;
    width: 205px;
  }

  .about-carousel,
  .about-carousel-track img {
    height: 230px;
  }

  .about-carousel-track img {
    width: 300px;
  }

  nav a {
    margin: 4px 8px;
  }

  main, section {
    padding: 1.1em;
  }
}
