@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
:root {
    --primary: #1d1d1f;
    --header-bg: #2c2c2e;
    --accent: #00a0e9;
    --text: #1d1d1f;
    --text-light: #86868b;
    --bg-light: #fbfbfd;
    --spacing: clamp(2rem, 8vw, 2rem);
}
body {
    font-family: "Zen Kaku Gothic New", system-ui, -apple-system, "Hiragino Kaku Gothic ProN",
               "Yu Gothic", "Meiryo", "Segoe UI", Arial, sans-serif;
    line-height: 1.7; /* 少しだけ広げて可読性UP */
    font-size: 18px;
    -webkit-font-smoothing: antialiased;
    /*
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    */
    margin: 0;
    padding: 0;
    background-color: var(--bg-light);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    font-size: 18px; /* ベースフォントサイズを増加 */
}
.header {
    background: transparent;
    color: white;
    padding: 0.5rem 0;
    position: fixed;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
    box-sizing: border-box;
    backdrop-filter: blur(10px); /* 背景にぼかし効果を適用 */
    -webkit-backdrop-filter: blur(10px); /* Safari対応 */
}
@media (max-width: 768px) {
    .header {
      padding: 0.2rem 0;
    }
}

.header-spacer {
    height: calc(1.5rem * 4);
    width: 100%;
}
@media (max-width: 768px) {
  .header-spacer {
    height: calc(1.5rem * 5);  /* 倍率を上げる */
  }
}
.header.scrolled {
    padding: 1.5rem 0;
    background: rgba(44, 44, 46, 0.55);
    backdrop-filter: blur(10px);
    backdrop-filter: blur(10px); /* 背景にぼかし効果を適用 */
    -webkit-backdrop-filter: blur(10px); /* Safari対応 */
}
.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 3rem;
}
/* ロゴエリアのスタイルを調整 */
.logo-area {
    display: flex;
    align-items: center;
    gap: 3rem; /* ロゴ間のスペース */
}

.header-logo {
    width: 40px;
    height: auto;
    transition: transform 0.3s ease;
}
/* 2つ目のロゴのサイズ調整 */
.header-logo-lab7 {
    width: 110px; /* サイズを調整 */
}

.header-logo:hover {
    transform: rotate(10deg);
}

.header.scrolled .header-logo {
    width: 40px;
}
.header.scrolled .header-logo-lab7 {
    width: 110px; /* スクロール時のサイズも調整 */
}

/* 既存のCSSに追加 */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn {
    display: inline-block;
    cursor: pointer;
    /* ナビゲーションリンクと同じフォントスタイルを適用 */
    font-family: geom-graphic, sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 1rem;
    letter-spacing: -0.01em;
    color: white;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: rgba(44, 44, 46, 0.55);
    min-width: 140px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
}

.dropdown-content a {
    color: black;
    padding: 10px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
}

.dropdown-content a:hover {
    background-color: rgba(54, 54, 56, 0.55);
}

/* オプション：ホバー時の背景色変更 */
.dropdown:hover .dropbtn {
    background-color: rgba(54, 54, 56, 0.55);
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 2rem;
}
.navigation a {
    font-family: geom-graphic, sans-serif;
    font-weight: 400;
    font-style: normal;
    text-decoration: none;
    color: white;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    transition: all 0.3s ease;
    position: relative;
}
.navigation a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}
.navigation a:hover::after {
    width: 100%;
}
.hero {
    height: 55vh;
    color: white;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}
.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.hero-slide img,
.hero-slide video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-slide.active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 128, 255, 0.3);
    z-index: 2;
}
.hero-content {
    position: relative;
    z-index: 3;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 3rem;
    animation: fadeInUp 1s ease-out;
}
.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin: 0;
    opacity: 0;
    animation: scaleIn 1s ease-out forwards;
    animation-delay: 0.5s;
    max-width: 800px;
    white-space: nowrap; /* 折り返し禁止 */
}

.hero-title-line {
    display: block;
    color: white;
    font-size: 2.5rem;
    text-shadow: 0 3px 6px rgba(0,0,0,0.6);
    margin-bottom: 0.5rem;
}
.hero-title-second {
    font-size: 2.5rem;
}

.hero-subtitle {
    font-size: 2rem;
    font-weight: 500;
    margin-top: 0;
    margin-bottom: 2.0rem;
    letter-spacing: 0;
    opacity: 0;
    animation: scaleIn 1s ease-out forwards; /* fadeInUpからscaleInに変更 */
    animation-delay: 0.5s; /* D3 Centerと同じタイミング */
    color: rgb(125, 235, 255);
    text-shadow: 0 3px 6px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
  .hero-title,
  .hero-title-line,
  .hero-subtitle {
    font-size: 1.2rem;
    white-space: normal;
  }
}

.hero-subtitle-second {
    color: rgb(255, 177, 138);
}

.hero-affiliation {
    font-size: 1.1rem;
    font-weight: 500;
    color: #a1a1a6;
    max-width: 800px;
    margin-top: 2rem;
    opacity: 0;
    animation: fadeInUp 1s ease-out forwards;
    animation-delay: 1s;
}

.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 3rem;
}
.section {
    padding: var(--spacing) 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.section.visible {
    opacity: 1;
    transform: translateY(0);
}
.section h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 2rem;
    letter-spacing: -0.03em;
}
/* メインコンテンツの調整 */
.section p {
    font-size: 1.5rem;
    line-height: 1.8;
}
.professor-profile {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 4rem;
    align-items: start;
}
.profile-image {
    width: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
}
.research-topics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}
.topic-card {
    padding: 2rem;
    background: white;
    border-radius: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.topic-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 12px rgba(0,0,0,0.15);
}
.topic-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}
.topic-card p {
    color: var(--text-light);
}
.footer {
    background: var(--primary);
    color: #a1a1a6;
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
}
.accent-text {
    color: var(--accent);
}
@media (max-width: 768px) {
    .header-content,
    .hero-content,
    .main-content {
        padding: 0 1.5rem;
    }
    .navigation {
        display: none;
    }
    .hero-title {
        font-size: 2rem;
    }
}

/* ==== Responsive Navigation (Hamburger) v2 ================================ */
.nav-toggle {
  display: none;
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1001;
  width: 44px;
  height: 44px;
  border: none;
  background: rgba(255,255,255,0.9);
  border-radius: 9999px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  cursor: pointer;
}
.nav-toggle:focus { outline: 2px solid #555; outline-offset: 2px; }
.nav-toggle .nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: #111;
  transition: transform .2s ease, opacity .2s ease;
}

/* PCは既存の横並びのまま */
nav.navigation { z-index: 1000; }

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }

  /* 画面全体にかぶさるメニュー */
  nav.navigation {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(255,255,255,0.96);
    transform: translateY(-100%);
    transition: transform .25s ease;
    padding-top: 5rem; /* ボタン高さ分の余白 */
    overflow-y: auto;
  }
  /* 開いた状態 */
  body.nav-open nav.navigation,
  nav.navigation.is-open {
    transform: translateY(0);
  }

  /* メニュー項目のレイアウト */
  nav.navigation ul {
    list-style: none;
    margin: 0;
    padding: 0 1.2rem 3rem;
    display: grid;
    gap: 1rem;
    text-align: center;
    font-size: 1.1rem;
  }
  nav.navigation ul > li > a {
    display: block;
    padding: .9rem 1.2rem;
  }

  /* ハンバーガーの × 変形（body.nav-open で判定） */
  body.nav-open .nav-toggle .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  body.nav-open .nav-toggle .nav-toggle-bar:nth-child(2) {
    opacity: 0;
  }
  body.nav-open .nav-toggle .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* 背景スクロール抑止 */
  body.no-scroll { overflow: hidden; }
}
/* ========================================================================= */

/* ==== Responsive Navigation (Hamburger) v3 visibility hotfix ============== */
@media (max-width: 960px) {
  /* 最前面に出す */
  nav.navigation {
    position: fixed !important;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw; height: 100vh;
    z-index: 4000 !important;
    background: rgba(255,255,255,0.96);
    transform: translateY(-100%);
    transition: transform .25s ease;
    padding-top: 5rem;
    overflow-y: auto;
  }
  body.nav-open nav.navigation,
  nav.navigation.is-open {
    transform: translateY(0);
  }

  /* メニュー本体 */
  nav.navigation ul {
    list-style: none;
    margin: 0;
    padding: 0 1.2rem 3rem;
    display: grid;
    gap: 1rem;
    text-align: center;
    font-size: 1.1rem;
  }

  /* トグルボタンはさらに前面に */
  .nav-toggle {
    z-index: 5000 !important;
  }
}
/* ========================================================================= */

/* ==== Responsive Navigation (Hamburger) v4 contrast fix =================== */
@media (max-width: 960px) {
  /* モバイルメニュー内の文字色を濃いめに統一 */
  nav.navigation,
  nav.navigation * {
    color: #0f172a !important;           /* slate-900 相当 */
    text-shadow: none !important;
  }
  nav.navigation a {
    color: #0f172a !important;
    text-decoration: none;
    font-weight: 600;
  }
  nav.navigation a:focus,
  nav.navigation a:hover {
    text-decoration: underline;
  }

  /* 背景をほぼ白に（画像や下層テキストを消す） */
  nav.navigation {
    background: rgba(255,255,255,0.98) !important;
  }
}
/* ========================================================================= */

/* ==== Responsive Navigation (Hamburger) v5 iOS narrow fix ================= */
/* iOS Safariで超狭幅時にオーバーレイが消える問題への対策。
   1) transformアニメをやめて opacity/pointer-events に変更
   2) 100vhの代わりに 100dvh を優先（fallbackを併記）
   3) display:block !important で他ルールに負けないようにする
   4) z-index を十分に確保
*/
@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }

  nav.navigation {
    position: fixed !important;
    inset: 0;
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    z-index: 4000 !important;
    background: rgba(255,255,255,0.98) !important;
    display: block !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
    padding-top: 5rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* iOSでの慣性スクロール */
  }
  /* 新しいビューポート単位が使える環境で高さを上書き */
  @supports (height: 100dvh) {
    nav.navigation { height: 100dvh; min-height: 100dvh; }
  }

  body.nav-open nav.navigation,
  nav.navigation.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  /* メニュー項目の読みやすさ */
  nav.navigation ul {
    list-style: none;
    margin: 0;
    padding: 0 1.2rem 3rem;
    display: grid;
    gap: 1rem;
    text-align: center;
    font-size: 1.1rem;
  }
  nav.navigation, nav.navigation * {
    color: #0f172a !important;
    text-shadow: none !important;
  }
  nav.navigation a { font-weight: 600; text-decoration: none; }
  nav.navigation a:hover, nav.navigation a:focus { text-decoration: underline; }

  /* トグルボタンはさらに前面に */
  .nav-toggle { z-index: 5000 !important; }
}
/* ========================================================================= */

/* ==== Responsive Navigation (Hamburger) v6 icon fix ======================= */
/* ハンバーガーアイコンを横三本線に調整 */
.nav-toggle .nav-toggle-bar {
  width: 24px;
  height: 2px;
  margin: 4px auto;
  background: #111;
}
/* ×に変形するときの位置補正 */
body.nav-open .nav-toggle .nav-toggle-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
body.nav-open .nav-toggle .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
body.nav-open .nav-toggle .nav-toggle-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}
/* ========================================================================= */

/* ==== Responsive Navigation (Hamburger) v7 simple icon ==================== */
/* 背景の白丸をやめて、三本線のみ表示。開閉時は×に変形。 */
.nav-toggle {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
/* モバイルのみ表示（PCは既存ナビを優先） */
@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
}
/* 三本線 */
.nav-toggle .nav-toggle-bar {
  display: block;
  width: 28px;
  height: 2px;
  margin: 4px auto;
  background: #333;
  transition: transform .2s ease, opacity .2s ease;
}
/* ×に変形 */
body.nav-open .nav-toggle .nav-toggle-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
body.nav-open .nav-toggle .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
body.nav-open .nav-toggle .nav-toggle-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}
/* クリックしやすさ（iOS対策） */
.nav-toggle { -webkit-tap-highlight-color: transparent; }
/* ========================================================================= */

/* ==== Responsive Navigation (Hamburger) v8 simple white =================== */
/* 白い三本線のみ、アニメーションなし */
.nav-toggle {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
}
.nav-toggle .nav-toggle-bar {
  display: block;
  width: 28px;
  height: 2px;
  margin: 5px auto;
  background: #fff; /* 白色 */
  transition: none !important; /* アニメーション無効 */
}
/* アニメーションは使わないので変形指定もリセット */
body.nav-open .nav-toggle .nav-toggle-bar {
  transform: none !important;
  opacity: 1 !important;
}
/* ========================================================================= */

/* ==== Responsive Navigation (Hamburger) v9 precise layout ================= */
/* 三本線が1本しか見えない問題の対策：位置を明示配置、競合ルールをリセット */
.nav-toggle {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  width: 44px;
  height: 44px;
  padding: 0;
  position: fixed;
  top: 1rem;
  right: 1rem;
  display: inline-block;
  z-index: 5000;
  -webkit-tap-highlight-color: transparent;
}
@media (min-width: 961px) {
  /* PCでは非表示 */
  .nav-toggle { display: none !important; }
}

/* 三本線の共通スタイル（強制リセット） */
.nav-toggle .nav-toggle-bar {
  position: absolute;           /* 位置を明示配置 */
  left: 50%;
  transform: translateX(-50%);  /* 中央寄せ */
  width: 26px;
  height: 2px;
  background: #ffffff !important;  /* 白線で固定 */
  opacity: 1 !important;
  transition: none !important;     /* アニメなし */
}

/* 3本を上下に等間隔で配置（中央基準 ±6px） */
.nav-toggle .nav-toggle-bar:nth-child(1) { top: calc(50% - 6px); }
.nav-toggle .nav-toggle-bar:nth-child(2) { top: 50%; }
.nav-toggle .nav-toggle-bar:nth-child(3) { top: calc(50% + 6px); }

/* 以前の「×に変形」指定の影響を排除 */
body.nav-open .nav-toggle .nav-toggle-bar {
  transform: translateX(-50%) !important;
  opacity: 1 !important;
}
/* ========================================================================= */

/* ==== Responsive Navigation (Hamburger) v10 focus+bg ====================== */
/* クリックで出る四角い枠を無効化（フォーカスアウトラインをカスタム） */
.nav-toggle {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
}
.nav-toggle:focus,
.nav-toggle:active {
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
}
/* Firefoxの内側フォーカスラインを消す */
.nav-toggle::-moz-focus-inner { border: 0; }

/* オーバーレイ背景を薄いグレーに（白だとアイコンが埋もれるため） */
@media (max-width: 960px) {
  body.nav-open nav.navigation,
  nav.navigation.is-open {
    /* 薄いグレー（やや透過） */
    background: rgba(245, 247, 250, 0.98) !important; /* #f5f7fa */
  }
}
/* ========================================================================= */

/* ==== Mobile submenu styling (ACHIEVEMENTS) =============================== */
@media (max-width: 960px) {
  /* サブメニューを持つ項目にインジケータ（▼） */
  nav.navigation li.has-sub > a {
    position: relative;

  }

  /* サブメニュー本体（div or ul） */
  nav.navigation li.has-sub > div,
  nav.navigation li.has-sub > ul {
    display: none;
    margin: .5rem auto 0;
    width: min(90%, 520px);
    text-align: left;
    background: rgba(0,0,0,0.08);    /* 薄いグレーのカード */
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    padding: .5rem;
  }
  nav.navigation li.sub-open > div,
  nav.navigation li.sub-open > ul {
    display: block;
  }

  /* サブメニューの各リンク */
  nav.navigation li.has-sub > div a,
  nav.navigation li.has-sub > ul a {
    display: block;
    padding: .8rem 1rem;
    margin: .1rem 0;
    border-radius: 8px;
    background: rgba(255,255,255,0.65);
    color: #0f172a !important;
    font-weight: 600;
  }
  nav.navigation li.has-sub > div a:hover,
  nav.navigation li.has-sub > ul a:hover,
  nav.navigation li.has-sub > div a:focus,
  nav.navigation li.has-sub > ul a:focus {
    background: rgba(255,255,255,0.9);
    text-decoration: none;
  }
}
/* ========================================================================= */

/* ==== Submenu styles v12 ================================================== */
/* 共通 */
nav.navigation li { position: relative; }
nav.navigation .submenu { display: none; }

/* モバイル（オーバーレイ内） */
@media (max-width: 960px) {
  nav.navigation li.has-sub > a {
    position: relative;
  }

  nav.navigation li.sub-open > .submenu { display: block; }

  nav.navigation .submenu {
    margin: .6rem auto 0;
    width: min(92%, 560px);
    background: rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    padding: .4rem;
    text-align: left;
  }
  nav.navigation .submenu a {
    display: block; padding: .9rem 1rem; margin: .1rem 0;
    border-radius: 8px;
    background: rgba(255,255,255,0.7);
    color: #0f172a !important; font-weight: 600; text-decoration: none;
  }
  nav.navigation .submenu a:hover, nav.navigation .submenu a:focus {
    background: rgba(255,255,255,0.92);
  }
}

/* デスクトップ（通常ナビにドロップダウン） */
@media (min-width: 961px) {
  nav.navigation li.has-sub:hover > .submenu,
  nav.navigation li.has-sub:focus-within > .submenu,
  nav.navigation li.sub-open > .submenu {
    display: block;
  }
  nav.navigation .submenu {
    position: absolute; top: calc(100% + .6rem);
    left: 50%; transform: translateX(-50%);
    min-width: 240px; max-width: 480px;
    background: rgba(245,247,250,0.98);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    padding: .4rem;
    z-index: 3000;
  }
  nav.navigation .submenu a {
    display: block; padding: .7rem 1rem; margin: .1rem 0;
    color: #0f172a !important; text-decoration: none; font-weight: 600;
    border-radius: 8px;
    background: transparent;
  }
  nav.navigation .submenu a:hover, nav.navigation .submenu a:focus {
    background: rgba(0,0,0,0.06);
  }
}
/* ========================================================================= */

/* ==== Click Dropdown Submenu v13 ========================================= */
/* 親にアイコン（▼/▲）を表示 */
nav.navigation li.has-sub > a {
  position: relative;

}

/* サブメニューのベース（非表示） */
nav.navigation .submenu { display: none; }

/* モバイルのオーバーレイ時（中央縦メニューの下にカード表示） */
@media (max-width: 960px) {
  nav.navigation li.sub-open > .submenu { display: block; }
  nav.navigation .submenu {
    margin: .6rem auto 0;
    width: min(92%, 560px);
    background: rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    padding: .4rem;
    text-align: left;
  }
  nav.navigation .submenu a {
    display: block; padding: .9rem 1rem; margin: .1rem 0;
    border-radius: 8px; background: rgba(255,255,255,0.7);
    color: #0f172a !important; font-weight: 600; text-decoration: none;
  }
  nav.navigation .submenu a:hover, nav.navigation .submenu a:focus {
    background: rgba(255,255,255,0.92);
  }
}

/* デスクトップ（ナビの下にドロップダウン） */
@media (min-width: 961px) {
  nav.navigation li { position: relative; }
  nav.navigation li.sub-open > .submenu { display: block; }
  nav.navigation .submenu {
    position: absolute;
    top: calc(100% + .6rem);
    left: 50%;
    transform: translateX(-50%);
    min-width: 240px; max-width: 480px;
    background: rgba(245,247,250,0.98);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    padding: .4rem;
    z-index: 3000;
  }
  nav.navigation .submenu a {
    display: block; padding: .7rem 1rem; margin: .1rem 0;
    color: #0f172a !important; text-decoration: none; font-weight: 600;
    border-radius: 8px;
  }
  nav.navigation .submenu a:hover, nav.navigation .submenu a:focus {
    background: rgba(0,0,0,0.06);
  }
}
/* ========================================================================= */

/* ==== Dropdown v15 resets & styles ======================================= */
/* Reset legacy pseudo decorations inside overlay menu */
@media (max-width: 960px) {
  nav.navigation a::before,
  nav.navigation a::after {
    content: none !important;
    display: none !important;
    border: 0 !important;
    box-shadow: none !important;
    background: none !important;
  }
}

/* Base hidden submenu */
nav.navigation .submenu { display: none; }

/* Mobile overlay: accordion card */
@media (max-width: 960px) {
  nav.navigation li.sub-open > .submenu { display: block; }
  nav.navigation .submenu {
    margin: .6rem auto 0;
    width: min(92%, 560px);
    background: rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    padding: .4rem;
    text-align: left;
  }
  nav.navigation .submenu a {
    display: block; padding: .9rem 1rem; margin: .1rem 0;
    border-radius: 8px; background: rgba(255,255,255,0.7);
    color: #0f172a !important; font-weight: 600; text-decoration: none;
  }
  nav.navigation .submenu a:hover, nav.navigation .submenu a:focus {
    background: rgba(255,255,255,0.92);
  }
}

/* Desktop dropdown */
@media (min-width: 961px) {
  nav.navigation li { position: relative; }
  nav.navigation li.sub-open > .submenu { display: block; }
  nav.navigation .submenu {
    position: absolute;
    top: calc(100% + .6rem);
    left: 50%;
    transform: translateX(-50%);
    min-width: 240px; max-width: 480px;
    background: rgba(245,247,250,0.98);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    padding: .4rem;
    z-index: 3000;
  }
  nav.navigation .submenu a {
    display: block; padding: .7rem 1rem; margin: .1rem 0;
    color: #0f172a !important; text-decoration: none; font-weight: 600;
    border-radius: 8px; background: transparent;
  }
  nav.navigation .submenu a:hover, nav.navigation .submenu a:focus {
    background: rgba(0,0,0,0.06);
  }
}
/* ========================================================================== */

/* allow click */
}
/* ========================================================================== */

/* デフォルトは非表示（デスクトップでは▼/▲を出さない） */

/* ハンバーガー（オーバーレイ）を開いている時だけ表示 */
@media (max-width: 960px) {
  body.nav-open
}
/* ========================================================================== */

/* ==== v19: submenu clean (no arrows) ===================================== */
/* base: hide all submenus by default */
nav.navigation .submenu,
nav.navigation .dropdown-content {
  display: none;
}

/* mobile (overlay): show as accordion when parent has .sub-open */
@media (max-width: 960px) {
  nav.navigation li.sub-open > .submenu,
  nav.navigation li.sub-open > .dropdown-content {
    display: block;
  }
  nav.navigation .submenu,
  nav.navigation .dropdown-content {
    margin: .6rem auto 0;
    width: min(92%, 560px);
    background: rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    padding: .4rem;
    text-align: left;
  }
  nav.navigation .submenu a,
  nav.navigation .dropdown-content a {
    display: block; padding: .9rem 1rem; margin: .1rem 0;
    border-radius: 8px; background: rgba(255,255,255,0.7);
    color: #0f172a !important; font-weight: 600; text-decoration: none;
  }
  nav.navigation .submenu a:hover, nav.navigation .submenu a:focus,
  nav.navigation .dropdown-content a:hover, nav.navigation .dropdown-content a:focus {
    background: rgba(255,255,255,0.92);
  }
}

/* desktop: dropdown under parent when .sub-open */
@media (min-width: 961px) {
  nav.navigation li { position: relative; }
  nav.navigation li.sub-open > .submenu,
  nav.navigation li.sub-open > .dropdown-content {
    display: block;
  }
  nav.navigation .submenu,
  nav.navigation .dropdown-content {
    position: absolute;
    top: calc(100% + .6rem);
    left: 50%;
    transform: translateX(-50%);
    min-width: 240px; max-width: 480px;
    background: rgba(245,247,250,0.98);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    padding: .4rem;
    z-index: 3000;
  }
  nav.navigation .submenu a,
  nav.navigation .dropdown-content a {
    display: block; padding: .7rem 1rem; margin: .1rem 0;
    color: #0f172a !important; text-decoration: none; font-weight: 600;
    border-radius: 8px; background: transparent;
  }
  nav.navigation .submenu a:hover, nav.navigation .submenu a:focus,
  nav.navigation .dropdown-content a:hover, nav.navigation .dropdown-content a:focus {
    background: rgba(0,0,0,0.06);
  }
}
/* ======================================================================== */

/* ==== v20 submenu display control (works for .dropdown-content and .submenu) === */
nav.navigation .submenu,
nav.navigation .dropdown-content { display: none; }

/* mobile overlay: accordion */
@media (max-width: 960px) {
  nav.navigation li.sub-open > .submenu,
  nav.navigation li.sub-open > .dropdown-content { display: block; }
}

/* desktop dropdown */
@media (min-width: 961px) {
  nav.navigation li { position: relative; }
  nav.navigation li.sub-open > .submenu,
  nav.navigation li.sub-open > .dropdown-content { display: block; }
}
/* ============================================================================ */

/* === Desktop hover: open ACHIEVEMENTS submenu without click =============== */
@media (min-width: 961px) {
  nav.navigation li.dropdown:hover > .dropdown-content,
  nav.navigation li.has-sub:hover > .dropdown-content,
  nav.navigation li.sub-open > .dropdown-content {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }
  /* Ensure dropdown content overlays hero etc. */
  nav.navigation .dropdown-content {
    position: absolute;
    z-index: 3000;
  }
}
/* ========================================================================= */

/* === Normalize ACHIEVEMENTS trigger (.dropbtn) to match nav links ========= */
nav.navigation .dropbtn {
  font: inherit !important;
  font-weight: inherit !important;
  letter-spacing: inherit !important;
  color: inherit !important;
  text-decoration: none !important;
  background: none;
  border: 0;
  padding: 0;
}
nav.navigation .dropbtn:hover,
nav.navigation .dropbtn:focus {
  text-decoration: underline;
}
/* ========================================================================= */

/* === Mobile dropdown: use flow layout so it doesn't overlap next items ==== */
@media (max-width: 960px) {
  nav.navigation li.dropdown,
  nav.navigation li.has-sub {
    position: static !important;
  }
  nav.navigation .dropdown-content {
    position: static !important;
    display: none;
    background: transparent !important;
    box-shadow: none !important;
    min-width: auto !important;
    padding: 0 !important;
    margin: 0.25rem 0 0.5rem 0 !important;
    z-index: auto !important;
  }
  nav.navigation li.sub-open > .dropdown-content {
    display: block !important;
  }
  nav.navigation .dropdown-content a {
    display: block;
    padding: 0.5rem 1rem;
  }
}
/* ========================================================================= */

/* === Unify navigation font (anchor and span/dropbtn) ====================== */
nav.navigation {
  font-family: geom-graphic, sans-serif !important;
  font-weight: 400 !important;
  letter-spacing: -0.01em;
}
/* Ensure both <a> and .dropbtn look identical */
nav.navigation a,
nav.navigation .dropbtn {
  font-family: inherit !important;
  font-weight: inherit !important;
  letter-spacing: inherit !important;
  text-decoration: none;
}
/* ========================================================================== */

/* === Unify navigation font-size for .dropbtn and <a> ====================== */
nav.navigation a,
nav.navigation .dropbtn {
  font-size: 0.9rem !important; /* match index.html anchors */
  line-height: 1.5 !important;
}
/* ========================================================================== */
