@charset "utf-8";
@import "normalize.css";

/* ============================================================
   Design Tokens
   ============================================================ */
:root {
  /* Brand */
  --green:       #087B02;
  --green-dark:  #065801;
  --green-pale:  #f0f7f0;
  --green-mid:   #c8e6c9;

  /* Text */
  --text-1:  #111827;
  --text-2:  #4b5563;
  --text-3:  #9ca3af;

  /* Surfaces */
  --bg:      #ffffff;
  --bg-2:    #f9fafb;
  --bg-3:    #f3f4f6;

  /* Borders */
  --border:  #e5e7eb;
  --border-2: #d1d5db;

  /* Elevation */
  --shadow-xs: 0 1px 2px rgba(0,0,0,.05);
  --shadow-sm: 0 1px 4px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,.09), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.12), 0 4px 8px rgba(0,0,0,.04);

  /* Shape */
  --r:    10px;
  --r-sm: 6px;
  --r-lg: 16px;

  /* Motion */
  --ease: cubic-bezier(.4, 0, .2, 1);
  --t:    200ms;

  /* Layout */
  --max-w: 1120px;
  --pad:   clamp(16px, 4vw, 40px);

  /* Font */
  --font: "游ゴシック", YuGothic, "メイリオ", Meiryo, "ヒラギノ角ゴ ProN", "Hiragino Kaku Gothic ProN", "ヒラギノ角ゴ Pro", "Hiragino Kaku Gothic Pro", sans-serif;
}

/* ============================================================
   Reset
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden; /* iOS Safari は body 側を無視するため html 側にも必要 */
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.8;
  color: var(--text-1);
  background: var(--bg);
  overflow-x: hidden;
  overflow-wrap: break-word;
  word-break: break-word;
  -webkit-font-smoothing: antialiased;
}

img    { max-width: 100%; height: auto; display: block; }
video  { max-width: 100%; height: auto; display: block; }
iframe { max-width: 100%; }

/* ============================================================
   Layout
   ============================================================ */
#container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* ============================================================
   Links
   ============================================================ */
a { color: var(--green); text-decoration: none; transition: color var(--t) var(--ease); }
a:hover { color: var(--green-dark); text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 2px; }

/* ============================================================
   Header
   ============================================================ */
#header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 4px solid var(--green-dark);
  border-bottom: none;
  box-shadow: var(--shadow-sm);
}

/* Extend header bg to full viewport width */
#header::before {
  content: '';
  position: absolute;
  inset: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  background: inherit;
  border-bottom: inherit;
  z-index: -1;
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* 1行目：ロゴ + 機関ロゴ + 言語切替 */
.header-row-top {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0 10px;
}

.header-logos {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-shrink: 0;
  margin-right: 16px;
}
.header-logos a { display: flex; align-items: center; }
.header-logos img {
  height: 62px;
  width: auto;
  display: block;
  transition: opacity var(--t) var(--ease);
}
.header-logos a:hover img { opacity: .75; }

.site-logo {
  flex: 1;
  display: flex;
  align-items: center;
  text-decoration: none;
  min-width: 0;
}
.site-logo img {
  height: 58px;
  width: auto;
  display: block;
  max-width: 100%;
  transition: opacity var(--t) var(--ease);
}
.site-logo:hover img { opacity: .8; }
.site-logo:hover { text-decoration: none; }

/* 2行目：ナビ（グリーン帯） */
.header-row-nav {
  background: var(--green);
}

.site-nav { display: flex; }

ul#menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0;
  width: 100%;
}

ul#menu li { flex: 1; text-align: center; }

ul#menu li a {
  display: block;
  padding: 12px 8px;
  font-size: 15.5px;
  font-weight: 600;
  color: rgba(255,255,255,.88);
  border-radius: 0;
  white-space: nowrap;
  position: relative;
  transition: color var(--t) var(--ease), background var(--t) var(--ease);
}
ul#menu li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background: rgba(255,255,255,.9);
  border-radius: 3px 3px 0 0;
  transition: width var(--t) var(--ease);
}
ul#menu li a:link,
ul#menu li a:visited { color: rgba(255,255,255,.88); text-decoration: none; }
ul#menu li a:hover,
ul#menu li a:active {
  color: #fff;
  background: rgba(255,255,255,.14);
  text-decoration: none;
}
ul#menu li a:hover::after { width: 60%; }
ul#menu li a[aria-current="page"] {
  color: #fff;
  background: rgba(255,255,255,.18);
}
ul#menu li a[aria-current="page"]::after {
  width: 60%;
}

/* Language switch */
.lang-switch {
  display: flex;
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  overflow: hidden;
  flex-shrink: 0;
}
.lang-btn {
  display: inline-block;
  padding: 7px 17px;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: .07em;
  color: var(--text-2);
  transition: color var(--t) var(--ease), background var(--t) var(--ease);
  text-decoration: none;
}
.lang-btn:link,
.lang-btn:visited { color: var(--text-2); }
.lang-btn:hover { color: var(--green); background: var(--green-pale); text-decoration: none; }
.lang-btn + .lang-btn { border-left: 1px solid var(--border-2); }
.lang-active,
.lang-active:link,
.lang-active:visited { background: var(--green); color: #fff; }
.lang-active:hover { background: var(--green-dark); color: #fff; }

/* Lang switch in hamburger menu (hidden on PC) */
.lang-switch-nav { display: none; }

/* Nav bilingual labels (hidden on PC, shown in mobile menu) */
.nav-en { display: none; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: 48px;
  height: 48px;
  padding: 0;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color var(--t) var(--ease);
}
.nav-toggle:hover { border-color: var(--green); }
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-1);
  border-radius: 2px;
  transition: transform var(--t) var(--ease), opacity var(--t) var(--ease);
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ============================================================
   Hero (home page)
   ============================================================ */
.hero {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  max-width: 1080px;
  overflow: hidden;
  display: block;
  margin-top: 24px;
  margin-bottom: 0;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(0,0,0,.62) 0%,
    rgba(0,0,0,.38) 55%,
    transparent 100%
  );
  display: flex;
  align-items: center;
}

.hero-text {
  padding: 0 clamp(24px, 8vw, 96px);
  color: #fff;
  max-width: 640px;
}

.hero-label {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.7);
  margin: 0 0 14px;
}

.hero-title {
  font-size: clamp(26px, 3.8vw, 46px);
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 14px;
  text-shadow: 0 1px 4px rgba(0,0,0,.3);
}

.hero-sub {
  font-size: clamp(16px, 1.8vw, 20px);
  color: rgba(255,255,255,.82);
  margin: 0 0 0 1.5rem;
  font-weight: 500;
}

/* ============================================================
   Home page grid
   ============================================================ */
.home-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 48px;
  padding: 48px 0 56px;
}

.home-about h3 svg,
.news-heading svg {
  flex-shrink: 0;
}

.home-about h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  padding: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--green);
  border-bottom: 2px solid var(--green);
  border-left: none;
}

#about {
  padding: 14px 16px;
  background: var(--bg-2);
  border-left: 3px solid var(--green);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  margin-bottom: 24px;
  font-size: 14px;
  line-height: 1.85;
  color: var(--text-1);
}
#about p { margin: 0; text-indent: 0; text-align: justify; }

#contact {
  padding: 14px 16px;
  border-left: 3px solid var(--border);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: 14px;
  color: var(--text-2);
}
#contact p { margin: 0; text-indent: 0; }

/* News */
.home-news { display: flex; flex-direction: column; gap: 32px; }

.news-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  padding: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--green);
  border-bottom: 2px solid var(--green);
  border-left: none;
}

.news-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 320px;
  overflow-y: auto;
}

.topics-list { max-height: none; }

.news-block { position: relative; }

.scroll-hint {
  position: absolute;
  bottom: 40px;
  right: -32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.4s;
}

.scroll-hint-label {
  font-size: 11px;
  color: var(--text-2, #888);
  letter-spacing: 0.15em;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.scroll-hint-arrow {
  position: relative;
  display: block;
  width: 14px;
  height: 32px;
  color: var(--text-2, #888);
  animation: scroll-hint-bounce 1.4s ease-in-out infinite;
}

/* | : 1本の縦シャフト線 */
.scroll-hint-arrow::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 1.5px;
  height: 100%;
  background: currentColor;
}

/* / : シャフトの先端から伸びる斜め線（片側のみ） */
.scroll-hint-arrow::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 10px;
  height: 1.5px;
  background: currentColor;
  transform-origin: 0% 50%;
  transform: rotate(-45deg);
}

@keyframes scroll-hint-bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(4px); }
}

.news-item {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  line-height: 1.55;
  background-image: none;
}
.news-item:last-child { border-bottom: none; }

.news-date {
  flex-shrink: 0;
  width: 6.5em;
  font-size: 14px;
  font-weight: 600;
  color: var(--green);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.news-body { color: var(--text-1); }
a.news-body:hover { color: var(--green); }

/* ============================================================
   Footer
   ============================================================ */
#footer {
  position: relative;
  background: #fff;
  color: var(--text-2);
  margin-top: 48px;
  border-top: 3px solid var(--green);
}

#footer::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 100%;
  background: #fff;
  z-index: -1;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 48px var(--pad) 36px;
  display: flex;
  gap: 48px;
  justify-content: space-between;
  flex-wrap: wrap;
}

.footer-brand {
  max-width: 480px;
}

.footer-brand-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 16px;
}
.footer-brand-ja {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-1);
  letter-spacing: .05em;
  line-height: 1.2;
}
.footer-brand-en {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #fff;
  background: var(--green);
  padding: 3px 10px;
  border-radius: 2px;
  align-self: flex-start;
}

.footer-desc {
  font-size: 13px;
  line-height: 1.8;
  margin: 0 0 8px;
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  align-items: flex-start;
}

.footer-address {
  font-size: 14px;
  color: var(--text-3);
  margin: 0;
}

.footer-links {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad) 16px;
  margin-top: -140px;
  text-align: right;
}

.footer-links-heading {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 0 0 14px;
}


.footer-logos {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 24px;
}

.footer-logos a {
  display: inline-block;
  transition: opacity var(--t) var(--ease);
}

.footer-logos a:hover { opacity: .7; text-decoration: none; }

.footer-logos img {
  height: auto;
  width: auto;
  display: block;
}
/* tohoku_univ.gif: 137×186 portrait */
.footer-logos a:first-child img { height: 90px; }
/* riec.gif: 1494×454 wide */
.footer-logos a:last-child img  { height: 62px; }

.footer-bottom {
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 16px var(--pad);
  max-width: var(--max-w);
  margin: 0 auto;
}
.footer-bottom p {
  font-size: 14px;
  color: var(--text-3);
  margin: 0;
  text-indent: 0;
}

/* Page top button */
#page-top {
  display: none;
  position: fixed;
  z-index: 9999;
  bottom: 28px;
  right: 28px;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  background: #087B02;
  color: #fff;
  border-radius: 50%;
  border: none;
  box-shadow: 0 4px 12px rgba(0,0,0,.35);
  cursor: pointer;
  padding: 0;
}

#page-top:hover { background: #065801; text-decoration: none; color: #fff; }
#page-top svg { display: block; stroke: #fff; }

/* ============================================================
   Main content
   ============================================================ */
main {
  min-height: 480px;
  padding: 0 0 56px;
}

main h1 {
  margin: 32px 0 36px;
  padding: 0 0 18px;
  font-size: clamp(26px, 3.5vw, 34px);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-1);
  border-bottom: 3px solid var(--green);
}

/* ============================================================
   Headings
   ============================================================ */
h2 {
  margin: 36px 0 16px;
  padding: 11px 16px 11px 18px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  background: var(--bg-2);
  border-left: 4px solid var(--green);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  clear: both;
  color: var(--text-1);
}

h2.top {
  margin: 0;
  padding: 11px 16px;
  background: var(--bg-2);
  border-left: 4px solid var(--green);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: 16px;
  background-image: none;
}

h3 {
  margin: 24px 0 12px;
  padding: 4px 0 4px 12px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  border-left: 3px solid var(--green);
  color: var(--text-1);
}

h4 {
  margin: 14px 0 8px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
}

/* ============================================================
   Text
   ============================================================ */
p {
  margin: 6px 0 6px 4px;
  padding: 0;
  text-indent: .8em;
}

p.noindent { text-indent: 0; }

/* ============================================================
   Lists
   ============================================================ */
ul {
  margin: 6px 0 6px 16px;
  padding: 0;
}

ul li {
  list-style: none;
  padding: 3px 0 3px 18px;
  background-position: 0 9px;
  background-image: url(../image/li.png);
  background-repeat: no-repeat;
  background-size: 10px 10px;
}

li ul { margin: 4px 0 0 4px; }

ol {
  margin: 6px 0 6px 24px;
  padding: 0;
}
ol li { margin: 0; padding: 3px 0; }
li ol { margin: 4px 0 0 16px; }

/* ============================================================
   Table
   ============================================================ */
table {
  padding: 0;
  margin: 12px 0;
  border-collapse: collapse;
}

table th {
  border: 1px solid var(--border);
  padding: 10px 14px;
  font-weight: 600;
  text-align: center;
  background: var(--bg-2);
  font-size: 15px;
}

table td {
  border: 1px solid var(--border);
  padding: 10px 14px;
  font-size: 15px;
}

table.noborder th,
table.noborder td { border: none; }

table.center { margin: 12px auto; }

table.color {
  width: 100%;
  margin: 12px 0 28px;
  border-collapse: collapse;
}

table.color th {
  border: none;
  border-bottom: 1px solid rgba(159,195,224,.5);
  padding: 11px 16px;
  font-weight: 600;
  text-align: left;
  background: #9fc3e0;
  color: #fff;
  font-size: 15px;
}

table.color td {
  padding: 11px 16px;
  border: none;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}

table.color tr:nth-child(odd) { background: var(--bg-2); }

table.color tr td:first-of-type {
  vertical-align: top;
  color: var(--text-2);
  font-size: 13px;
}

/* ============================================================
   Figure
   ============================================================ */
figure { margin: 12px 0; }
figure.center { margin: 12px auto; text-align: center; }
figure.fr { float: right; margin: 0 0 8px 16px; }
figure.fl { float: left; margin: 0 16px 8px 0; }
figure img { margin: 3px 0; border-radius: var(--r-sm); }

figcaption {
  font-size: .82em;
  line-height: 1.3;
  padding: 4px 4px 0;
  color: var(--text-2);
  text-align: center;
}

/* ============================================================
   Utility
   ============================================================ */
a.pdf {
  background: url(../image/ic_pdf.png) right center no-repeat;
  padding-right: 24px;
  background-size: 18px 18px;
}
a.blank {
  background: url(../image/ic_blank.png) right center no-repeat;
  padding-right: 22px;
  background-size: 16px 15px;
}

img.ic { vertical-align: middle; }

.mb0  { margin-bottom: 0   !important; }
.mb05 { margin-bottom: 5px !important; }
.mb10 { margin-bottom: 10px !important; }
.mb15 { margin-bottom: 15px !important; }
.mb20 { margin-bottom: 20px !important; }
.mb25 { margin-bottom: 25px !important; }
.mb30 { margin-bottom: 30px !important; }
.mb40 { margin-bottom: 40px !important; }
.mt0  { margin-top: 0   !important; }
.mt05 { margin-top: 5px !important; }
.mt10 { margin-top: 10px !important; }
.mt15 { margin-top: 15px !important; }
.mt20 { margin-top: 20px !important; }
.mt25 { margin-top: 25px !important; }
.mt30 { margin-top: 30px !important; }

.w10  { width: 10%; } .w15  { width: 15%; } .w20  { width: 20%; }
.w25  { width: 25%; } .w30  { width: 30%; } .w35  { width: 35%; }
.w40  { width: 40%; } .w50  { width: 50%; } .w60  { width: 60%; }
.w70  { width: 70%; } .w80  { width: 80%; } .w90  { width: 90%; }
.w100 { width: 100%; }
.pc-w30 { width: 30%; }
.pc-fr  { float: right; margin: 0 0 12px 20px; }
@media (max-width: 768px) {
  .pc-w30 { width: 90%; }
  .pc-fr  { float: none; margin: 12px auto; }
  figure.fl.w15 {
    float: none;
    width: 40%;
    margin: 0 auto 16px;
    display: block;
    text-align: center;
  }
  .members_r {
    float: none !important;
    width: 100% !important;
  }
}

.clear  { clear: both; }
.center { text-align: center; text-indent: 0; }
.center video { display: block; margin: 0 auto; }
.right  { text-align: right; }
.left   { text-align: left; }
.small  { font-size: .85em; }

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
  clear: both;
}

blockquote {
  margin: 6px 0;
  padding: 8px 16px;
  border-left: 3px solid var(--border);
  color: var(--text-2);
}
blockquote p { text-indent: 0; margin: 0; }

/* ============================================================
   Publications nav
   ============================================================ */
.pub-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 24px 0 40px;
}

.pub-nav-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--green);
  text-decoration: none;
  transition: background var(--t) var(--ease), border-left-color var(--t) var(--ease);
}
.pub-nav-item:hover {
  background: var(--green-pale);
  border-left-color: var(--green-dark);
  text-decoration: none;
}

.pub-nav-num {
  font-size: 18px;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.pub-nav-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pub-nav-en {
  display: block;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.3;
}

.pub-nav-ja {
  display: block;
  font-size: 13px;
  color: var(--text-3);
  line-height: 1.3;
}

/* ============================================================
   Year dial nav
   ============================================================ */
.year-dial {
  display: flex;
  justify-content: center;
  margin: 32px 0 48px;
  user-select: none;
}

.year-dial-track {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  background: var(--bg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

/* 矢印と年リストをまとめるグループ */
.dial-group {
  display: flex;
  align-items: stretch;
}

/* スライド展開する年リスト */
.dial-years {
  display: flex;
  align-items: stretch;
  max-width: 0;
  overflow: hidden;
  transition: max-width 400ms cubic-bezier(.4,0,.2,1);
}

.dial-group-prev:hover .dial-years,
.dial-group-next:hover .dial-years {
  max-width: min(800px, 40vw);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
.dial-group-prev:hover .dial-years::-webkit-scrollbar,
.dial-group-next:hover .dial-years::-webkit-scrollbar { display: none; }

/* 各年リンク */
.dial-year-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-3);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.03em;
  transition: background var(--t) var(--ease), color var(--t) var(--ease);
}
.dial-years-prev .dial-year-link { border-right: 1px solid var(--border); }
.dial-years-next .dial-year-link { border-left:  1px solid var(--border); }
.dial-year-link:link,
.dial-year-link:visited { color: var(--text-3); text-decoration: none; }
.dial-year-link:hover,
.dial-year-link:active {
  background: var(--bg-3);
  color: var(--text-1);
  text-decoration: none;
}

/* 現在年度（中央・塗りつぶし） */
.dial-center {
  display: flex;
  align-items: center;
  padding: 0 28px;
  background: var(--green);
}

.dial-year {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

/* 矢印ボタン */
.dial-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 46px;
  color: var(--text-3);
  background: transparent;
  transition: background var(--t) var(--ease), color var(--t) var(--ease);
  flex-shrink: 0;
  text-decoration: none;
}
.dial-arrow:link,
.dial-arrow:visited { color: var(--text-3); text-decoration: none; }
.dial-arrow:hover,
.dial-arrow:active {
  background: var(--bg-2);
  color: var(--green);
  text-decoration: none;
}

.dial-arrow.dial-disabled {
  color: var(--border);
  cursor: default;
  pointer-events: none;
}

/* PC: ダイヤル表示 / スマホ: 非表示 */
.year-dial--pc { display: flex; }
.year-strip--sp { display: none; }

/* ============================================================
   Year select nav — スマホ専用
   ============================================================ */
.year-select-wrap {
  margin: 24px auto 40px;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.year-select-inner {
  position: relative;
  display: flex;
  align-items: center;
  width: min(280px, 80vw);
  background: #fff;
  border: 1.5px solid var(--border-2);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.year-select-inner:focus-within {
  border-color: var(--green);
  box-shadow: var(--shadow-sm), 0 0 0 3px rgba(8,123,2,.15);
}

/* 左：カレンダーアイコン */
.year-select-cal {
  position: absolute;
  left: 14px;
  display: flex;
  align-items: center;
  color: var(--green);
  pointer-events: none;
  flex-shrink: 0;
}

/* 右：シェブロン */
.year-select-chevron {
  position: absolute;
  right: 14px;
  display: flex;
  align-items: center;
  color: var(--text-3);
  pointer-events: none;
  flex-shrink: 0;
}

.year-select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  padding: 14px 44px;
  border: none;
  background: transparent;
  color: var(--text-1);
  font-size: 18px;
  font-weight: 800;
  font-family: inherit;
  text-align: center;
  cursor: pointer;
  outline: none;
}

/* スマホ用切り替え */
@media (max-width: 768px) {
  .year-dial--pc { display: none; }
  .year-strip--sp { display: flex; justify-content: center; flex-direction: column; align-items: center; }
}

/* ============================================================
   Events / Photos  — wall gallery (JS制御)
   ============================================================ */
.photo_frame {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 80%;
  margin: 12px auto 28px;
  align-items: flex-start;
  overflow: visible;
  padding: 8px 4px;
}

.photo { text-align: center; width: auto; margin: 0; display: block; }

img.photo {
  display: block;
  border-radius: 2px;       /* 写真プリントらしく角をわずかに丸める */
  /* JSロード前のfallback */
  width: calc(50% - 4px);
  height: auto;
  object-fit: unset;
}

/* 1枚表示の写真フレーム（研究室風景など） */
.photo_frame--single {
  display: block;
  max-width: 520px;
}
.photo_frame--single img.photo {
  width: 100%;
  height: auto;
  transform: none !important;
  box-shadow: var(--shadow-md);
}

dl.event {
  scroll-margin-top: 162px;
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 12px 16px 12px 20px;
  font-size: 15px;
  font-weight: 700;
  background: var(--bg-2);
  border-left: 4px solid var(--green);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  clear: both;
  margin-bottom: 6px !important;
  line-height: 1.4;
}

dl.event dt {
  float: none;
  clear: none;
  color: var(--green);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

dl.event dd { margin: 0; font-size: 18px; }

/* ============================================================
   Annual Timeline (for_students) — 横向き 4ヶ月×段
   上段: 学習系イベント・期間バー  ／  軸: 月バッジ＋横ライン  ／  下段: イベント系
   ============================================================ */
.annual-tl { margin: 32px 0 0; }

.annual-tl-band {
  display: flex;
  flex-direction: column;
  margin-bottom: 56px;
}
.annual-tl-band:last-child { margin-bottom: 0; }
.annual-tl-band + .annual-tl-band {
  border-top: 1px solid var(--border);
  padding-top: 56px;
}

.atl-top, .atl-top-periods, .atl-axis, .atl-bottom {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.annual-tl-band--3col .atl-top,
.annual-tl-band--3col .atl-top-periods,
.annual-tl-band--3col .atl-axis,
.annual-tl-band--3col .atl-bottom {
  grid-template-columns: repeat(3, 1fr);
}
/* Band 1: 2-4月 (4月のみ広め) */
.annual-tl-band--b1 .atl-top,
.annual-tl-band--b1 .atl-axis,
.annual-tl-band--b1 .atl-bottom {
  grid-template-columns: 1fr 1fr 2fr;
}
/* 4月の中間発表を右端へ寄せる (arrow が第1子なので cell は 2..4) */
.annual-tl-band--b1 .atl-top > .atl-cell:last-child {
  align-items: flex-end;
}
/* お花見をやや右寄せ */
.annual-tl-band--b1 .atl-bottom > .atl-cell:nth-child(3) {
  transform: translateX(15%);
}

/* Band 2: 写真→ボックス→矢印→イベント→軸→下段 */
.annual-tl-band--b2 .atl-top { position: relative; }
.annual-tl-band--b2 .atl-top-periods {
  justify-content: space-between;
  align-items: center;
}
.atl-period-group--photo {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
}
/* 研修最終発表・研修打ち上げを6月末位置に */
.annual-tl-band--b2 .atl-top > .atl-cell:nth-child(4) {
  transform: translateX(50%);
}
.annual-tl-band--b2 .atl-bottom > .atl-cell:nth-child(2) {
  transform: translateX(50%);
}
/* 大学院入学試験・院試打ち上げを右端に */
.annual-tl-band--b2 .atl-top > .atl-cell:last-child {
  align-items: flex-end;
}
.annual-tl-band--b2 .atl-bottom > .atl-cell:last-child {
  align-items: flex-end;
}
/* FPGA+英語読み合わせ 矢印: バンド左端 → 研修最終発表 */
.annual-tl-band--b2 .atl-arrow-fpga {
  position: absolute;
  left: -1%;
  right: 58%;
  bottom: 12px;
  top: auto;
  transform: none;
  width: auto;
  flex: none;
  margin: 0;
}
/* サイドチャネル+院試休み 矢印: 研修最終発表 → 大学院入学試験 */
.annual-tl-band--b2 .atl-arrow-sca {
  position: absolute;
  left: 57%;
  right: 13%;
  bottom: 12px;
  width: auto;
  flex: none;
  margin: 0;
}
/* Band 3: 卒業研修テーマ決定・サマーセミナーを右寄せ、芋煮会も右寄せ */
.annual-tl-band:nth-child(3) > .atl-top > .atl-cell:nth-child(2) {
  transform: translateX(50%);
}
.annual-tl-band:nth-child(3) > .atl-bottom > .atl-cell:first-child {
  transform: translateX(50%);
}
.annual-tl-band:nth-child(3) > .atl-bottom > .atl-cell:nth-child(2) {
  transform: translateX(50%);
}
.annual-tl-band:nth-child(3) > .atl-bottom > .atl-cell:nth-child(3) {
  transform: translateX(60%);
}
/* Band 3: 研究ボックスの高さを詰め、矢印中央に配置 */
.annual-tl-band:nth-child(3) .atl-period-box {
  min-height: auto;
}
.annual-tl-band:nth-child(3) > .atl-top-periods {
  justify-content: flex-start;
  padding-left: 58%;
  margin-bottom: -4px;
}
/* Band 3: 研究の矢印 (卒業研修テーマ決定→卒論中間発表) */
.annual-tl-band:nth-child(3) > .atl-top { position: relative; }
.annual-tl-band:nth-child(3) .atl-arrow-research {
  position: absolute;
  left: 35%;
  right: 13%;
  bottom: 12px;
  top: auto;
  transform: none;
  width: auto;
  flex: none;
  margin: 0;
}
.annual-tl-band:nth-child(3) > .atl-top > .atl-cell:last-child {
  align-items: flex-end;
}
.annual-tl-band:nth-child(3) > .atl-bottom > .atl-cell:last-child {
  align-items: flex-end;
}
/* Band 4: 研究の矢印 (1月→卒論最終発表) */
.annual-tl-band--3col > .atl-top { position: relative; }
.annual-tl-band--3col .atl-arrow-research {
  position: absolute;
  left: 5%;
  right: 24%;
  bottom: 12px;
  top: auto;
  transform: none;
  width: auto;
  flex: none;
  margin: 0;
}
/* プログラミング輪講～プロセッサ設計演習の共有矢印を
   研修テーマ決定（2月中央）→研修中間発表（4月右端）にスパン */
.annual-tl-band--b1 .atl-top { position: relative; }
.annual-tl-band--b1 .atl-period-arrow--full {
  position: absolute;
  left: 20%;
  right: 13%;
  top: 50%;
  transform: translateY(-50%);
  width: auto;
  flex: none;
  margin: 0;
}

.atl-top    { align-items: end; min-height: 36px; }
.atl-bottom { align-items: start; }

.atl-period-group {
  display: flex;
  flex-direction: row;
  gap: 18px;
  flex: 1 1 0;
  justify-content: center;
  align-items: stretch;
}

.atl-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
}

/* 期間バー位置指定ユーティリティ (col-start/end は 1-indexed の列番号) */
.atl-c1-2 { grid-column: 1 / 2; } .atl-c1-3 { grid-column: 1 / 3; } .atl-c1-4 { grid-column: 1 / 4; } .atl-c1-5 { grid-column: 1 / 5; }
.atl-c2-3 { grid-column: 2 / 3; } .atl-c2-4 { grid-column: 2 / 4; } .atl-c2-5 { grid-column: 2 / 5; }
.atl-c3-4 { grid-column: 3 / 4; } .atl-c3-5 { grid-column: 3 / 5; }
.atl-c4-5 { grid-column: 4 / 5; }
.atl-r1 { grid-row: 1; } .atl-r2 { grid-row: 2; } .atl-r3 { grid-row: 3; } .atl-r4 { grid-row: 4; }

/* 期間バー（上段：横一列・全枠統一サイズ） */
.atl-top-periods {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 10px 18px;
  padding: 4px 8px 2px;
  /* grid 解除 */
  grid-template-columns: none;
}
.atl-period {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  flex: 0 0 200px;
  width: 200px;
  margin: 0;
  /* grid 配置クラスは無効化 */
  grid-column: auto !important;
  grid-row: auto !important;
}
.atl-period-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  background: none;
  border: none;
  padding: 8px 12px;
  width: 100%;
  min-height: 96px;
  box-sizing: border-box;
}
.atl-period-arrow {
  position: relative;
  height: 2px;
  background: #000;
  order: 99; /* ボックスの下＝月軸側 */
  margin-right: 10px;
}
.atl-period-arrow--full {
  flex: 0 0 100%;
  width: 100%;
  margin: 4px 14px 0 6px;
}
.atl-period-arrow::after {
  content: '';
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-left: 9px solid #000;
}
.atl-period-title {
  display: inline-block;
  background: var(--green, #4a8);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 999px;
  flex-shrink: 0;
}
.atl-period-tag {
  font-size: 10px;
  font-weight: 600;
  color: var(--green, #4a8);
  flex-shrink: 0;
}
/* Band 4: 研究ラベルを矢印の直上に疑似要素で表示 */
.annual-tl-band--3col .atl-arrow-research::before {
  content: '研究';
  position: absolute;
  bottom: 30px;
  left: 50%;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: var(--green, #4a8);
  padding: 2px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
html[lang="en"] .annual-tl-band--3col .atl-arrow-research::before {
  content: 'Research';
}
.atl-period-desc {
  font-size: 12px;
  color: #444;
  line-height: 1.45;
  flex: 1 1 100%;
  margin: 0;
}

/* 軸：月バッジ＋横ライン */
.atl-axis {
  position: relative;
  align-items: center;
  margin: 2px 0 6px;
}
.atl-axis::before {
  content: '';
  position: absolute;
  left: 0; right: 0;
  top: 50%;
  height: 2px;
  background: var(--green);
  transform: translateY(-50%);
  z-index: 0;
}
.atl-month {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  margin: 0 auto;
  box-shadow: 0 0 0 4px var(--bg), 0 0 0 6px var(--green);
  position: relative;
  z-index: 1;
  text-align: center;
  line-height: 1.3;
}

.atl-event {
  font-weight: 700;
  font-size: 15px;
  color: var(--text-1);
  text-align: center;
  margin: 0;
  text-indent: 0;
  line-height: 1.35;
}
.atl-photo {
  display: block;
  width: 150px;
  height: 150px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--green-pale), var(--green-mid));
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,.85);
  box-shadow:
    0 6px 20px rgba(0,0,0,.13),
    0 2px 6px rgba(0,0,0,.08),
    inset 0 2px 4px rgba(255,255,255,.5);
}
.atl-connector {
  width: 2px;
  height: 10px;
  background: repeating-linear-gradient(to bottom, var(--green-mid) 0 4px, transparent 4px 8px);
  opacity: .6;
}

/* EN版: 矢印はテキストと同じ高さ(JP版と同じ bottom:12px)に揃え，
   EN の長いイベント名と被るため矢印の端を内側に縮める */
html[lang="en"] .annual-tl-band--b1 .atl-period-arrow--full {
  top: auto;
  bottom: 12px;
  transform: none;
  left: 22%;
  right: 23%;
}
/* Band 2: Training Final Presentation (中央 ~38-62%) と
   Graduate School Entrance Exam (右端 ~74-100%) を避けるよう矢印を短縮 */
html[lang="en"] .annual-tl-band--b2 .atl-arrow-fpga { right: 64%; }
html[lang="en"] .annual-tl-band--b2 .atl-arrow-sca { left: 64%; right: 27%; }
/* Band 3: Thesis Interim Presentation (右端 ~78-100%) を避けて短縮 */
html[lang="en"] .annual-tl-band:nth-child(3) .atl-arrow-research { right: 24%; }
/* Band 4: Thesis Final Presentation (中央 ~72-95%) を避けて短縮 */
html[lang="en"] .annual-tl-band--3col .atl-arrow-research { right: 30%; }

@media (max-width: 900px) {
  .annual-tl { display: none; }
  .annual-tl-sp { display: block; }
}
@media (min-width: 901px) {
  .annual-tl-sp { display: none; }
}

/* ============================================================
   Annual Timeline SP — 縦型 (スマホ専用)
   ============================================================ */
.annual-tl-sp {
  margin: 24px 0 0;
  position: relative;
}
/* 縦ライン（中央・緑） */
.annual-tl-sp::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--green);
}
/* 月ノード */
.vtl-month {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0 16px;
  align-items: start;
  margin-bottom: 28px;
}
.vtl-month:last-child { margin-bottom: 0; }
/* 月ラベル（中央バッジ） */
.vtl-month-label {
  grid-column: 2;
  grid-row: 1;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  background: var(--green);
  border-radius: 999px;
  padding: 4px 14px;
  text-align: center;
  z-index: 1;
  white-space: nowrap;
}
/* 左カラム */
.vtl-left {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  text-align: right;
}
/* 右カラム */
.vtl-right {
  grid-column: 3;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.vtl-event {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
}
/* マイルストーン（黒矢印で繋がるイベント） */
.vtl-milestone {
  font-weight: 800;
}
.vtl-period {
  display: inline-block;
  background: var(--green);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  line-height: 1.4;
  white-space: nowrap;
}
.vtl-desc {
  font-size: 12px;
  color: var(--text-2);
  margin: 0;
  line-height: 1.5;
}
.vtl-photo {
  width: 100%;
  max-width: 180px;
  border-radius: 4px;
  margin-top: 4px;
  box-shadow: var(--shadow-sm);
}
.vtl-left .vtl-photo {
  margin-left: auto;
}
/* spacing helpers */
.vtl-mt-md  { margin-top: 18px; }
.vtl-mt-lg  { margin-top: 56px; }
.vtl-pt-md  { padding-top: 40px; }

/* EN — 長いラベルでカラム幅が広がって黒矢印に被るのを防ぐ */
html[lang="en"] .vtl-month {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}
html[lang="en"] .vtl-period {
  white-space: normal;
}


/* ============================================================
   Members
   ============================================================ */
ul.timeline { margin: 6px 0; padding: 0; }
.timeline > li {
  overflow: hidden;
  margin: 0; padding: 0;
  position: relative;
  list-style: none;
  background-image: none;
}
.timeline p { margin: 0; padding: .75em 0; text-indent: 0; }

.timeline-date {
  width: 12%;
  float: left;
  color: var(--text-3);
  font-size: 13px;
}
.timeline-content {
  width: 83%;
  float: left;
  border-left: 2px solid var(--border);
  padding-left: 4%;
}
.timeline-content::before {
  content: '';
  width: 9px; height: 9px;
  background: var(--green);
  position: absolute;
  left: calc(12% - 3.5px);
  top: 18px;
  border-radius: 50%;
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 1.5px var(--green);
}

.members_r { width: 80%; float: right; }

dt { font-weight: 700; float: left; clear: both; }
dd { margin-left: 120px; margin-bottom: 6px; }

/* ============================================================
   Details / Summary
   ============================================================ */
details { width: 100%; }

details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 0 0 12px;
  padding: 10px 16px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-2);
  list-style: none;
  transition:
    background var(--t) var(--ease),
    border-color var(--t) var(--ease),
    color var(--t) var(--ease);
}
details > summary::after {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform var(--t) var(--ease);
  flex-shrink: 0;
  margin-bottom: 3px;
}
details[open] > summary::after {
  transform: rotate(-135deg);
  margin-bottom: -3px;
}
details > summary:hover {
  background: var(--green-pale);
  border-color: var(--green);
  color: var(--green);
}
details > summary::-webkit-details-marker { display: none; }

/* ============================================================
   Misc content styling
   ============================================================ */
.style1 {
  color: var(--green);
  font-weight: 600;
  font-size: 13px;
  display: block;
  margin-bottom: 2px;
}

/* Old home page IDs (kept for compatibility) */
#about_contact, #about_contact_e { }
#news, #news_e { }
#top { display: none; }

/* ============================================================
   Responsive — Tablet (≤ 900px)
   ============================================================ */
@media (max-width: 900px) {
  .home-grid {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 36px 0 48px;
  }

  /* モバイルの表示順：News → About us → Contact */
  .home-news  { order: -1; }

  /* photo_frame はJSが制御するためここでは指定なし */
}

/* ============================================================
   Responsive — Mobile nav (≤ 1080px)
   ============================================================ */
@media (max-width: 1080px) {
  .nav-toggle { display: flex; }
  .lang-switch { display: none; }
  .header-logos { display: none; }

  /* フルスクリーン半透明パネル */
  .site-nav {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    min-height: calc(100vh - 70px);
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 2px solid var(--green);
    padding: 20px 8% 28px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: none;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      opacity .4s cubic-bezier(0.4, 0.4, 0.1, 1),
      visibility .4s cubic-bezier(0.4, 0.4, 0.1, 1);
  }
  .site-nav.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  /* メニューリスト */
  ul#menu {
    flex-direction: column;
    gap: 0;
    padding: 0;
    align-items: flex-start;
  }

  /* 各アイテム：スタガーアニメーション */
  ul#menu li {
    width: 100%;
    text-align: left;
    flex: none;
    opacity: 0;
    transform: translateY(18px);
    transition:
      opacity .45s cubic-bezier(0.4, 0.4, 0.1, 1),
      transform .45s cubic-bezier(0.4, 0.4, 0.1, 1);
  }
  .site-nav.is-open ul#menu li           { opacity: 1; transform: none; }
  .site-nav.is-open ul#menu li:nth-child(1) { transition-delay: .06s; }
  .site-nav.is-open ul#menu li:nth-child(2) { transition-delay: .10s; }
  .site-nav.is-open ul#menu li:nth-child(3) { transition-delay: .14s; }
  .site-nav.is-open ul#menu li:nth-child(4) { transition-delay: .18s; }
  .site-nav.is-open ul#menu li:nth-child(5) { transition-delay: .22s; }
  .site-nav.is-open ul#menu li:nth-child(6) { transition-delay: .26s; }
  .site-nav.is-open ul#menu li:nth-child(7) { transition-delay: .30s; }
  .site-nav.is-open ul#menu li:nth-child(8) { transition-delay: .34s; }

  /* 区切り線 */
  ul#menu li:not(.lang-switch-nav) { border-bottom: 1px solid var(--border); }
  ul#menu li:not(.lang-switch-nav):first-child { border-top: 1px solid var(--border); }

  /* リンク：デスクトップスタイルをリセット */
  ul#menu li:not(.lang-switch-nav) a,
  ul#menu li:not(.lang-switch-nav) a:link,
  ul#menu li:not(.lang-switch-nav) a:visited {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 7px 0;
    background: none;
    color: var(--text-1);
    text-decoration: none;
    border-radius: 0;
    white-space: normal;
    position: relative;
    transition: color .4s cubic-bezier(0.4, 0.4, 0.1, 1);
  }

  ul#menu li:not(.lang-switch-nav) a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--green);
    border-radius: 0;
    transform: scaleX(0);
    transform-origin: 100% 50%;
    transition: transform .5s cubic-bezier(0.4, 0.4, 0.1, 1);
  }
  /* ::before はデスクトップで使わないのでリセット */
  ul#menu li:not(.lang-switch-nav) a::before { display: none; }

  ul#menu li:not(.lang-switch-nav) a:hover,
  ul#menu li:not(.lang-switch-nav) a:active {
    color: var(--green);
    background: none;
    text-decoration: none;
  }
  ul#menu li:not(.lang-switch-nav) a:hover::after {
    transform: scaleX(1);
    transform-origin: 0% 50%;
  }
  ul#menu li:not(.lang-switch-nav) a[aria-current="page"] { color: var(--green); }
  ul#menu li:not(.lang-switch-nav) a[aria-current="page"]::after {
    transform: scaleX(1);
    transform-origin: 0% 50%;
  }

  /* 日本語メインラベル */
  .nav-ja {
    font-size: clamp(17px, 4.5vw, 22px);
    font-weight: 700;
    letter-spacing: .04em;
    line-height: 1.2;
  }

  /* 英語サブラベル */
  .nav-en {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .16em;
    color: var(--text-3);
    text-transform: uppercase;
    transition: color .4s cubic-bezier(0.4, 0.4, 0.1, 1);
  }
  ul#menu li:not(.lang-switch-nav) a:hover .nav-en,
  ul#menu li:not(.lang-switch-nav) a[aria-current="page"] .nav-en {
    color: var(--green-mid);
  }

  /* JP/EN切替 */
  .lang-switch-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px 0 4px;
    border-top: none;
    margin-top: 0;
  }
  .lang-switch-nav .lang-btn {
    display: inline-block;
    padding: 8px 0;
    width: 64px;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .14em;
    border-radius: 999px;
    border: 1.5px solid var(--border-2);
    background: transparent;
    color: #000;
    text-decoration: none;
    transition: border-color .3s var(--ease), color .3s var(--ease), background .3s var(--ease);
  }
  ul#menu .lang-switch-nav .lang-btn:link,
  ul#menu .lang-switch-nav .lang-btn:visited {
    color: #333;
    border-color: var(--border-2);
  }
  .lang-switch-nav .lang-btn:hover {
    border-color: var(--green);
    color: var(--green);
    background: var(--green-pale);
  }
  .lang-switch-nav .lang-active,
  .lang-switch-nav .lang-active:link,
  .lang-switch-nav .lang-active:visited {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
  }
  .lang-switch-nav .lang-active:hover {
    background: var(--green-dark);
    border-color: var(--green-dark);
    color: #fff;
  }
}

@media (max-width: 768px) {
  .header-inner { gap: 12px; }
  .site-logo img { height: auto; width: min(100%, 360px); }

  /* モバイルはヘッダーを固定 */
  #header { position: fixed; top: 0; left: 0; right: 0; width: 100%; }
  #container { padding-top: var(--header-h, 100px); }

  .pub-nav { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .hero { height: auto; position: relative; left: 50%; transform: translateX(-50%); width: 100vw; margin-bottom: 0; }
  .hero-img { width: 100%; height: auto; display: block; }
  .hero-overlay { display: none; }

  /* page-topボタン：モバイル向け位置・サイズ調整 */
  #page-top {
    bottom: 24px;
    right: 20px;
    width: 52px;
    height: 52px;
  }
}

/* ============================================================
   Responsive — Mobile (≤ 540px)
   ============================================================ */
.sp-block { display: inline; }
@media (max-width: 768px) {
  .sp-block { display: block; }
}

@media (max-width: 540px) {
  /* Publications nav — mobile refinement */
  .pub-nav {
    grid-template-columns: 1fr;
    gap: 0;
    margin: 20px 0 32px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    border: 1px solid var(--border);
  }
  .pub-nav-item {
    gap: 12px;
    padding: 14px 16px;
    border: none;
    border-left: none;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    position: relative;
    background: var(--bg-2);
  }
  .pub-nav-item:last-child {
    border-bottom: none;
  }
  .pub-nav-item::after {
    content: "\203A";
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    font-weight: 300;
    color: var(--text-3);
    transition: color var(--t) var(--ease), transform var(--t) var(--ease);
  }
  .pub-nav-item:hover::after,
  .pub-nav-item:active::after {
    color: var(--green);
    transform: translateY(-50%) translateX(2px);
  }
  .pub-nav-item:active {
    background: var(--green-pale);
  }
  .pub-nav-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--green);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
  }
  .pub-nav-en {
    font-size: 15px;
  }
  .pub-nav-ja {
    font-size: 12px;
  }

  dl.event { flex-direction: column; gap: 4px; }

  .timeline-date { width: 100%; float: none; padding-bottom: 2px; }
  .timeline-content {
    width: 100%;
    float: none;
    border-left: none;
    border-top: 2px solid var(--border);
    padding-left: 0;
    padding-top: 6px;
  }
  .timeline-content::before { display: none; }

  #footer { margin-top: 32px; }
  .footer-inner {
    flex-direction: column;
    gap: 20px;
    padding: 28px var(--pad) 24px;
  }
  .footer-links { margin-top: 0; padding-bottom: 24px; text-align: center; }

  /* footer説明文・住所：最長行が一行に収まるサイズに統一 */
  .footer-desc { font-size: clamp(8px, 2.5vw, 13px); }
  .footer-desc span { white-space: nowrap; }
  .footer-address { font-size: clamp(8px, 2.5vw, 13px); }

  /* Related Links：スマホでは全体的に小さく */
  .footer-links-heading { font-size: 11px; margin-bottom: 8px; }
  .footer-logos { gap: 16px; }
  .footer-logos a:first-child img { height: 56px; }
  .footer-logos a:last-child img  { height: 36px; }

  /* Copyright：一行に収まるサイズに */
  .footer-bottom p { font-size: clamp(8px, 2.3vw, 14px); white-space: nowrap; }

  /* テーブルは横スクロール可能なブロックに */
  table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* 地図iframeをアスペクト比維持でレスポンシブに（map-frameクラスのみ対象） */
  figure.map-frame { position: relative; padding-bottom: 50%; height: 0; overflow: hidden; }
  figure.map-frame iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
}

/* ============================================================
   Members page
   ============================================================ */
.members-section {
  padding: 0 0 48px;
}

.members-group {
  margin-bottom: 44px;
}

.group-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.group-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-3);
  white-space: nowrap;
  flex-shrink: 0;
}

.group-header::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.members-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: 10px;
  row-gap: 16px;
}

.members-grid--wide {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.member-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.member-card--linked {
  cursor: pointer;
}

.member-card--linked .member-name {
  white-space: nowrap;
}
.member-card--linked .member-name::after {
  content: ' →';
  font-size: 1em;
  font-weight: 900;
  opacity: 0.85;
  transition: opacity var(--t) var(--ease);
}

.member-card--linked:hover .member-name::after {
  opacity: 1;
}

.member-card--linked:hover .member-name {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
}

.member-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--green);
  line-height: 1.35;
  min-height: calc(17px * 1.35);
}

.member-name-en {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-3);
  margin-top: 2px;
  letter-spacing: 0.02em;
}

.member-role {
  font-size: 14px;
  color: var(--text-3);
  margin-top: 5px;
  font-weight: 500;
}

.member-card a {
  color: inherit;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
}

.member-card a:hover { color: var(--green); text-decoration: none; }

@media (max-width: 540px) {
  .members-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .members-grid--wide {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }
}

/* ============================================================
   404 Error Page
   ============================================================ */
.error-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 100px 0 80px;
  gap: 48px;
}

.error-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.error-code {
  font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
  font-size: clamp(64px, 12vw, 120px);
  font-weight: 700;
  color: var(--green);
  line-height: 1;
  letter-spacing: -0.02em;
  opacity: 0.15;
}

.error-title {
  margin: 0;
  padding: 0;
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 700;
  color: var(--text-1);
  border: none;
  text-align: center;
}

.error-title-sep {
  margin: 0 10px;
  color: var(--border-2);
  font-weight: 300;
}

.error-title-br { display: none; }

@media (max-width: 540px) {
  .error-title-br  { display: block; }
  .error-title-sep { display: none; }
  .error-main { padding-top: 24px; }
}

.error-message {
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.8;
  margin: 0;
}

.error-message-en {
  color: var(--text-3);
  font-size: 13px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.error-btn {
  display: inline-block;
  margin-top: 8px;
  padding: 10px 28px;
  background: var(--green);
  color: #fff;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background var(--t) var(--ease);
}
.error-btn:hover {
  background: var(--green-dark);
  color: #fff;
}

/* ============================================================ */
/* Inline style replacements (security: removed inline style="" attributes) */
.contact-email-img { height: 24px; width: auto; }
.privacy-divider { margin: 40px 0; }
.center-block { display: block; margin: 0 auto; }
figure.map-frame iframe { border: 0; }
.footer-bottom a { color: inherit; text-decoration: underline; font-size: 0.85em; }

@media print {
  #header, #footer, #page-top { display: none; }
}
