html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Zen Maru Gothic', sans-serif;
  font-weight: 500;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  background-color: #e1f8e9;
}

main {
  flex: 1;
}

/* ========== Background Decoration ========== */
.bk-cube {
  position: absolute;
  top: 0;
  right: 0;
  width: 60%;
  height: auto;
  z-index: -1;
  mix-blend-mode: multiply;
  opacity: 0.8;
  pointer-events: none;
  user-select: none;
}

/* ========== Header ========== */
header {
  text-align: center;
  padding: 0;
  overflow: visible;
  position: relative;
  z-index: 20;
  display: flex;
  flex-direction: column;
}

.header-title {
  background: transparent;
  text-align: left;
  padding: 0 16px 0 0;
  color: #333333;
  width: 100%;
  height: 88px;
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-sizing: border-box;
}

.header-title h1 {
  font-size: 18px;
  margin: 0 0 10px 8px;
  padding: 0;
  display: flex;
  align-items: center;
  color: #333333;
}

.h1-green {
  color: #57b38a;
}

.header-left {
  display: flex;
  align-items: flex-end;
  overflow: visible;
  flex-shrink: 0;
}

.header-chara {
  height: 74px;
  width: auto;
  display: block;
  margin-bottom: -25px;
  margin-left: -10px;
  position: relative;
  z-index: 10;
  flex-shrink: 0;
}

/* ========== Global Nav ========== */
.global-nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
  align-items: flex-end;
}

.global-nav-row {
  display: flex;
  gap: 8px;
  background: transparent;
  width: auto;
}

.global-nav-row--main {
  background-color: transparent;
}

.global-nav-row--test {
  background-color: transparent;
}

.global-nav-item {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 116px;
  height: 42px;
  padding: 0;
  color: white;
  text-decoration: none;
  font-size: 15px;
  font-weight: bold;
  background-color: #57b38a;
  border-radius: 7px;
  border-right: none;
  transition: background-color 0.2s ease;
  white-space: nowrap;
  box-sizing: border-box;
}

.global-nav-item:last-child {
  border-right: none;
}

.global-nav-item--test {
  font-size: 12px;
  font-weight: normal;
  background-color: color-mix(in srgb, #57b38a 78%, black);
  height: 34px;
  padding: 0;
}

.global-nav-row--main .global-nav-item:hover {
  background-color: #38a577;
}

.global-nav-row--test .global-nav-item:hover {
  background-color: color-mix(in srgb, #57b38a 60%, black);
}

.global-nav-item--disabled {
  opacity: 0.4;
  cursor: default;
  pointer-events: none;
  filter: grayscale(40%);
}

.test-link--disabled {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
  filter: grayscale(40%);
}

/* ========== Video Section ========== */
.video {
  background-color: transparent;
  margin: 0;
  width: 100%;
  text-align: center;
  padding: 36px 0 76px;
  position: relative;
}

.video::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 24px;
  background: #ffffff;
  border-radius: 20px 20px 0 0;
}

.tag-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  text-decoration: none !important;
  background-color: #4a9e78;
  color: #ffffff;
  border-radius: 4px;
  padding: 0.15em 0.3em;
  margin: 0 0.2em;
  font-size: 1em;
  font-family: 'Zen Maru Gothic', sans-serif;
  line-height: 1.2;
  white-space: nowrap;
  transition: transform 0.25s ease, background-color 0.25s ease;
}

@media (min-width: 768px) and (hover: hover) {
  .tag-box:hover {
    transform: translateY(-3px);
    background-color: #367f60;
  }
}

/* スマホ用キャラ：デフォルトは非表示 */
.character-sp {
  display: none !important;
}

/* PC用キャラ：デフォルトは表示 */
.character-pc {
  display: block;
}

.sub-theme-label {
  display: inline-block;
  background-color: #57b38a;
  color: #ffffff;
  font-family: 'Zen Maru Gothic', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.12em;
  padding: 6px 24px;
  border-radius: 999px;
  margin: 0 auto 20px;
}

.video-description-area {
  max-width: 840px;
  margin: 0 auto;
  padding: 0 20px;
}

.video-description {
  max-width: 800px;
  margin: 1.5rem auto 1.5rem;
  text-align: left;
  padding: 0 20px;
  line-height: 2rem;
  font-family: "Hiragino Maru Gothic ProN", "Meiryo", "MS PGothic", sans-serif;
  color: #333333;
}

.supervisor-credit {
  text-align: center;
  font-size: 0.75rem;
  color: #555;
  margin: 8px auto 4px;
}

.video-flex {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* 左側スペーサー：キャラクター幅と揃えて動画をセンタリング */
.video-spacer {
  width: 126px; /* character 110px + gap 16px */
  flex-shrink: 0;
}

.video-container {
  position: relative;
  flex: 1;
  max-width: 620px;
  min-width: 0;
}

.custom-video {
  width: 100%;
  height: auto;
  border: none;
  border-radius: 8px;
  display: block;
}

.video-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #57b38a;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 再生前オーバーレイ */
.video-overlay {
  position: absolute;
  inset: 0;
  background-image: url('../movie/img_movie.jpg');
  background-size: cover;
  background-position: center;
  background-color: #57b38a;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.2s ease;
  z-index: 5;
}

.video-overlay:hover {
  opacity: 0.9;
}

.video-overlay.is-hidden {
  display: none;
}

@keyframes heartbeat {
  0%   { transform: scale(1); }
  14%  { transform: scale(1.2); }
  28%  { transform: scale(1); }
  42%  { transform: scale(1.12); }
  56%  { transform: scale(1); }
  100% { transform: scale(1); }
}

.play-icon {
  width: 72px;
  height: auto;
  opacity: 0.75;
  animation: heartbeat 1.4s ease-in-out infinite;
}

/* ミュートボタンエリア（動画下・中央） */
.video-mute-area {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.video-controls-row1,
.video-controls-row2 {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ミュートボタン */
.video-mute-btn {
  width: 50px;
  height: 50px;
  background-color: #93e8bb;
  border: 1.5px solid #000;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}
.mute-icon {
  width: 26px;
  height: 26px;
  display: block;
  pointer-events: none;
}
.video-mute-btn:hover {
  background-color: #6fd4a3;
}
.video-mute-btn.is-muted {
  background-color: #e8e8e8;
  border-color: #aaa;
}
.video-mute-btn.is-muted:hover {
  background-color: #d4d4d4;
}
.video-mute-btn.is-hidden {
  display: none;
}

/* 10秒スキップボタン */
.video-skip-btn {
  width: 50px;
  height: 50px;
  background-color: transparent;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-skip-btn:hover {
  opacity: 0.7;
}
.video-skip-btn.is-hidden {
  display: none;
}
.skip-icon {
  width: 48px;
  height: 48px;
  display: block;
  pointer-events: none;
}

/* はじめに戻るボタン */
.video-rewind-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  width: 120px;
  border: 1.5px solid #000;
  border-radius: 999px;
  background-color: #93e8bb;
  color: #333;
  font-family: 'Zen Maru Gothic', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.2s ease;
}
.video-rewind-btn:hover {
  background-color: #6fd4a3;
}
.video-rewind-btn.is-hidden {
  display: none;
}

/* 再生・一時停止ボタン */
.video-play-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  width: 120px;
  border: 1.5px solid #000;
  border-radius: 999px;
  background-color: #93e8bb;
  color: #333;
  font-family: 'Zen Maru Gothic', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.2s ease, width 0.2s ease, height 0.2s ease;
}
.video-play-btn:hover {
  background-color: #6fd4a3;
}
.video-play-btn.is-playing {
  background-color: #fff;
}
.video-play-btn.is-playing:hover {
  background-color: #f0f0f0;
}

/* 速度コントロール */
.speed-control {
  display: flex;
  align-items: center;
  gap: 4px;
}
.speed-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 11px;
  border: 1.5px solid #aaa;
  border-radius: 999px;
  background: #fff;
  color: #666;
  font-family: 'Zen Maru Gothic', sans-serif;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.speed-btn.is-active {
  background-color: #4a9e6e;
  border-color: #4a9e6e;
  color: #fff;
}
.speed-btn:hover:not(.is-active) {
  background-color: #f0f0f0;
  border-color: #666;
  color: #333;
}

/* リプレイボタン（再生終了後・中央に表示） */
.video-replay-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 50px;
  padding: 12px 28px;
  font-size: 15px;
  font-family: 'Zen Maru Gothic', 'Hiragino Maru Gothic ProN', sans-serif;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease;
  z-index: 10;
}

.video-replay-btn:hover {
  background: rgba(0, 0, 0, 0.85);
}

.video-replay-btn.is-hidden {
  display: none;
}

.character-wrap {
  width: 110px;
  flex-shrink: 0;
  margin-left: 16px;
  padding-bottom: 6px;
}

.character-img {
  width: 100%;
  height: auto;
  display: block;
}

img {
  -webkit-user-drag: none;
  user-select: none;
}

/* ========== Topics Section ========== */
.topics {
  text-align: center;
  margin: 0;
  padding: 50px 20px 60px;
  background: #ffffff;
}

h2.ttl-femtech,
h2.ttl-femtech-B {
  font-family: 'Zen Maru Gothic', sans-serif;
  font-weight: 700;
  margin: 20px 0 40px;
  line-height: 2.5rem;
}

h2.ttl-femtech {
  font-size: 1.3rem;
  color: #57b38a;
  margin-bottom: 12px;
}

h2.ttl-femtech strong {
  font-size: 2rem;
  color: #57b38a;
}

.ttl-logo {
  display: block;
  margin: 8px auto 0;
  width: 185px;
  height: auto;
}

h2.ttl-femtech-B {
  font-size: 1.6rem;
  color: #57b38a;
}

.topic-grid {
  display: flex;
  justify-content: center;
  gap: 60px;
  flex-wrap: wrap;
}

.topic-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 200px;
  gap: 10px;
}

.topic-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.topic-item:hover {
  transform: translateY(-8px);
}

.topic-circle-wrap {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.topic-circle-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.topic-item:hover .topic-circle-img {
  transform: scale(1.12);
}

.topic-label {
  display: block;
  margin-top: 14px;
  padding: 8px 24px;
  background-color: #57b38a;
  color: #ffffff;
  font-family: 'Zen Maru Gothic', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
  border-radius: 999px;
  transition: background-color 0.3s ease;
}

.topic-item:hover .topic-label {
  background-color: #3d9a72;
}

.topic-item--disabled {
  opacity: 0.35;
  filter: grayscale(60%);
  cursor: default;
  pointer-events: none;
}

.topic-label--disabled {
  background-color: #b0b0b0;
  color: #fff;
  cursor: default;
}

.topic-test-btn {
  display: block;
  margin-top: 12px;
  padding: 8px 24px;
  background-color: #ffffff;
  color: #57b38a;
  font-family: 'Zen Maru Gothic', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
  border-radius: 999px;
  border: 2px solid #57b38a;
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease;
  width: 100%;
  box-sizing: border-box;
}

.topic-test-btn:hover {
  background-color: #57b38a;
  color: #ffffff;
}

.topic-grid {
  padding-bottom: 100px;
}

/* ========== Supervisor ========== */
.kanshu {
  width: 100%;
  background-color: #ffffff;
  color: #aaaaaa;
  text-align: center;
  padding: 6px 40px 16px;
  flex-shrink: 0;
  font-size: 0.65em;
  box-sizing: border-box;
}

/* ========== Footer ========== */
footer {
  background-color: #57b38a;
  color: #ffffff;
  text-align: center;
  padding: 60px 10px 28px;
  flex-shrink: 0;
  font-size: 0.65em;
  border-radius: 36px 36px 0 0;
  position: relative;
  margin-top: -36px;
}

.footer-chara {
  position: absolute;
  top: -50px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: auto;
  pointer-events: none;
}

/* ========== Font Definitions ========== */
@font-face {
  font-family: 'Zen Maru Gothic';
  src: url('../fonts/Zen_Maru_Gothic/ZenMaruGothic-Black.ttf') format('truetype');
  font-weight: 900;
}
@font-face {
  font-family: 'Zen Maru Gothic';
  src: url('../fonts/Zen_Maru_Gothic/ZenMaruGothic-Bold.ttf') format('truetype');
  font-weight: 700;
}
@font-face {
  font-family: 'Zen Maru Gothic';
  src: url('../fonts/Zen_Maru_Gothic/ZenMaruGothic-Medium.ttf') format('truetype');
  font-weight: 500;
}
@font-face {
  font-family: 'Zen Maru Gothic';
  src: url('../fonts/Zen_Maru_Gothic/ZenMaruGothic-Regular.ttf') format('truetype');
  font-weight: 400;
}
@font-face {
  font-family: 'Zen Maru Gothic';
  src: url('../fonts/Zen_Maru_Gothic/ZenMaruGothic-Light.ttf') format('truetype');
  font-weight: 300;
}

/* ========== Utilities ========== */
@media screen and (min-width: 1024px) {
  .sp_br {
    display: none;
  }
}

/* ========== Responsive ========== */
@media (max-width: 767px) {
  .header-title {
    height: auto;
    padding: 0;
    flex-direction: column;
    align-items: stretch;
  }

  .header-left {
    height: 56px;
  }

  .header-title h1 {
    margin: 0 0 8px 6px;
    font-size: 13px;
  }

  .header-chara {
    margin-left: -8px;
    height: 68px;
  }

  /* スマホ: navをheader-title内から帯スタイルに戻す */
  .global-nav {
    flex-direction: column;
    gap: 0;
    align-items: stretch;
    width: 100%;
  }

  .global-nav-row {
    width: 100%;
    gap: 0;
  }

  .global-nav-row--main {
    background-color: #57b38a;
  }

  .global-nav-row--test {
    background-color: color-mix(in srgb, #57b38a 88%, black);
  }

  .global-nav-item {
    flex: 1;
    border-radius: 0;
    background-color: transparent;
    font-size: 11px;
    height: 34px;
    padding: 0;
    border-right: 1px solid rgba(0, 0, 0, 0.1);
  }

  .global-nav-item:last-child {
    border-right: none;
  }

  .global-nav-item--test {
    font-size: 10px;
    height: 30px;
    background-color: transparent;
    padding: 0;
  }

  .global-nav-row--test .global-nav-item {
    height: 30px;
  }

  .global-nav-row--main .global-nav-item:hover {
    background-color: rgba(0, 0, 0, 0.1);
  }

  .global-nav-row--test .global-nav-item:hover {
    background-color: rgba(0, 0, 0, 0.15);
  }

  .video {
    padding: 24px 0 40px;
  }

  /* スマホ：キャラを出し分け */
  .character-sp {
    display: block !important;
    width: 100px;
    height: auto;
    margin: 16px auto 8px;
  }

  .character-pc {
    display: none !important;
  }

  /* テキストエリアを縦並び（テキスト全幅→キャラ中央） */
  .video-description-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 12px;
    margin: 0 auto;
  }

  .video-description {
    width: 100%;
    max-width: 100%;
    margin: 1.2rem 0 1rem;
    font-size: 0.85em;
    line-height: 1.7rem;
    order: 1;
    padding: 0;
  }

  .video-flex {
    padding: 0;
  }

  .video-spacer {
    display: none;
  }

  .video-container {
    width: 100%;
  }

  .custom-video {
    width: 100%;
    border-radius: 0;
  }

  .video-overlay,
  .video-placeholder {
    border-radius: 0;
  }

  .character-wrap {
    width: 72px;
    margin-left: 8px;
    flex-shrink: 0;
  }

  .topics {
    padding: 36px 16px 88px;
  }

  .topic-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 480px;
    margin: 0 auto;
  }

  .topic-card {
    width: 100%;
  }

  .topic-item {
    width: 100%;
  }

  .topic-circle-wrap {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .topic-label {
    font-size: 0.9rem;
    margin-top: 12px;
  }

  .kanshu {
    padding: 8px 16px 20px;
  }

  .bk-cube {
    width: 90%;
    top: 80px;
  }

  /* コントロールボタンを2行に分割 */
  .video-mute-area {
    flex-direction: column;
    gap: 8px;
  }

  .video-controls-row1,
  .video-controls-row2 {
    justify-content: center;
  }

  footer::before {
    content: '';
    position: absolute;
    top: -36px;
    left: 0;
    right: 0;
    height: 36px;
    background-color: #ffffff;
    z-index: -1;
  }
}
