/* Koh Sugamata Personal Page Styles */
/* General Styles */
body {
  font-family: 'Noto Sans JP', 'Inter', sans-serif;
  line-height: 1.6;
  color: #FFFFFF;
  background-color: #f8f9fa;
}
/* Navigation */
.navbar {
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  transition: all 0.3s ease;
}
.navbar.scrolled {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 15px rgba(0,0,0,0.15);
}
.navbar.scrolled .nav-link { color: #fff; }
.navbar.scrolled .nav-link:hover {
  color: #007bff;
  background-color: #29207A;
}
.navbar.scrolled .logo { color: #fff; }
.navbar.scrolled .language-switcher { background: rgba(255, 255, 255, 0.2); color: #fff; }
.navbar.scrolled .language-switcher:hover { background: rgba(255, 255, 255, 0.3); }
.navbar.scrolled .hamburger span { background: #fff; }
.navbar .logo { font-size: 1.5rem; font-weight: 500; }
.nav-menu { display: flex; list-style: none; gap: 2rem; margin: 0; padding: 0; }
.nav-link { text-decoration: none; color: #333; font-weight: 500; transition: color 0.3s ease; }
.nav-link:hover { color: #007bff; }
/* === Fixed Header 対策：ヘッダー高をCSS変数で一元管理 === */
:root {
  --nav-h: 120px; /* 実際の高さに合わせて微調整 */
}
/* 本文全体をヘッダー分だけ押し下げる */
body {
  padding-top: var(--nav-h);
}
/* モバイルで高さが変わる場合はブレークポイントで上書き */
@media (max-width: 768px) {
  :root { --nav-h: 64px; }
}
/* セクションアンカーの食い込み対策（Fixed Header Offset） */
section,
.contact-anchor {
  scroll-margin-top: calc(var(--nav-h) + 20px); /* 余白を少し足すと見やすい */
}
/* すべての SNS アイコン <i> に色を継承させる */
.nav-social-link i {
  color: inherit;
  transition: color .3s ease;
}
/* ホバー（白背景時） */
.nav-social-link:hover i {
  color: #007bff;
}
/* スクロール後（ダーク背景）通常色 */
.navbar.scrolled .nav-social-link i {
  color: #fff;
}
/* ホバー（ダーク背景時） */
.navbar.scrolled .nav-social-link:hover i {
  color: #9ec5ff;
}
/* 必要ならハンバーガー同様にアイコンだけを白化したいとき：
 （Font Awesome のブランドアイコンは文字扱いなので color 指定で十分です。
  もしアイコン画像に変える場合は filter: invert(1); を使います） */
/* .navbar.scrolled .nav-social-link i { color: #fff; } */

/* Home Section */
.home {
  padding: 80px 0 80px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  min-height: 100vh;
  display: flex;
  align-items: center;
}
.profile-section { display: flex; align-items: center; gap: 3rem; margin-bottom: 4rem; }
.profile-image { flex-shrink: 0; }
.profile-image img {
  width: 200px; height: 200px; border-radius: 50%;
  object-fit: cover; border: 5px solid rgba(255,255,255,0.3);
}
.profile-info h1 { font-size: 3rem; margin-bottom: 0.5rem; }
.profile-title { font-size: 1.5rem; margin-bottom: 0.5rem; opacity: 0.9; }
.profile-affiliation { font-size: 1.1rem; opacity: 0.8; }
/* News Section */
.news-section {
  background: rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 2rem;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
}
.news-section h2 { color: white; margin-bottom: 1.5rem; text-align: center; }
.news-scroll-container { height: 320px; overflow-y: auto; overflow-x: hidden; position: relative; border-radius: 10px; background: rgba(255,255,255,0.95); padding: 1rem; }
.news-item { background: white; padding: 1.5rem; margin-bottom: 1rem; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); border-left: 4px solid #007bff; }
.news-date { color: #007bff; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.5rem; }
.news-content h4 { margin: 0 0 0.5rem 0; color: #333; }
.news-content p { margin: 0; color: #666; }
/* Section Headers */
.section-header { text-align: center; margin-bottom: 3rem; }
.section-title { font-size: 2.5rem; color: #333; margin-bottom: 1rem; position: relative; }
.section-title::after { content: ''; display: block; width: 60px; height: 3px; background: #007bff; margin: 1rem auto; }
/* Content Sections */
.about, .research, .publication, .presentation, .link { padding: 80px 0; background: white; }
.about:nth-child(even), .research:nth-child(even), .publication:nth-child(even),
.presentation:nth-child(even), .link:nth-child(even) { background: #f8f9fa; }
/* About Section */
.about-text h3 { color: #333; margin-bottom: 1rem; font-size: 1.5rem; border-bottom: 2px solid #007bff; padding-bottom: 0.5rem; }
.about-text ul { list-style: none; padding: 0; }
.about-text li { padding: 0.5rem 0; border-left: 3px solid #007bff; padding-left: 1rem; margin-bottom: 0.5rem; }
/* Career Timeline */
.career-timeline { position: relative; padding-left: 30px; }
.career-timeline::before { content: ''; position: absolute; left: 0; top: 0; height: 100%; width: 3px; background: #007bff; }
.career-item { position: relative; margin-bottom: 2rem; background: white; padding: 1.5rem; border-radius: 10px; box-shadow: 0 3px 15px rgba(0,0,0,0.1); }
.career-item::before { content: ''; position: absolute; left: -37px; top: 20px; width: 15px; height: 15px; border-radius: 50%; background: #007bff; border: 3px solid white; }
.career-year { font-size: 1.2rem; font-weight: bold; color: #007bff; margin-bottom: 0.5rem; }
.career-content strong { color: #333; font-size: 1.1rem; }
/* Research Section */
.research-item { background: white; padding: 2rem; border-radius: 15px; box-shadow: 0 5px 20px rgba(0,0,0,0.1); margin-bottom: 2rem; border-left: 5px solid #28a745; }
.research-item h4 { color: #28a745; margin-bottom: 1rem; font-size: 1.3rem; }
.research-image { margin: 1.5rem 0; text-align: center; }
.research-image img { max-width: 100%; height: auto; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.15); transition: transform 0.3s ease; }
.research-image img:hover { transform: scale(1.02); }
.highlight-item { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 1.5rem; border-radius: 15px; margin-bottom: 1.5rem; box-shadow: 0 5px 20px rgba(0,0,0,0.2); }
.highlight-item h4 { margin-bottom: 1rem; font-size: 1.2rem; }
.method-tags { display: flex; flex-wrap: wrap; gap: 1rem; }
.method-tag { background: #007bff; color: white; padding: 0.5rem 1rem; border-radius: 25px; font-size: 0.9rem; font-weight: 500; transition: all 0.3s ease; }
.method-tag:hover { background: #0056b3; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,123,255,0.3); }
/* Publication Section */
.publication-year { margin-bottom: 3rem; }
.publication-year h3 { color: #007bff; margin-bottom: 1.5rem; font-size: 1.5rem; border-bottom: 2px solid #007bff; padding-bottom: 0.5rem; }
.paper-item { background: white; padding: 1.5rem; border-radius: 10px; box-shadow: 0 3px 15px rgba(0,0,0,0.1); margin-bottom: 1.5rem; border-left: 4px solid #ffc107; transition: all 0.3s ease; }
.paper-item:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,0.15); }
.paper-authors { font-weight: 600; color: #333; margin-bottom: 0.5rem; font-size: 1rem; }
.paper-title {
  font-style: italic;
  color: #000000;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  line-height: 1.4;
}
.paper-journal { color: #666; font-size: 0.9rem; margin-bottom: 0.3rem; }
.paper-doi { color: #007bff; font-size: 0.85rem; font-family: 'Courier New', monospace; }
.publication-note { background: #f8f9fa; padding: 1.5rem; border-radius: 10px; text-align: center; margin-top: 2rem; }
/* Presentation Section */
.presentation-year { margin-bottom: 2rem; }
.presentation-year h3 { color: #dc3545; margin-bottom: 1rem; }
.presentation-item { background: white; padding: 1.5rem; border-radius: 10px; box-shadow: 0 3px 15px rgba(0,0,0,0.1); margin-bottom: 1rem; border-left: 4px solid #dc3545; }
.presentation-title { font-weight: 600; color: #333; margin-bottom: 0.5rem; }
.presentation-event { color: #666; margin-bottom: 0.3rem; }
.presentation-date { color: #999; font-size: 0.9rem; }
/* Link Section */
.link-category { margin-bottom: 3rem; }
.link-category h3 { color: #6c757d; margin-bottom: 1.5rem; }
.link-item { margin-bottom: 1rem; }
.link-item a { display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none; color: #007bff; font-weight: 500; padding: 0.8rem 1.5rem; background: white; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); transition: all 0.3s ease; }
.link-item a:hover { background: #007bff; color: white; transform: translateY(-2px); box-shadow: 0 5px 20px rgba(0,123,255,0.3); }
/* Footer */
.footer { background: #343a40; color: white; padding: 3rem 0 1rem; }
.footer-content { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
.footer-info h3 { margin-bottom: 1rem; }
.footer-info p { margin-bottom: 0.5rem; }
.footer-bottom { text-align: center; padding-top: 2rem; border-top: 1px solid #555; color: #ccc; }
/* Back to Top Button */
.back-to-top {
  position: fixed; bottom: 2rem; right: 2rem; background: #007bff; color: white;
  border: none; border-radius: 50%; width: 50px; height: 50px; cursor: pointer;
  display: none; align-items: center; justify-content: center;
  box-shadow: 0 5px 20px rgba(0,123,255,0.3); transition: all 0.3s ease;
}
.back-to-top:hover { background: #0056b3; transform: translateY(-3px); }
.back-to-top.show { display: flex; }
/* Mobile Responsive */
@media (max-width: 768px) {
  .profile-section { flex-direction: column; text-align: center; }
  .profile-info h1 { font-size: 2rem; }
  .nav-menu { display: none; }
  .hamburger { display: block; }
  .section-title { font-size: 2rem; }
  .footer-content { grid-template-columns: 1fr; }
}
/* Container */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
/* Hamburger Menu (header default) */
.hamburger { display: none; flex-direction: column; cursor: pointer; }
.hamburger span { width: 25px; height: 3px; background: #333; margin: 3px 0; transition: 0.3s; }
.navbar.scrolled .hamburger span { background: #fff; }
/* Language Switcher Styles */
.language-switcher {
  position: fixed; top: 100px; right: 30px; z-index: 1001; display: flex;
  background: white; border-radius: 25px; box-shadow: 0 5px 20px rgba(0,0,0,0.1);
  overflow: hidden; border: 2px solid #007bff;
}
.lang-btn { background: transparent; border: none; padding: 10px 20px; cursor: pointer; font-weight: 600; font-size: 14px; transition: all 0.3s ease; color: #007bff; min-width: 80px; }
.lang-btn:hover { background: rgba(0,123,255,0.1); }
.lang-btn.active { background: #007bff; color: white; }
.lang-btn:first-child { border-radius: 23px 0 0 23px; }
.lang-btn:last-child { border-radius: 0 23px 23px 0; }
/* Responsive Language Switcher */
@media (max-width: 768px) {
  .language-switcher { top: auto; bottom: 80px; right: 20px; flex-direction: column; width: auto; }
  .lang-btn { border-radius: 0 !important; min-width: 60px; padding: 8px 16px; font-size: 12px; }
  .lang-btn:first-child { border-radius: 20px 20px 0 0 !important; }
  .lang-btn:last-child { border-radius: 0 0 20px 20px !important; }
}
/* Smooth scrolling */
html { scroll-behavior: smooth; }
.news-section .container{display:block !important;}
.link-content{display:flex; gap:2rem; flex-wrap:wrap;}
.link-category{flex:1; min-width:200px;}
/* ===== 研究テーマ：2列（PC/タブレット）、1列（スマホ） ===== */
.research-theme { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; align-items: stretch; }
.research-item { background: #fff; padding: 1.5rem; border-radius: 14px; box-shadow: 0 4px 10px rgba(0,0,0,0.08); transition: 0.25s ease; }
.research-item:hover { transform: translateY(-4px); box-shadow: 0 8px 18px rgba(0,0,0,0.12); }
@media (max-width: 640px) { .research-theme { grid-template-columns: 1fr; } }
/* ===== Publication 縦スクロール（固定高） ===== */
section.publication .container { display: block; }
.publication-scroll {
  height: 60vh; max-height: 70vh; overflow-y: auto; overflow-x: hidden;
  min-height: 0; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  background: #fff; border-radius: 12px; box-shadow: 0 1px 8px rgba(0,0,0,.06); padding-right: .25rem;
}
.publication-year h3 { position: sticky; top: 0; z-index: 1; background: #fff; padding: .25rem 0; border-bottom: 1px solid rgba(0,0,0,.06); }
.publication-scroll, .publication-scroll * { min-width: 0; word-break: break-word; overflow-wrap: anywhere; }
@media (max-width: 640px) { .publication-scroll { height: 70vh; max-height: 75vh; } }
/* ===== SNS ボタン ===== */
.social-buttons { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.social-btn {
  --size: 44px; width: var(--size); height: var(--size); display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; color: #fff; background: #333; box-shadow: 0 3px 10px rgba(0,0,0,.12);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease; text-decoration: none; border: 1px solid rgba(255,255,255,0.12);
}
.social-btn i { font-size: 1.1rem; line-height: 1; }
.social-btn .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.social-btn:hover, .social-btn:focus-visible { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.18); outline: none; }
.social-btn.ig { background: radial-gradient(circle at 30% 110%, #feda75, #d62976 40%, #962fbf 60%, #4f5bd5); }
.social-btn.x { background: #000; }
.social-btn.fb { background: #1877F2; }
footer .social-buttons .social-btn { --size: 40px; }
/* ===== Mobile Drawer (only for <=768px) ===== */
.mobile-nav {
  position: fixed; inset: 0; background: rgba(0,0,0,.35); backdrop-filter: blur(2px);
  z-index: 1000; opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
.mobile-nav.open { opacity: 1; pointer-events: auto; }
.mobile-nav-inner {
  position: absolute; top: 0; right: 0; height: 100%; width: min(80vw, 320px);
  background: #fff; box-shadow: -6px 0 20px rgba(0,0,0,.15); transform: translateX(100%);
  transition: transform .25s ease; padding: 80px 24px 24px;
}
.mobile-nav.open .mobile-nav-inner { transform: translateX(0); }
.mobile-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.mobile-nav a { display: block; padding: 12px 8px; color: #333; text-decoration: none; font-weight: 600; border-radius: 8px; transition: background .2s ease, color .2s ease; }
.mobile-nav a:focus-visible, .mobile-nav a:hover { background: #007bff; color: #fff; }
.hamburger.active span:nth-child(1){ transform: translateY(6px) rotate(45deg); }
.hamburger.active span:nth-child(2){ opacity: 0; }
.hamburger.active span:nth-child(3){ transform: translateY(-6px) rotate(-45deg); }
@media (min-width: 769px){ .mobile-nav { display: none; } }
.contact-anchor { height: 1px; }
/* ===== ▼ 今回の追記：ヘッダー整列＆スマホ時ニュース左上にハンバーガー ===== */
/* ヘッダー整列（PCでの見た目安定） */
.navbar .nav-wrapper{ display:flex; align-items:center; justify-content:space-between; }
/* スマホ限定：ニュース左上のハンバーガー配置 */
.mobile-news-hamburger{ display:none; }
@media (max-width: 768px){
  /* ヘッダーのハンバーガーは非表示（今回の要件） */
  .navbar .hamburger{ display:none !important; }
  .news-section{ position:relative; }
  .mobile-news-hamburger{
    display:inline-flex; position:absolute; top:10px; left:12px; z-index:1002;
    width:44px; height:36px; align-items:center; justify-content:center;
    padding:4px 6px; border-radius:8px; background:rgba(255,255,255,0.9);
    box-shadow:0 2px 10px rgba(0,0,0,0.10); cursor:pointer;
  }
  .mobile-news-hamburger span{
    display:block; width:26px; height:3px; background:#333; margin:4px 0; transition:.25s;
  }
  /* “×”アニメ */
  .mobile-news-hamburger.active span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
  .mobile-news-hamburger.active span:nth-child(2){ opacity: 0; }
  .mobile-news-hamburger.active span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }
}
/* ===== スマホ専用：言語切替ボタン風の固定ハンバーガー ===== */
.floating-hamburger{
  display: none; /* 既定は非表示（PC/タブレット） */
  position: fixed;
  z-index: 1002; /* 言語スイッチャー(1001)より上 */
  right: 20px;
  bottom: 20px; /* 言語スイッチャーと縦に重ならない位置 */
  width: 52px;
  height: 52px;
  border: 2px solid #007bff;
  background: #fff;
  color: #333;
  border-radius: 50%;
  box-shadow: 0 5px 20px rgba(0,0,0,.1);
  cursor: pointer;
  padding: 0;
}
.floating-hamburger span{
  display: block;
  width: 26px;
  height: 3px;
  background:#333;
  margin: 4px auto;
  transition: .25s;
}
/* “×”表示（開いたとき） */
.floating-hamburger.active span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.floating-hamburger.active span:nth-child(2){ opacity: 0; }
.floating-hamburger.active span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }
/* スマホだけ表示 ＆ 言語スイッチャーと良い間隔に */
@media (max-width: 768px){
  .floating-hamburger{ display: inline-flex; align-items:center; justify-content:center; }
  /* 言語スイッチャーは既に bottom:80px; right:20px に移動するCSSあり。 その直下(20px)に本ボタンが来る想定 */
}
/* ===== Home（白ベース・ミニマル版） ===== */
.home {
  padding: 120px 0 80px;
  background: #fff; /* 白ベースに */
  color: #2b2b2b; /* ダーク文字 */
  min-height: 100vh;
  display: flex;
  align-items: center;
}
/* 既存のグラデーション指定を打ち消し（保険） */
.home {
  background-image: none !important;
}
/* ヒーロー内コンテンツの最大幅と余白調整 */
.home .home-content {
  max-width: 1040px;
  margin: 0 auto;
}
/* プロフィールカード風 */
.profile-section {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2.4rem;
  margin-bottom: 2.8rem;
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}
/* プロフィール画像をよりフラットに */
.profile-image img {
  width: 172px;
  height: 172px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #fff;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}
/* 見出しのトーン調整 */
.profile-info h1 {
  color: #1f2937;
  font-weight: 600;
  margin-bottom: .25rem;
}
.profile-title { color: #374151; opacity: 1; }
.profile-affiliation {
  color: #000000;
}
/* ニュース枠：白ベースで統一感を出す */
.news-section {
  background: transparent; /* ホームと自然につなぐ */
  border-radius: 0;
  padding: 0;
  backdrop-filter: none;
  border: none;
}
.news-section h2 { color: #111827; }
.news-scroll-container {
  height: 320px;
  overflow-y: auto; /* ← 最終定義を明示 */
  overflow-x: hidden;
  position: relative;
  border-radius: 14px;
  background: #ffffff;
  padding: 1rem;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);
  scrollbar-width: thin; /* Firefox */
  scrollbar-color: rgba(0,0,0,.35) transparent;
}
/* 角丸＆細めのスクロールバー（Chrome/Edge/Safari） */
.news-scroll-container::-webkit-scrollbar {
  width: 10px;
}
.news-scroll-container::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 10px;
}
.news-scroll-container::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,.2);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.news-scroll-container:hover::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,.35);
}
.news-item {
  background: #fff;
  padding: 1.25rem 1.25rem 1.25rem 1rem;
  margin-bottom: .9rem;
  border-radius: 12px;
  box-shadow: none; /* 影は外側でまとめる */
  border: 1px solid rgba(0,0,0,0.05);
  border-left: 4px solid #007bff; /* アクセントはブルー */
}
.news-date { color: #2563eb; } /* 少し鮮やかに */
.news-content h4 { color: #1f2937; }
.news-content p { color: #4b5563; }
/* セクション見出しのアクセントは踏襲 */
.section-title {
  color: #111827;
}
/* ナビ（スクロール時）の見え方を白ヒーローに最適化 */
.navbar {
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}
.nav-link {
  color: #374151;
}
.nav-link:hover {
  color: #000000;
}
.navbar.scrolled {
  background: #0f172a; /* ダーク紺 */
  box-shadow: 0 2px 14px rgba(0,0,0,0.2);
}
.navbar.scrolled .nav-link,
.navbar.scrolled .logo { color: #fff; }
/* モバイル：カードの余白最適化 */
@media (max-width: 768px) {
  .profile-section {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 18px;
    border-radius: 14px;
  }
  .profile-image img {
    width: 148px; height: 148px;
  }
}
/* 研究ハイライト枠の文字色をすべて白に統一 */
.research .highlight-item {
  color: #fff;
}
/* リンクも白に（ホバーで少しトーンを上げる） */
.research .highlight-item a:link,
.research .highlight-item a:visited {
  color: #fff;
  text-decoration: underline; /* お好みで */
}
.research .highlight-item a:hover,
.research .highlight-item a:focus {
  color: #e6f0ff;
  text-decoration: underline;
}
/* 強調タグも白に（別ルールの上書き対策） */
.research .highlight-item em,
.research .highlight-item strong {
  color: #fff;
}
/* 見出しh4も確実に白に */
.research .highlight-item h4 {
  color: #fff;
}
/* ===== 研究タブ・UI ===== */
.tabbar {
  display: flex; gap: .5rem; flex-wrap: wrap;
  margin-bottom: 1rem;
}
.tablink {
  appearance: none; border: 1px solid rgba(0,0,0,.12);
  background: #fff; color: #333; font-weight: 600;
  padding: .5rem .9rem; border-radius: 999px;
  cursor: pointer; transition: .18s ease;
}
.tablink:hover, .tablink:focus-visible {
  background: #007bff; color: #fff; outline: none;
}
.tablink.active {
  background: #0f172a; color: #fff; border-color: #0f172a;
}
/* タブペイン（共通：縦スクロール、余白） */
.tabpanes {
  position: relative;
}
.tabpanel {
  display: none;
  max-height: 70vh; /* ← スクロール可能にする高さ */
  overflow: auto;
  overscroll-behavior: contain;
  background: #fff;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 1px 8px rgba(0,0,0,.06);
}
.tabpanel.show { display: block; }
/* タブ内見出しのメリハリ */
.tabpanel h3 { margin-top: .25rem; }
/* 既存の publication-scroll をタブ内で使う際の調整（高さを親に合わせる） */
.tabpanel .publication-scroll {
  height: 100%;
  max-height: none;
  padding-right: .25rem;
}
/* 小画面微調整 */
@media (max-width: 640px) {
  .tabpanel { max-height: 75vh; }
}
