/* TEPA-7 T5: 新UI準拠Header/Footer chrome。tpd-chrome- prefix でスコープ分離 */
:root {
  --tpd-header-height: 56px;
  --tpd-max-width: 1200px;
  --tpd-primary: #294CFF;
  --tpd-primary-hover: #1E3ACC;
  --tpd-text-secondary: #474958;
  --tpd-footer: #696C7C;
  --tpd-border: #EEEEEE;
  --tpd-bg: #FFFFFF;
  --tpd-font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif;
}

/* chrome を出すページだけにリセットを限定する（非対象ページへ波及させない） */
body.tpd-chrome-enabled { margin: 0; }

/* 固定ヘッダー高さぶんの余白確保（JSフォールバック #staticPage にも適用） */
body.tpd-chrome-enabled #react-root,
body.tpd-chrome-enabled #staticPage {
  padding-top: var(--tpd-header-height);
  box-sizing: border-box;
}

.tpd-chrome-header,
.tpd-chrome-footer,
.tpd-chrome-mobile-menu { display: none; }

body.tpd-chrome-enabled .tpd-chrome-header,
body.tpd-chrome-enabled .tpd-chrome-footer { display: block; }

.tpd-chrome-header *,
.tpd-chrome-footer *,
.tpd-chrome-mobile-menu * { box-sizing: border-box; }

/* ===== Header ===== */
.tpd-chrome-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  height: var(--tpd-header-height);
  background: var(--tpd-bg);
  border-bottom: 1px solid var(--tpd-border);
  font-family: var(--tpd-font);
  transition: box-shadow 0.2s;
  box-shadow: 0 1px 0.75px rgba(0,0,0,0.1);
}
.tpd-chrome-header.is-scrolled {
  box-shadow: 0 1px 0.75px rgba(0,0,0,0.1);
}
.tpd-chrome-header__inner {
  max-width: 100%;
  margin-inline: auto;
  padding: 12px 16px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tpd-chrome-header__logo {
  display: inline-flex;
  align-items: center;
  width: 106px;
  height: 28px;
  flex-shrink: 0;
  text-decoration: none;
}
.tpd-chrome-header__logo img {
  display: block;
  width: 106px;
  height: 28px;
  object-fit: contain;
}
.tpd-chrome-header__nav {
  display: none;
  align-items: center;
  gap: 24px;
}
.tpd-chrome-nav-link {
  color: var(--tpd-text-secondary);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  text-decoration: none;
  white-space: nowrap;
}
.tpd-chrome-nav-link:hover { color: var(--tpd-primary); text-decoration: none; }
.tpd-chrome-nav-btn-primary {
  color: #FFFFFF;
  background: var(--tpd-primary);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  width: 84px;
  height: 35.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 10px;
  white-space: nowrap;
}
.tpd-chrome-nav-btn-primary:hover { background: var(--tpd-primary-hover); text-decoration: none; }
.tpd-chrome-hamburger {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 30px;
  height: 30px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.tpd-chrome-hamburger img {
  display: block;
  width: 22px;
  height: 22px;
}
/* ===== Mobile menu ===== */
.tpd-chrome-mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: none;
  font-family: var(--tpd-font);
}
body.tpd-chrome-enabled .tpd-chrome-mobile-menu.is-open { display: block; }

.tpd-chrome-mobile-menu__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
}

.tpd-chrome-mobile-menu__drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 280px;
  max-width: 100vw;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--tpd-bg);
  box-shadow: 0 25px 25px rgba(0,0,0,0.25);
  overflow: hidden;
}

.tpd-chrome-mobile-menu__header {
  height: 56px;
  padding: 0 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  border-bottom: 1px solid var(--tpd-border);
}

.tpd-chrome-mobile-menu__close {
  width: 28px;
  height: 28px;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--tpd-text-secondary);
  background: transparent;
  border: 0;
  cursor: pointer;
}

.tpd-chrome-mobile-menu__close-icon {
  position: relative;
  width: 20px;
  height: 20px;
}

.tpd-chrome-mobile-menu__close-icon::before,
.tpd-chrome-mobile-menu__close-icon::after {
  content: "";
  position: absolute;
  top: 9px;
  left: 1px;
  width: 18px;
  height: 2px;
  background: currentColor;
}

.tpd-chrome-mobile-menu__close-icon::before { transform: rotate(45deg); }
.tpd-chrome-mobile-menu__close-icon::after { transform: rotate(-45deg); }

.tpd-chrome-mobile-menu__body {
  min-height: 0;
  overflow-y: auto;
  padding-top: 8px;
}

.tpd-chrome-mobile-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tpd-chrome-mobile-item {
  border-bottom: 1px solid #F5F5F5;
}

.tpd-chrome-mobile-row {
  width: 100%;
  padding: 16px 20px;
  min-height: 69.5px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 16px;
  align-items: center;
  column-gap: 16px;
  text-decoration: none;
}

.tpd-chrome-mobile-row--mypage {
  min-height: 64.5px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.tpd-chrome-mobile-icon-circle {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #758BFF;
  background: #EEF1FF;
  border-radius: 50%;
}

.tpd-chrome-mobile-row-icon {
  width: 18px;
  height: 18px;
  display: block;
  object-fit: contain;
}

.tpd-chrome-mobile-row-icon--mypage {
  width: 17px;
  height: 17px;
}

.tpd-chrome-mobile-text {
  min-width: 0;
}

.tpd-chrome-mobile-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: 17.5px;
  color: var(--tpd-text-secondary);
}

.tpd-chrome-mobile-title--mypage {
  font-size: 13px;
}

.tpd-chrome-mobile-subtitle {
  display: block;
  margin-top: 0;
  color: var(--tpd-footer);
  font-size: 11px;
  font-weight: 400;
  line-height: 16.5px;
}

.tpd-chrome-mobile-chevron {
  width: 16px;
  height: 16px;
  color: #CCCCCC;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tpd-chrome-mobile-chevron img {
  width: 16px;
  height: 16px;
  display: block;
  object-fit: contain;
}

/* ===== Footer ===== */
.tpd-chrome-footer {
  background: var(--tpd-bg);
  padding: 33px 16px 32px;
  font-family: var(--tpd-font);
}
.tpd-chrome-footer__inner {
  margin-inline: auto;
  max-width: var(--tpd-max-width);
  width: 100%;
  display: flex;
  flex-direction: column;
}
.tpd-chrome-footer__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-direction: column;
  gap: 16px;
}
.tpd-chrome-footer__brand {
  display: inline-flex;
  align-items: flex-end;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.tpd-chrome-footer__brand img {
  display: block;
  width: 100px;
  height: 26px;
  object-fit: contain;
}
.tpd-chrome-footer__copyright {
  font-size: 10px;
  font-weight: 600;
  color: var(--tpd-footer);
  line-height: 1;
  white-space: nowrap;
}
.tpd-chrome-footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: flex-start;
}
.tpd-chrome-footer__link {
  font-size: 12px;
  color: var(--tpd-footer);
  line-height: 18px;
  text-decoration: none;
  white-space: nowrap;
}
.tpd-chrome-footer__link:hover { color: var(--tpd-primary); text-decoration: none; }

/* ===== md 以上 (768px): PCナビ表示 / ハンバーガー非表示 ===== */
@media (min-width: 768px) {
  .tpd-chrome-header {
    border-bottom: none;
    box-shadow: none;
  }
  .tpd-chrome-header.is-scrolled {
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  }
  .tpd-chrome-header__inner {
    padding: 9px 16px;
  }
  .tpd-chrome-header__logo,
  .tpd-chrome-header__logo img {
    width: 129px;
    height: 34px;
  }
  .tpd-chrome-header__nav { display: flex; }
  .tpd-chrome-hamburger { display: none; }
  .tpd-chrome-mobile-menu { display: none !important; }
  .tpd-chrome-footer__top {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 28px;
  }
  .tpd-chrome-footer__links { justify-content: flex-end; gap: 16px; }
  .tpd-chrome-footer__link { font-size: 11px; line-height: 1.5; }
}
