@import url('https://fonts.googleapis.com/css2?family=Train+One&display=swap');

.staff-box {
  /* サイズ可変に備えてカスタムプロパティ化 */
  --staff-top-height: 220px;

  width: 100%;
  max-width: 100%;
  border-radius: 16px;
  overflow: hidden;
  display: block;
  position: relative;
  margin-bottom: 3rem; /* 複数のstaff-box間の空白 */
  box-shadow: var(--shadow-md);
}

/* 最後のstaff-boxは下マージンを削除 */
.staff-box:last-child {
  margin-bottom: 0;
}

.staff-box__top {
  height: var(--staff-top-height);
  background: var(--staff-box-top-bg, #005BAC);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.staff-box__bottom {
  min-height: 200px;
  background: var(--staff-box-bottom-bg, #FFD400);
  position: relative;
  z-index: 1;
  padding: 140px 20px 28px;
}

.staff-box__bottom h3 {
  margin: 0 0 16px;
  font-size: 22px;
  display: block;
  padding-bottom: 6px;
  border-bottom: 2px solid currentColor; /* 左右20px分はパディングのため下線なし */
}

.staff-box__bottom p {
  margin: 20px 0;
  line-height: 1.8;
}

/* 段落間は上記の上下20pxで統一 */

.staff-history {
  margin: 12px 0 0;
  padding-left: 1.2em;
}

.staff-history li {
  margin: 4px 0;
}

/* .staff-box__label は未使用のため削除 */

.staff-box__picture {
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translate(-50%, -50%);
  width: 260px;
  height: auto;
  z-index: 2;
}

.staff-topmeta {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%) translateY(var(--topmeta-offset-y, 0px));
  text-align: right;
  color: var(--text02, #ffffff);
}

.staff-topmeta__en {
  font-size: 1.8rem;
  letter-spacing: 0.08em;
  font-family: 'Train One', cursive;
  line-height: 1.1;
}

.staff-topmeta__ja {
  font-size: 1.8rem;
  font-weight: 700;
  margin-top: 6px;
}

.staff-topmeta__roles {
  display: inline-block;
  margin-top: 10px;
}

.staff-tag {
  display: inline-block;
  font-size: 1rem;
  line-height: 1;
  padding: 6px 20px;
  border-radius: 999px;
  background: var(--tag-staff-bg, #FFD400);
  color: var(--tag-staff-text, #ffffff);
  text-align: right;
}

/* 左側ラベル */
.staff-topleft {
  position: absolute;
  left: 0;
  top: calc(50% + var(--topleft-offset-y, 0px));
  transform: translateY(-50%);
  color: var(--text02, #ffffff);
}

.staff-topleft__en {
  font-size: 2rem;
  letter-spacing: 0.2em;
  font-family: 'Montserrat', 'Noto Sans JP', Arial, sans-serif !important;
  font-weight: 700;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.staff-topleft__en rt {
  font-size: 1rem;
  letter-spacing: 0.02em;
}

/* ルビ中央揃え（縦書き対応） */
.staff-topleft__en ruby {
  ruby-position: over;
  ruby-align: center;
}

.staff-topleft__en rt {
  text-align: center;
  line-height: 1;
}

/* スマホ対応 */
@media screen and (max-width: 768px) {
  .staff-box {
    margin-bottom: 2rem; /* スマホ時は少し狭く */
  }
  
  .staff-box__picture {
    width: 200px;
  }
  .staff-box {
    --staff-top-height: 260px;
  }
  /* スマホ時のみ上下位置を少し上げる */
  .staff-topmeta { --topmeta-offset-y: -40px; }
  .staff-topleft { --topleft-offset-y: -40px; }
  /* スマホ時のご挨拶開始位置（上パディング） */
  .staff-box__bottom { padding-top: 100px; }
}

