/* Xu Laboratory: ヘッダー所属表記の整理
 * common.css、xu_lab_navigation_improved.css、および既存の言語切替CSSの後に読み込む。
 * #header 内のみを対象とし、NEWSや本文のスタイルは変更しない。
 */
#header, #header * { box-sizing: border-box; }
#header .header_fixed .top_head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  min-width: 0;
  padding: 0 122px 0 20px; /* 右側にJP/EN切替（ある場合）の余地 */
}
#header .header_fixed .top_head > .logo_tohoku {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 62px;
  width: 62px;
  height: 62px;
}
#header .header_fixed .top_head .logo_img {
  display: block;
  width: 62px;
  height: 62px;
  object-fit: contain;
}
#header .header_fixed .top_head__text.lab-branding {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  padding: 0;
}
#header .lab-branding__name {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 12px;
  width: max-content;
  max-width: 100%;
  color: #173c50;
  text-decoration: none;
  line-height: 1.35;
}
#header .lab-branding__jp {
  font-size: 25px;
  font-weight: 700;
  letter-spacing: .035em;
  white-space: nowrap;
}
#header .lab-branding__en {
  font-family: 'Roboto','Noto Sans JP',sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: #58717d;
  white-space: nowrap;
}
#header .lab-branding__full,
#header .lab-branding__compact {
  margin: 3px 0 0;
  padding: 0;
  font-size: 11.5px;
  line-height: 1.45;
  color: #526773;
  font-weight: 400;
  letter-spacing: 0;
  white-space: nowrap;
}
#header .lab-branding__full a {
  color: inherit;
  text-decoration: none;
}
#header .lab-branding__full a:hover,
#header .lab-branding__full a:focus-visible {
  color: #168b91;
  text-decoration: underline;
}
#header .lab-branding__separator { padding: 0 6px; color: #a0b0b7; }
#header .lab-branding__compact { display: none; }

/* 1199px以下では所属を短縮。大学・研究室名が押し合わないようにする。 */
@media screen and (max-width: 1199px) {
  #header .lab-branding__full { display: none; }
  #header .lab-branding__compact { display: block; }
}

/* ハンバーガーが表示される幅では、右側の操作ボタン用余白を確保 */
@media screen and (min-width: 768px) and (max-width: 1024px) {
  #header .header_fixed .top_head { height: 80px; padding-right: 185px; }
  #header .lab-branding__jp { font-size: 23px; }
  #header .lab-branding__en { font-size: 13px; }
}

/* モバイルは研究室名を主役にし、所属は最短の1行のみ */
@media screen and (max-width: 767px) {
  #header, #header .header_fixed, #header .header_fixed .top_head { height: 82px; }
  #header .header_fixed .top_head { padding: 0 122px 0 16px; gap: 0; }
  #header .header_fixed .top_head > .logo_tohoku { display: none; }
  #header .lab-branding__jp { font-size: 23px; }
  #header .lab-branding__en { display: none; }
  #header .lab-branding__compact { font-size: 11.5px; margin-top: 3px; }
  #header .lab-branding__major { display: none; }
  #header .menu { top: 15px; }
  #header .header_fixed .nav > .depth1 { margin-top: 82px; }
  /* 既存のJP/EN切替スニペットがある場合の位置調整 */
  #header .header_fixed .lab-language-switch { top: 23px; right: 62px; }
}

/* ごく狭い端末では文字と左右操作領域の距離を確保 */
@media screen and (max-width: 350px) {
  #header .header_fixed .top_head { padding-right: 112px; padding-left: 12px; }
  #header .lab-branding__jp { font-size: 21px; }
  #header .lab-branding__compact { font-size: 10.5px; }
}
