header {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 20px 24px; /* 左右の余白を減らす */
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  background: rgba(10, 10, 10, 0.9);
  z-index: 1000;
  box-sizing: border-box;
}
header h1 {
  margin: 0;
  font-size: 1.8rem;
  color: #f5f5f5;
  text-align: left;
  white-space: nowrap; /* 折り返し防止 */
  display: flex;
  align-items: center;
  gap: 12px;
}

.lab-titles {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lab-name {
  font-size: 1.8rem;
  color: #f5f5f5;
  white-space: nowrap;
}

.lab-subtitle {
  font-size: 0.75rem;
  color: #b8e6f0;
  font-weight: 300;
  white-space: nowrap;
  letter-spacing: 0.05em;
  opacity: 0.95;
}
nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  width: auto;
  box-sizing: border-box;
}
nav a {
  color: #f5f5f5;
  margin-left: 20px;
  text-decoration: none;
  position: relative;
  padding: 8px 12px;
  font-size: 1rem;
  white-space: nowrap;    /* リンク内で改行しない */
}
nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 0;
  height: 2px;
  background: #00bcd4;
  transition: 0.3s;
}
nav a:hover::after {
  width: 100%;
}

/* ハンバーガーメニュー用スタイル */
#menu-toggle {
  background: none;
  border: none;
  color: #f5f5f5;
  font-size: 2rem;
  cursor: pointer;
  margin-left: 16px;
  z-index: 1100;
  display: none;
}

/* 画面幅が1100px以下の場合 */
@media (max-width: 1100px) {
  header nav {
    display: none !important;
    flex-direction: column;
    position: absolute;
    top: 64px;
    right: 24px;
    background: rgba(10,10,10,0.98);
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.12);
    padding: 16px 0;
    min-width: 160px;
  }
  header nav.open {
    display: flex !important;
  }
  #menu-toggle {
    display: block;
  }
}

.lab-icon {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid #444;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  flex-shrink: 0;         /* ← 重要：縮まないように */
}
