@charset "utf-8";

/* 共通ヘッダー・フッター */
body {
  background-image: none;
  background-color: #fff;
}

#header {
  width: 100%;
  height: 89px;
  position: relative;
  margin: 0 0 15px;
  background-color: #222;
  border-bottom: none;
}

#header .lab-brand {
  position: absolute;
  top: 0;
  left: calc(50% - 480px);
  display: inline-flex;
  align-items: center;
  height: 100%;
  box-sizing: border-box;
  padding: 8px 0;
  gap: 16px;
  color: #fff;
  text-align: left;
  text-decoration: none;
}

#header .lab-brand__logo {
  height: 100%;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

#header .lab-brand__logo-media {
  width: auto;
  height: 100%;
  max-width: 320px;
  display: block;
  object-fit: contain;
}

#header .lab-brand__name {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

#header .lab-brand__title {
  font-family: Arial, sans-serif;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

#header .lab-brand__subtitle {
  margin-top: 4px;
  font-size: 18px;
  font-weight: 700;
}

#header .lab-brand:hover,
#header .lab-brand:focus {
  color: #fff;
  opacity: 0.8;
}

footer {
  background-image: none;
  background-color: #222;
}

@media (max-width: 980px) {
  #header {
    height: 78px;
    margin-bottom: 12px;
  }

  #header .lab-brand {
    left: 16px;
    padding: 6px 0;
    gap: 12px;
  }

  #header .lab-brand__logo-media {
    max-width: 40vw;
  }

  #header .lab-brand__title {
    font-size: 26px;
  }

  #header .lab-brand__subtitle {
    margin-top: 2px;
    font-size: 15px;
  }

  #container {
    width: auto;
    margin: 0 16px;
  }

  #nav_frame,
  #main {
    width: 100%;
    margin: 0 0 16px;
    float: none;
    clear: both;
  }

  nav {
    width: 100%;
    margin: 0;
  }

  ul#nav1 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  ul#nav1 li {
    margin: 0;
  }

  ul#nav1 a:link,
  ul#nav1 a:visited {
    box-sizing: border-box;
    width: 100%;
    min-height: 44px;
    padding: 11px 16px;
  }

  #about,
  #slideshow,
  #main h1,
  h2,
  table.member {
    box-sizing: border-box;
    width: 100%;
  }

  #slideshow {
    height: 45vw;
    min-height: 180px;
    max-height: 280px;
  }

  footer {
    height: auto;
    min-height: 56px;
    padding: 14px 0;
    box-sizing: border-box;
  }

  #footer_color {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    width: auto;
    height: auto;
    margin: 0 16px;
  }

  #copy,
  #flink {
    float: none;
    margin: 0;
  }

  #flink {
    margin-left: auto;
  }
}


/* 画像・イベント一覧のスマホ表示補正 */
@media (max-width: 980px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  #main img,
  #about img {
    max-width: 100%;
    height: auto;
    box-sizing: border-box;
  }

  figure {
    max-width: 100%;
    margin-right: 0;
    margin-left: 0;
  }

  figure img {
    max-width: 100%;
    height: auto;
    margin: 0;
  }

  #slideshow img {
    width: 100%;
    height: 100%;
    max-width: none;
  }

  #main table:not(.oneTable) {
    display: block;
    max-width: 100%;
    margin-right: 0;
    margin-left: 0;
    overflow-x: auto;
  }

  #img2 .oneTable {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    margin: 10px 0;
  }

  #img2 .oneTable tbody,
  #img2 .oneTable tr {
    display: contents;
  }

  #img2 .oneTable td {
    box-sizing: border-box;
    width: auto;
    height: auto;
    min-width: 0;
    padding: 8px;
    overflow: hidden;
  }

  #img2 .oneTable img,
  #img2 .oneTable .imgmj1 img {
    width: 100%;
    height: auto;
    margin: 0;
    object-fit: cover;
  }
}


/* 長い見出しのスマホ表示補正 */
@media (max-width: 980px) {
  #main h1 {
    width: 100%;
    height: auto;
    min-height: 24px;
    padding: 16px;
    font-size: 24px;
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  h2 {
    width: 100%;
    height: auto;
    min-height: 22px;
    padding: 8px 5px;
    font-size: 20px;
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  #main h3,
  #main h4,
  #main p,
  #main li {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}


/* 研究内容ページのスマホ用カード表示 */
@media (max-width: 980px) {
  .research-page #main .imgBox {
    width: 100%;
    height: auto;
    min-height: 0;
    margin: 0;
  }

  .research-page #main .imgBox img {
    width: 100%;
    height: auto;
    padding-top: 12px;
  }

  .research-page #main #img2 .research-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    margin: 10px 0;
  }

  .research-page #main #img2 .research-cards tbody,
  .research-page #main #img2 .research-cards tr {
    display: contents;
  }

  .research-page #main #img2 .research-cards td {
    box-sizing: border-box;
    width: auto;
    height: auto;
    min-width: 0;
    padding: 8px;
    overflow: hidden;
  }

  .research-page #main #img2 .research-cards .imgmj1 {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .research-page #main #img2 .research-cards .imgmj1 a {
    display: block;
  }

  .research-page #main #img2 .research-cards .imgmj1 img {
    width: 100%;
    height: auto;
    margin: 0;
    object-fit: cover;
  }

  .research-page #main #img2 .research-cards .imgmj1 mj {
    position: static;
    display: block;
    margin: 8px 0 0;
    transform: none;
    font-size: 16px;
    line-height: 1.3;
    text-align: center;
  }

  .research-page #main #img2 .research-cards td > div[style] {
    display: flex;
    width: auto !important;
    height: auto !important;
    min-height: 140px;
    align-items: center;
    justify-content: center;
  }

  .research-page #main #img2 .research-cards td > div[style] > div[style] {
    margin: 0 !important;
  }

  .research-page #main #img2 .research-cards mj[style] {
    margin: 0 !important;
    font-size: 18px !important;
  }
}
