/* 植物環境制御学研究室 デモサイト v3
   デザインは Figma「明治大学研究室サイト」実装版（AI）ページの改訂版トップ（Frame 626852 / 4642:2）。
   位置・寸法は Figma の 1440px 基準の実測値（figma-ref/r4/specs.json）を --u で画面幅に合わせて縮める。
   下層ページは同じ部品（芽の見出し・茶色の頭文字・大きく丸めた灰色の面・ツタ・土のフッター）で展開。 */

:root {
  /* 文字・ボタンの緑。白地 5.09・灰色の面 4.65 で、本文の目安（WCAG AA 4.5）を満たす */
  --green: #00802c;
  --green-dark: #006b26;
  /* Figma の緑。80px の英字見出しだけ（大きい文字は目安 3.0。ロゴは 2026-10-27 から --logo-green） */
  --green-brand: #009332;
  /* 茶色（2026-10-27 デザイナーの新しいトップ：英字の頭文字・芽の土・フッターの土）。下層ページのラベルも同じ色にそろえる */
  --brown: #68513a;
  /* 新しいロゴの濃い緑（ロゴの文字とフッターの温室の骨組みだけ） */
  --logo-green: #435d43;
  --ink: #001b09;
  --sub: #4b5a50;
  --panel: #f4f5f2;
  --line: #e2e6e0;
  --rule: #cccccc;
  --leaf-light: #b7d453;
  --white: #fff;
  --tbc: #fbe7a6;
  --en: "Jost", "Noto Sans JP", sans-serif;
  --jp: "Noto Sans JP", sans-serif;
  --radius: 24px;
  /* Figma の 1440px 基準を画面幅に合わせて縮める係数 */
  --u: calc(min(100vw, 1440px) / 1440);
  /* 1440px より広い画面で、面や写真を画面の端まで伸ばす量 */
  --bleed: max(0px, calc((100vw - 1440px) / 2));
  --ease: cubic-bezier(.22, .68, .18, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--white); color: var(--ink); font-family: var(--jp); font-weight: 500; font-size: 15px; line-height: 2; letter-spacing: .05em; -webkit-font-smoothing: antialiased; overflow-x: hidden; line-break: strict; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--green); }
a:hover { color: var(--green-dark); }
h1, h2, h3 { margin: 0; line-height: 1.5; font-weight: 700; text-wrap: balance; word-break: auto-phrase; }
p, li { text-wrap: pretty; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--leaf-light); outline-offset: 3px; border-radius: 4px; }
main > section, .site-footer { overflow-x: clip; }

.wrap { width: min(1200px, 100% - 64px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 40px); margin-inline: auto; }
.frame { position: relative; width: min(100%, 1440px); height: 100%; margin-inline: auto; }
.nowrap { display: inline-block; }
.nb { white-space: nowrap; }
/* 短い文は文節で折る（Chrome 系。Safari は通常の改行） */
.page-head .lead, .pub-title, .member-home .copy, .article .oneline, .papers { word-break: auto-phrase; text-wrap: pretty; }

/* 要確認の印（黄色い下線・「要確認」の札）は出さない（2026-10-27 岡本さん：確認の邪魔になる）。
   管理画面の下線の印（.tbc）は残っても見た目は普通の文になる */
.tbc { background: none; }
.tbc-note { display: none; }
.site-footer .tbc { background: none; border-bottom: 0; }

/* ---------- ロゴ（双葉＋土のマーク） ---------- */
/* ロゴ（2026-10-27 Figma「実装版（AI）2」新しいトップ 4711:5761 のヘッダー：マーク 64×67、間 11、文字 180×20、間 11、下の行 10px） */
.logo { display: inline-flex; flex-direction: column; align-items: center; gap: 11px; text-decoration: none; color: var(--logo-green); line-height: 14px; }
.logo-mark { width: 64px; height: 67px; }
.logo-text { display: flex; flex-direction: column; align-items: center; gap: 11px; }
.logo-en { display: block; width: 180px; height: auto; }
.logo-ja { font-size: 10px; font-weight: 500; letter-spacing: .12em; white-space: nowrap; }
/* 下層ページのヘッダーの横並びは Figma に無いので、今までの並べ方（マーク左・文字右、高さ 38）に合わせた */
.logo-h { flex-direction: row; gap: 10px; }
.logo-h .logo-mark { width: 36px; height: 38px; }
.logo-h .logo-text { align-items: flex-start; gap: 4px; }
.logo-h .logo-en { width: 135px; }
.logo-h .logo-ja { font-size: 10px; letter-spacing: .08em; }

/* ---------- ボタン（Figma の丸ボタン：padding 12/17、矢印は塗りの右向きを -45°） ---------- */
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 38.8px; padding: 12px 17px; border-radius: 999px; background: var(--green); color: var(--white); text-decoration: none; font-size: 14px; font-weight: 500; letter-spacing: .05em; line-height: 1; white-space: nowrap; transition: background .2s ease; }
.pill:hover { background: var(--green-dark); color: var(--white); }
.pill-wide { min-width: 148px; justify-content: space-between; gap: 16px; }
.pill-line { box-shadow: inset 0 0 0 1px var(--white); }
.pill-white { background: var(--white); color: var(--green); }
.pill-white:hover { background: #eaf5e3; color: var(--green-dark); }
.pill-back .arrow { transform: rotate(180deg); }
.arrow { width: 11px; height: 10px; margin: 2.4px 1.9px; flex: none; transform: rotate(-45deg); }
.text-link { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 700; font-size: 16px; text-decoration: none; }
.text-link .arrow { color: var(--green); }
.text-link:hover { color: var(--green); }

/* ---------- 見出し：英字は Jost Bold、頭文字だけ茶色（幹・土）。芽が生える ---------- */
.en-title { font-family: var(--en); font-weight: 700; font-size: clamp(48px, calc(80 * var(--u)), 80px); line-height: 1.45; letter-spacing: .05em; color: var(--green-brand); margin: 0; white-space: nowrap; }
.en-title .ini { color: var(--brown); }
.kicker { font-weight: 700; font-size: 17px; letter-spacing: .05em; color: var(--ink); line-height: 1.4; white-space: nowrap; }

/* 横組みの見出し（Research / Member / 下層ページ）：芽のアイコン＋小見出しを英字の左上に */
.h-head { --t: clamp(48px, calc(80 * var(--u)), 80px); position: relative; display: inline-block; font-size: var(--t); padding-top: .2em; }
.h-head .en-title { font-size: 1em; }
.h-head .sprout { position: absolute; left: .025em; top: -.075em; width: .5125em; height: .664em; }
.h-head .kicker { position: absolute; left: calc(var(--t) * .6); top: calc(var(--t) * .04); }

/* 縦組みの見出し（Topics / Publications / Gallery）：時計回りに90°、頭文字から芽が生える */
.v-head { --t: clamp(48px, calc(80 * var(--u)), 80px); position: absolute; font-size: var(--t); z-index: 3; }
.v-head .en-title { writing-mode: vertical-rl; font-size: 1em; }
.v-head .sprout-t { position: absolute; left: .99em; top: -.14em; width: .735em; height: .61em; }
.v-head .kicker { position: absolute; left: calc(var(--t) * 1.27); top: calc(var(--t) * .475); writing-mode: vertical-rl; text-orientation: sideways; }
.v-head .sprout { display: none; } /* スマホで横組みにしたときだけ使う */

/* ---------- ヘッダー（下層ページ） ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); transition: box-shadow .3s ease; }
.site-header.is-scrolled { box-shadow: 0 8px 24px rgba(0, 27, 9, .06); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; }
.gnav { display: flex; align-items: center; gap: 24px; }
.gnav a:not(.pill) { color: var(--green); text-decoration: none; font-size: 15px; font-weight: 700; letter-spacing: .04em; line-height: 1.7; padding: 4px 0; border-bottom: 2px solid transparent; }
.gnav a:not(.pill):hover, .gnav a[aria-current="page"] { border-bottom-color: var(--green); }
.menu-btn { display: none; align-items: center; justify-content: center; width: 48px; height: 48px; border: 0; border-radius: 999px; background: var(--green); cursor: pointer; }
.menu-btn svg { stroke: var(--white); }
.menu-btn .i-close, .menu-btn[aria-expanded="true"] .i-open { display: none; }
.menu-btn[aria-expanded="true"] .i-close { display: inline; }

/* ---------- トップ：FV（Figma 4642:3） ---------- */
.hero { position: relative; height: calc(879 * var(--u)); min-height: 520px; overflow: hidden; }
.hero-photo { position: absolute; left: 0; right: 0; top: calc(122 * var(--u)); bottom: 0; clip-path: ellipse(calc(850 * var(--u) + var(--bleed)) calc(577.5 * var(--u)) at 50% calc(577.5 * var(--u))); overflow: hidden; }
.hero-photo img { position: absolute; left: calc(var(--bleed) - 72 * var(--u)); top: calc(-174 * var(--u)); width: calc(1511.6 * var(--u)); height: calc(1007.8 * var(--u)); max-width: none; object-fit: cover; }
.home-head { position: absolute; inset: 0; z-index: 10; pointer-events: none; }
.home-head .frame { pointer-events: none; }
.home-head .frame > * { pointer-events: auto; }
.home-head h1 { position: absolute; left: calc(44 * var(--u)); top: max(24px, calc(32 * var(--u))); margin: 0; } /* Figma のロゴの枠は 42 だが、字の左端は 44 */
.home-head .gnav { position: absolute; right: calc(66.18 * var(--u)); top: max(24px, calc(45 * var(--u))); width: 140.8px; flex-direction: column; align-items: stretch; gap: 0; }
.home-head .gnav a:not(.pill) { display: block; text-align: center; font-size: 16px; font-weight: 700; line-height: 1.7; letter-spacing: .04em; padding: 0; margin-bottom: 11px; border: 0; }
.home-head .gnav a:not(.pill):nth-child(6) { margin-bottom: 18px; }
/* 写真の楕円にかかる文字（ギャラリー・アクセス）が読めるよう、文字の外側に白い縁取り（2026-10-27 岡本さん。Figma には無い） */
.home-head .gnav a:not(.pill) { -webkit-text-stroke: 5px var(--white); paint-order: stroke fill; }
.home-head .gnav a:not(.pill):hover { text-decoration: underline; text-underline-offset: 5px; }
.home-head .gnav .pill { width: 100%; }
.home-head .menu-btn { position: absolute; right: 20px; top: 24px; }

/* ---------- トップ：Topics（4642:32） ---------- */
.topics { position: relative; height: calc(875 * var(--u)); min-height: 680px; }
.topics-panel { position: absolute; left: calc(173 * var(--u)); right: calc(-1 * var(--bleed)); top: calc(53 * var(--u)); height: calc(809 * var(--u)); min-height: 620px; background: var(--panel); border-radius: calc(111 * var(--u)) 0 0 calc(111 * var(--u)); }
.topics .v-head { left: calc(126 * var(--u)); top: calc(81 * var(--u)); }
.topics-cards { position: absolute; left: calc(372 * var(--u)); top: calc(189 * var(--u)); display: flex; align-items: flex-start; }
.topics-cards .tcard:nth-child(2) { margin: calc(61 * var(--u)) 0 0 calc(84 * var(--u)); }
.topics-cards .tcard:nth-child(3) { margin: calc(123 * var(--u)) 0 0 calc(67 * var(--u)); }
.topics .more-link { position: absolute; right: calc(149.2 * var(--u)); top: calc(766 * var(--u)); z-index: 3; }

/* 記事カード：写真の左下を切り欠き（Figma の Subtract 形）、そこに日付と題名 */
.tcard { position: relative; display: block; width: clamp(180px, calc(256 * var(--u)), 256px); text-decoration: none; color: var(--green); }
.tcard .ph { display: block; aspect-ratio: 256 / 380; -webkit-mask: url(deco/card-notch.svg) center / 100% 100% no-repeat; mask: url(deco/card-notch.svg) center / 100% 100% no-repeat; overflow: hidden; }
.tcard .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease), filter .4s ease; }
.tcard .cap { position: relative; display: flex; flex-direction: column; gap: 6px; width: 78.9%; margin: -27.73% 0 0 4.3%; }
.tcard .date { display: flex; align-items: center; gap: 8px; font-family: var(--en); font-weight: 400; font-size: 13px; letter-spacing: .05em; line-height: 1.4; }
.tcard .tag { font-family: var(--jp); font-size: 11px; font-weight: 700; line-height: 1.7; color: var(--white); background: var(--green); border-radius: 999px; padding: 0 9px; letter-spacing: .04em; }
.tcard .ttl { font-weight: 700; font-size: 16px; line-height: 1.45; letter-spacing: .05em; text-wrap: pretty; word-break: auto-phrase; }
.topics-cards .tcard .ttl { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tcard:hover .ph img { transform: scale(1.04); }
.tcard:hover .ttl { text-decoration: underline; }

/* ---------- トップ：Research（4642:72） ---------- */
.research { position: relative; height: calc(930 * var(--u)); min-height: 760px; }
.research::after { content: ""; position: absolute; left: calc(var(--bleed) + 173 * var(--u)); right: 0; top: calc(827 * var(--u)); bottom: 0; background: var(--panel); border-top-right-radius: calc(189 * var(--u)); z-index: 1; }
.research .h-head { position: absolute; left: calc(80 * var(--u)); top: calc(170 * var(--u) - .2em); z-index: 3; }
.research-photo { position: absolute; left: calc(-1 * var(--bleed)); top: calc(399 * var(--u)); width: calc(692 * var(--u) + var(--bleed)); height: calc(480 * var(--u)); overflow: hidden; border-radius: 0 var(--radius) var(--radius) 0; z-index: 2; }
.research-photo img { width: 100%; height: 100%; object-fit: cover; }
.research .soil-sprout { position: absolute; left: calc(1240.3 * var(--u)); top: calc(745.5 * var(--u)); width: calc(72.7 * var(--u)); z-index: 0; }
.research-copy { position: absolute; left: calc(868 * var(--u)); top: calc(199 * var(--u)); width: calc(100% - 868 * var(--u) - 40px); max-width: 435px; color: var(--green); z-index: 3; }
.research-copy h3 { font-size: clamp(20px, 2.2vw, 24px); line-height: 1.66; letter-spacing: .05em; margin-bottom: 42px; }
.research-copy p { margin: 0 0 18px; line-height: 2; letter-spacing: .05em; }
.research-copy p:last-of-type { margin-bottom: 0; }
.research-copy .pill { margin-top: 42px; }

/* ---------- トップ：Publications（4642:108）。灰色の面は Research の下端から続く1枚 ---------- */
.pubs-home { position: relative; height: calc(786 * var(--u)); min-height: 640px; }
.pubs-home::before { content: ""; position: absolute; left: calc(var(--bleed) + 173 * var(--u)); right: 0; top: 0; height: calc(709 * var(--u)); min-height: 560px; background: var(--panel); border-bottom-left-radius: calc(219 * var(--u)); }
.pubs-home .v-head { left: calc(135 * var(--u)); top: calc(52 * var(--u)); }
.pubs-home .pub-list { position: absolute; left: calc(367 * var(--u)); top: calc(128 * var(--u)); width: calc(807 * var(--u)); min-width: 520px; }
.pubs-home .more-link { position: absolute; right: calc(266 * var(--u)); top: calc(506 * var(--u)); }

/* 論文の一覧：題名（16px 太字）＋出典（Jost 斜体）、#ccc の線 */
.pub-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); position: relative; z-index: 2; }
.pub-list li { border-bottom: 1px solid var(--rule); }
.pub-list a { display: flex; flex-direction: column; gap: 10px; padding: 30px 0; text-decoration: none; color: var(--ink); transition: padding .3s var(--ease); }
.pub-list a:hover { padding-left: 10px; }
.pub-list a:hover .pub-title { color: var(--green); }
.pub-title { font-weight: 700; font-size: 16px; line-height: 1.45; letter-spacing: .05em; }
.pub-cite { font-family: var(--en); font-style: italic; font-weight: 400; font-size: 13px; letter-spacing: .05em; line-height: 1.45; }

/* ---------- トップ：Gallery の帯（Figma 4711:6350）。全幅の写真に右下へ暗くなるグラデーション、右に白文字の見出し・説明・枠線ボタン ---------- */
.gallery-band { position: relative; height: calc(770 * var(--u)); min-height: 520px; overflow: hidden; color: var(--white); }
.gallery-band > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 15.8%; }
.gallery-band::after { content: ""; position: absolute; inset: 0; background: linear-gradient(153.77deg, rgba(0, 0, 0, 0) 42.52%, rgba(0, 0, 0, .3) 68.18%); }
.gallery-band .frame { z-index: 2; }
.gallery-band .band-copy { position: absolute; left: calc(989 * var(--u)); top: calc(401 * var(--u)); }
.gallery-band .kicker { display: block; color: var(--white); line-height: 1.45; }
.gallery-band .en-title { color: var(--white); font-size: clamp(48px, calc(80 * var(--u)), 80px); line-height: 1; margin: calc(14 * var(--u)) 0 0 -2px; }
.gallery-band .band-text { margin-top: calc(32 * var(--u)); font-size: 15px; line-height: 1.7; letter-spacing: .04em; }
.gallery-band .band-text p { margin: 0 0 11px; }
.gallery-band .band-text p:last-child { margin: 0; }
.gallery-band .pill { margin-top: calc(39 * var(--u)); }
.pill-ghost { background: transparent; box-shadow: inset 0 0 0 1px var(--white); }
.pill-ghost:hover { background: rgba(255, 255, 255, .16); }

/* ---------- トップ：Member（Figma 4711:5934。前の Gallery 区画と同じ組み方で 104px 下げた配置） ---------- */
.member-home { position: relative; height: calc(974 * var(--u)); min-height: 700px; }
.member-home .v-head { left: calc(111 * var(--u)); top: calc(129 * var(--u)); z-index: 4; }
.member-home .g1 { position: absolute; left: calc(-1 * var(--bleed)); top: calc(400 * var(--u)); width: calc(487 * var(--u) + var(--bleed)); height: calc(326 * var(--u)); object-fit: cover; border-radius: 0 var(--radius) var(--radius) 0; }
.member-home .g2 { position: absolute; right: calc(-1 * var(--bleed)); top: calc(148 * var(--u)); width: calc(327.4 * var(--u) + var(--bleed)); height: calc(219.7 * var(--u)); object-fit: cover; border-radius: 25.85px 0 0 25.85px; }
.member-home .g3 { position: absolute; right: calc(-1 * var(--bleed)); top: calc(544 * var(--u)); width: calc(542 * var(--u) + var(--bleed)); height: calc(364 * var(--u)); object-fit: cover; border-radius: var(--radius) 0 0 var(--radius); }
.member-home .copy { position: absolute; left: calc(726 * var(--u)); top: calc(413 * var(--u)); width: 240px; transform: translateX(-50%); text-align: center; color: var(--green); line-height: 1.7; letter-spacing: .04em; z-index: 3; }
.member-home .copy p { margin: 0 0 15px; }
.member-home .copy p:last-of-type { margin: 0; }
.member-home .copy .pill { margin-top: 36px; }

/* ---------- フッター（Figma 4711:5952。高さ 556）：ブラシの縁の土、芽、温室と木 ---------- */
.site-footer { position: relative; color: var(--white); text-align: center; margin-top: 0; padding: calc(228 * var(--u)) 20px calc(26 * var(--u)); min-height: calc(556 * var(--u)); background: linear-gradient(to bottom, transparent calc(443 * var(--u)), var(--brown) 0); }
.site-footer .soil { position: absolute; left: 0; top: calc(99 * var(--u)); width: 100%; height: calc(457 * var(--u)); max-width: none; object-fit: fill; z-index: 1; }
.site-footer .art { position: absolute; inset: 0; pointer-events: none; z-index: 2; } /* 温室と木は土の上 */
.site-footer .f-sprout { position: absolute; left: calc(var(--bleed) + 671 * var(--u)); top: calc(13 * var(--u)); width: calc(84.8 * var(--u)); z-index: 0; } /* 芽は土の下（茎の根元が隠れる） */
.site-footer .greenhouse { position: absolute; left: calc(1003 * var(--u)); top: calc(99 * var(--u)); width: calc(225 * var(--u)); z-index: 2; }
.site-footer .tree { position: absolute; left: calc(1192 * var(--u)); top: calc(162 * var(--u)); width: calc(65.5 * var(--u)); z-index: 3; }
.footer-body { position: relative; z-index: 4; display: flex; flex-direction: column; align-items: center; gap: 27px; }
.footer-name { display: flex; flex-direction: column; align-items: center; gap: 11px; line-height: 14px; margin: 0; padding-top: 7px; }
.footer-name .en { display: block; width: 180px; height: auto; }
.footer-name .ja { font-weight: 500; font-size: 10px; letter-spacing: .12em; }
.address { font-size: 14px; line-height: 1.7; letter-spacing: .04em; }
.address p { margin: 0 0 11px; }
.address p:last-child { margin: 0; }
.copyright { font-family: var(--en); font-weight: 400; font-size: 13px; line-height: 1.45; letter-spacing: .05em; margin: calc(52 * var(--u)) 0 0; position: relative; z-index: 4; }

/* ---------- 下層ページ ---------- */
/* 下層ページの頭（Figma「実装版（AI）2」PC / 06 ギャラリーで直したデザイン）：
   パンくずはヘッダーのすぐ下、英字見出しは緑一色・芽なし、小見出しは英字の下、ツタなし */
.page-head { position: relative; padding: 25px 0 64px; }
.page-head .lead { max-width: 720px; margin: 63px 0 0; color: var(--green); }
.crumb { font-size: 12px; color: var(--green); letter-spacing: .04em; }
.crumb a { color: var(--green); }
.p-head { --t: clamp(48px, calc(80 * var(--u)), 80px); margin-top: 69px; }
.p-head .en-title { font-size: var(--t); line-height: 1.45; color: var(--green-brand); }
.p-kicker { margin: calc(var(--t) * -.1125) 0 0 calc(var(--t) * .075); font-weight: 700; font-size: 17px; line-height: 1.4; letter-spacing: .05em; color: var(--green); }
.p-head-s { --t: 48px; margin-top: 40px; }
.p-head-s .p-kicker { font-size: 14px; }

.section { position: relative; padding: 112px 0; }
/* Topics・Publications と同じ「片側を大きく丸めた灰色の面」 */
.panel-l, .panel-r { position: relative; padding: 96px 0; }
.panel-l::before, .panel-r::before { content: ""; position: absolute; inset: 0; background: var(--panel); z-index: -1; }
.panel-l::before { left: calc(var(--bleed) + 56 * var(--u)); border-radius: calc(111 * var(--u)) 0 0 calc(111 * var(--u)); }
.panel-r::before { right: calc(var(--bleed) + 56 * var(--u)); border-radius: 0 calc(111 * var(--u)) calc(111 * var(--u)) 0; }
.panel-l, .panel-r { isolation: isolate; }
main > .panel-l:last-child, main > .panel-r:last-child { margin-bottom: 72px; }

.sec-title { display: flex; align-items: flex-start; gap: 10px; font-size: 22px; color: var(--green); margin: 0 0 28px; }
.sec-title .sprout { width: 22px; height: 28px; flex: none; margin-top: 2px; }

/* 研究内容 */
/* 研究の全体像（2026-10-27 先生の要望で STEP 1〜4 をやめて1つの項目に。中身は管理画面の「研究の全体像」。Figma に形は無いので、今までのカードの白・角丸にそろえた） */
.overview { background: var(--white); border-radius: var(--radius); padding: 28px 32px; }
.overview > :first-child { margin-top: 0; }
.overview > :last-child { margin-bottom: 0; }
.theme-toc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 32px; }
.wrap > .theme-toc:first-child { margin-top: 0; } /* 研究の全体像の本文を空にしたとき */
.toc-item { justify-content: flex-start; gap: 14px; padding: 14px 22px; white-space: normal; text-align: left; line-height: 1.5; }
.toc-item .no { font-family: var(--en); font-weight: 600; color: var(--brown); letter-spacing: .08em; flex: none; }
.toc-item .t { flex: 1; text-wrap: balance; word-break: auto-phrase; }
.toc-item .arrow { transform: rotate(90deg); }
/* 灰色の面のすぐ後のテーマは、上の罫線を面のふちと重ねない */
.panel-l + .wrap > .theme:first-child { border-top: 0; }
.theme { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 64px; align-items: start; padding: 96px 0; border-top: 1px solid var(--line); }
.theme:nth-of-type(even) .theme-media { order: 2; }
.theme-media { position: sticky; top: 108px; }
.theme-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.theme-no { display: block; line-height: 30px; font-family: var(--en); font-weight: 600; font-size: 14px; letter-spacing: .12em; color: var(--brown); }
.theme h2 { font-size: 28px; color: var(--green); margin: 8px 0 10px; }
.theme .catch { font-weight: 700; font-size: 18px; line-height: 1.7; color: var(--ink); margin-bottom: 22px; word-break: auto-phrase; text-wrap: pretty; }
.theme h3 { font-size: 17px; color: var(--green); margin: 32px 0 10px; }
.theme ol { padding-left: 1.3em; }
.theme li { margin-bottom: 8px; }
.keywords { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.keywords span { background: #eaf5e3; color: var(--green-dark); border-radius: 999px; padding: 2px 14px; font-size: 13px; }
.papers { font-size: 13px; color: var(--sub); margin-top: 18px; }

/* 活動報告の一覧 */
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 72px clamp(40px, calc(72 * var(--u)), 72px); }
.card-grid .tcard { width: 100%; }
.card-grid .tcard:nth-child(3n+2) { margin-top: 61px; }
.card-grid .tcard:nth-child(3n) { margin-top: 123px; }

/* 記事 */
.article { position: relative; padding: 25px 0 120px; }
.article .meta { display: flex; align-items: center; gap: 10px; font-family: var(--en); font-size: 14px; color: var(--green); margin-top: 28px; }
.article .meta .tag { font-family: var(--jp); font-size: 12px; font-weight: 700; color: var(--white); background: var(--green); border-radius: 999px; padding: 0 10px; }
.article h1 { font-size: clamp(24px, 3vw, 32px); color: var(--green); margin: 12px 0 36px; line-height: 1.6; }
.article .meta { margin-top: 89px; } /* Figma：記事の英字見出しは外し、パンくずの最後は記事の題名 */
.article .eyecatch { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); margin-bottom: 40px; }
.article .oneline { background: var(--panel); border-radius: 18px; padding: 20px 24px; font-weight: 700; color: var(--green); margin-bottom: 32px; }
.article .bib { border: 1.5px solid var(--line); border-radius: 18px; padding: 20px 24px; font-size: 14px; line-height: 1.8; margin-top: 36px; }
.article .back { text-align: center; margin-top: 56px; }

/* 研究成果の一覧 */
.pub-page { padding: 88px 0 140px; } /* Figma：灰色の面なし、一覧は中央 960px、題名は緑 */
.pub-page .wrap { width: min(960px, 100% - 64px); }
.pub-page .pub-title { color: var(--green); }
.pub-page .pub-list a { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 32px; align-items: center; }
.pub-page .pub-list .pub-cite { grid-column: 1; }
.pub-go { grid-column: 2; grid-row: 1 / span 2; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 999px; background: var(--green); color: var(--white); transition: background .2s ease; }
.pub-list a:hover .pub-go { background: var(--green-dark); }
.pub-list a:hover .pub-go .arrow { translate: 2px -2px; }
.others { font-family: var(--en); font-size: 14px; line-height: 1.9; letter-spacing: .02em; color: var(--sub); }

/* メンバー（Figma「実装版（AI）2」PC / 05 をデザイナーが直したもの） */
.member-page { padding: 47px 0 118px; }
.member-page .prof { grid-template-columns: minmax(0, 511fr) minmax(0, 625fr); gap: 64px; }
.member-page .prof img { aspect-ratio: 511 / 328; border-radius: var(--radius); }
.member-page .message { margin-top: 39px; padding: 36px 55px; }
.member-page .message h3 { color: var(--green); font-size: 17px; margin-bottom: 10px; }
.member-page .message p { margin: 0; }
.member-block { margin-top: 160px; }
.member-block + .member-block { margin-top: 147px; }
.member-page .staff > div { background: var(--panel); min-height: 160px; }
.member-page .group-photo { width: 100%; aspect-ratio: 1196 / 719; object-fit: cover; border-radius: var(--radius); }
.member-page .grades { margin-top: 30px; }
/* アクセス：キャンパスマップ（Figma でデザイナーが配置） */
.campus-map { padding: 76px 0 89px; }
.campus-map .map { width: 100%; height: auto; aspect-ratio: 1201 / 1116; object-fit: cover; border-radius: var(--radius); }
.prof { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 64px; align-items: start; }
.prof img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 0 var(--radius) var(--radius) var(--radius); }
.prof .role { display: block; line-height: 30px; font-family: var(--en); font-weight: 600; color: var(--brown); letter-spacing: .12em; font-size: 13px; }
.prof h2 { font-size: 34px; color: var(--green); margin: 4px 0 2px; }
.prof h2 small { font-family: var(--en); font-size: 16px; font-weight: 500; color: var(--sub); margin-left: 14px; letter-spacing: .06em; }
.prof dl { display: grid; grid-template-columns: 96px 1fr; gap: 14px 20px; margin: 32px 0 0; font-size: 14px; line-height: 1.8; }
.prof dt { color: var(--green); font-weight: 700; }
.prof dd { margin: 0; }
.message { background: var(--panel); border-radius: var(--radius); padding: 28px 30px; margin-top: 36px; }
.staff { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.staff > div { background: var(--white); border-radius: var(--radius); padding: 26px 28px; }
.staff .role { display: block; line-height: 30px; font-family: var(--en); font-weight: 600; color: var(--brown); letter-spacing: .12em; font-size: 12px; }
.staff-note { display: block; line-height: 30px; color: var(--sub); font-size: 14px; } /* 行の高さは、行内だったときの親の行の高さ（15px×2）にそろえる */
.staff b { display: block; font-size: 20px; margin: 4px 0; }
.arch-photo { margin: 32px 0 0; clip-path: ellipse(70% 92% at 50% 92%); overflow: hidden; }
.arch-photo img { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; object-position: 50% 60%; }
.grades { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 40px; }
.grades > div { background: var(--panel); border-radius: 18px; padding: 20px 24px; }
.grades b { display: block; color: var(--green); font-size: 17px; }

/* ギャラリー */
/* ギャラリー：白地に写真だけ（Figma で灰色の面と説明文を外したデザイン）。説明は alt に残す */
.gallery-page { padding: 39px 0 146px; }
.photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.photo-grid img { width: 100%; height: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); transition: filter .4s ease, translate .4s var(--ease); }
.photo-grid img.wide { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.photo-grid img:hover { filter: brightness(1.06); translate: 0 -4px; }

/* アクセス */
.access-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.access-grid img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); }
.access-table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.8; }
.access-table th, .access-table td { text-align: left; vertical-align: top; padding: 16px 8px; border-bottom: 1px solid var(--rule); }
.access-table th { width: 7.5em; color: var(--green); font-weight: 700; }
.map-placeholder { display: grid; place-items: center; min-height: 320px; border-radius: var(--radius); background: var(--white); color: var(--sub); text-align: center; padding: 24px; font-size: 14px; line-height: 1.8; }

/* 1440px より広い画面では、集合写真を楕円いっぱいに広げる */
@media (min-width: 1441px) {
  .hero-photo img { left: 0; width: 100%; height: 100%; top: 0; object-position: 50% 30%; }
}

/* ---------- レスポンシブ ---------- */
@media (max-width: 1080px) {
  .gnav { gap: 16px; }
  .gnav a:not(.pill) { font-size: 14px; }
  .home-head .gnav { display: none; }
  .home-head .menu-btn { display: inline-flex; z-index: 61; pointer-events: auto; }
  .home-head .menu-btn[aria-expanded="true"] { position: fixed; }
  .home-head .gnav.open { display: flex; position: fixed; inset: 0; width: auto; z-index: 60; background: var(--white); padding: 96px 32px 32px; align-items: flex-start; }
  .home-head .gnav.open a:not(.pill) { font-size: 20px; margin-bottom: 18px; text-align: left; }
  .home-head .gnav.open .pill { width: auto; }
  /* 新しいロゴは高さ約123px あり、この幅では写真の楕円の上の端に重なるので、スマホと同じ大きさにして写真をロゴの下から始める（2026-10-27 差分レビュー） */
  .home-head h1 { left: 20px; top: 22px; }
  .home-head .logo { gap: 8px; }
  .home-head .logo-mark { width: 48px; height: 50px; }
  .home-head .logo-text { gap: 8px; }
  .home-head .logo-en { width: 135px; }
  .hero-photo { top: 132px; }
}

@media (max-width: 900px) {
  .site-header .menu-btn { display: inline-flex; position: relative; z-index: 2; }
  .site-header .gnav { display: none; position: absolute; top: 0; left: 0; right: 0; height: 100vh; height: 100dvh; z-index: 1; flex-direction: column; align-items: flex-start; gap: 0; background: var(--white); padding: 96px 32px 32px; }
  .site-header .gnav.open { display: flex; }
  .site-header .gnav a:not(.pill) { font-size: 20px; line-height: 1.7; padding: 0; margin-bottom: 18px; border: 0; }
  .site-header .gnav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; }
  .site-header .gnav .pill { margin-top: 0; }

  /* トップの各区画は Figma の絶対配置をやめて縦に積む */
  .topics, .research, .pubs-home, .member-home { height: auto; min-height: 0; }
  .v-head, .h-head { position: relative !important; left: auto !important; top: auto !important; --t: 52px; display: inline-block; padding-top: .3em; }
  .v-head .en-title { writing-mode: horizontal-tb; }
  .v-head .sprout-t { display: none; }
  .v-head .sprout { display: block; }
  .v-head .sprout, .h-head .sprout { position: absolute; left: .025em; top: 0; width: .5125em; height: .664em; }
  .v-head .kicker, .h-head .kicker { position: absolute; left: calc(var(--t) * .6); top: 2px; font-size: 15px; writing-mode: horizontal-tb; }
  .topics { padding: 24px 0 0; margin-bottom: 40px; }
  .topics-panel { left: 16px; right: 0; top: 0; bottom: 0; height: auto; min-height: 0; border-radius: 56px 0 0 56px; }
  .topics .v-head { margin: 40px 0 8px 40px; }
  .topics-cards { position: relative; left: auto; top: auto; display: flex; align-items: flex-start; gap: 14px; margin-top: 24px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 24px 8px 40px; scroll-padding-left: 40px; }
  .topics-cards .tcard { flex: 0 0 62%; max-width: 240px; scroll-snap-align: start; margin: 0 !important; }
  .topics .more-link { position: relative; right: auto; top: auto; display: flex; width: max-content; margin: 24px 20px 0 auto; }
  .topics .frame { padding-bottom: 40px; }
  .research { padding: 72px 0 0; }
  .research::after { left: 16px; top: auto; height: 64px; border-top-right-radius: 64px; }
  .research .h-head { position: relative; margin: 0 20px; }
  .research-photo { position: relative; top: auto; width: 90%; height: auto; margin-top: 28px; }
  .research-photo img { aspect-ratio: 4 / 3; height: auto; }
  .research-copy { position: relative; left: auto; top: auto; width: auto; max-width: none; padding: 32px 20px 96px; }
  .research-copy h3 { font-size: 21px; margin-bottom: 24px; }
  .research-copy .pill { margin-top: 28px; }
  .research .soil-sprout { left: auto; right: 28px; top: auto; bottom: 56px; width: 48px; }
  .pubs-home { padding: 24px 20px 120px; }
  .pubs-home::before { left: 16px; height: calc(100% - 64px); min-height: 0; border-bottom-left-radius: 72px; }
  .pubs-home .v-head { margin: 32px 0 8px 20px; }
  .pubs-home .pub-list { position: relative; left: auto; top: auto; width: auto; min-width: 0; margin: 16px 0 0 20px; }
  .pubs-home .more-link { position: relative; right: auto; top: auto; display: flex; width: max-content; margin: 28px 0 0 auto; z-index: 2; }
  .gallery-band { height: 560px; min-height: 0; }
  .gallery-band > img { object-position: 30% 50%; }
  .gallery-band::after { background: linear-gradient(180deg, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, .58) 100%); } /* 縦長で文字が写真の明るい所に乗るので、PC より濃く */
  .gallery-band .band-copy { text-shadow: 0 1px 8px rgba(0, 0, 0, .25); }
  .gallery-band .band-copy { left: 20px; right: 20px; top: auto; bottom: 40px; }
  .gallery-band .en-title { font-size: 52px; margin-top: 10px; }
  .gallery-band .band-text { margin-top: 20px; }
  .gallery-band .pill { margin-top: 24px; }
  .member-home { padding: 80px 0 40px; display: flex; flex-direction: column; }
  .member-home .v-head { margin: 0 20px 8px; }
  .member-home .copy { position: static; transform: none; width: auto; text-align: left; padding: 16px 20px 28px; order: 2; }
  .member-home .photos { order: 3; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .member-home .g1, .member-home .g2, .member-home .g3 { position: static; width: 100%; height: auto; aspect-ratio: 4 / 3; }
  .member-home .g1 { grid-column: 1 / 3; width: 92%; }
  .member-home .g2 { border-radius: 0 var(--radius) var(--radius) 0; }

  .theme, .prof, .access-grid { grid-template-columns: 1fr; gap: 32px; }
  .theme:nth-of-type(even) .theme-media { order: 0; }
  .theme { padding: 64px 0; }
  .theme:last-child { padding-bottom: 51px; }   /* 最後の中身からフッターの芽の先まで約80px（ほかのページとそろえる） */
  main > .section:last-child { padding-bottom: 71px; }
  .article { padding-bottom: 56px; }
  .theme-media { position: static; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 20px; }
  .card-grid .tcard:nth-child(n) { margin-top: 0; }
  .card-grid .tcard:nth-child(2n) { margin-top: 48px; }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .staff, .grades { grid-template-columns: 1fr; }
  .section { padding: 80px 0; }
  .panel-l, .panel-r { padding: 72px 0; }
  .panel-l::before { left: 16px; border-radius: 56px 0 0 56px; }
  .panel-l > .wrap { padding-left: 20px; }
  main > .panel-l:last-child, main > .panel-r:last-child { margin-bottom: 118px; }
  .panel-r::before { right: 20px; border-radius: 0 56px 56px 0; }

  .site-footer { margin-top: 48px; padding-top: 150px; min-height: 0; background: linear-gradient(to bottom, transparent 120px, var(--brown) 0); }
  .site-footer .soil { top: 0; height: 128px; object-fit: cover; object-position: 50% 0; }
  .site-footer .f-sprout { left: calc(50% - 22px); top: -42px; width: 44px; }
  .site-footer .greenhouse { left: auto; right: 16px; top: 18px; width: 96px; }
  .site-footer .tree { left: auto; right: 6px; top: 46px; width: 28px; }
  .copyright { margin-top: 36px; }
}

@media (max-width: 600px) {
  .wrap { width: calc(100% - 40px); }
  .hero { min-height: 0; height: 128vw; }
  .hero-photo { clip-path: ellipse(95% 80% at 50% 80%); }
  .hero-photo img { left: 0; top: 0; width: 100%; height: 100%; object-position: 50% 60%; }
  .logo-h .logo-en { width: 117px; }
  .logo-h .logo-ja { font-size: 10px; letter-spacing: .04em; }
  .home-head .logo-ja { font-size: 10px; }
  .topics-cards .tcard .ttl { -webkit-line-clamp: 3; }
  .logo-h .logo-mark { width: 31px; height: 32px; }
  .site-header .wrap { min-height: 64px; }
  .v-head, .h-head { --t: 46px; }
  .page-head { padding: 16px 0 40px; }
  .page-head .lead { margin-top: 36px; }
  .p-head { margin-top: 40px; }
  .p-head-s { margin-top: 28px; }
  .gallery-page { padding: 0 0 80px; }
  .pub-page { padding: 40px 0 80px; }
  .pub-page .wrap { width: calc(100% - 40px); }
  .member-page { padding: 8px 0 80px; }
  .member-page .prof { grid-template-columns: 1fr; gap: 28px; }
  .member-page .message { padding: 24px; }
  .member-block, .member-block + .member-block { margin-top: 80px; }
  .campus-map { padding: 56px 0 72px; }
  .article .meta { margin-top: 48px; }
  .overview { padding: 24px 22px; }
  .card-grid { grid-template-columns: 1fr; gap: 40px; }
  .card-grid .tcard { width: min(74%, 280px); }
  .card-grid .tcard:nth-child(n) { margin-top: 0; }
  .card-grid .tcard:nth-child(2n) { margin-left: auto; }
  .pub-page .pub-list a { column-gap: 16px; }
  .pub-page .pub-list .pub-title { grid-column: 1 / -1; } /* 題名は全幅、丸い矢印は出典の行の右 */
  .pub-go { grid-row: 2; width: 32px; height: 32px; }
  .prof dl { grid-template-columns: 1fr; gap: 2px; }
  .prof dd { margin-bottom: 12px; }
  .prof h2 small { display: block; margin: 0; }
  .photo-grid img.wide { grid-row: auto; aspect-ratio: 3 / 2; }
  .theme h2 { font-size: 23px; }
  .theme-toc { grid-template-columns: 1fr; }
  .toc-item { border-radius: 18px; padding: 14px 18px; }
  .site-footer .greenhouse { width: 80px; right: 10px; top: 30px; }
  .site-footer .tree { width: 24px; top: 54px; right: 2px; }
}

/* ---------- 動き：植物らしく、ゆっくり、控えめに ---------- */

/* トップの最初の表示：楕円が開く → ロゴとメニュー */
.hero-photo { animation: archOpen 1.8s var(--ease) both; }
.hero-photo img { animation: settle 2.6s var(--ease) both; }
@keyframes archOpen { from { clip-path: ellipse(30% 30% at 50% 110%); } }
@keyframes settle { from { transform: scale(1.08); } }
/* 見出しは目で追える速さに（2026-10-27 岡本さん：速すぎて分からない）。--ease は出だしで出きってしまうので、見出しの切り抜きは「ゆっくり始まってゆっくり止まる」曲線にする */
:root { --ease-io: cubic-bezier(.65, 0, .35, 1); }
.home-head h1, .home-head .gnav { animation: dropIn 1.6s var(--ease) both; }
.home-head h1 { animation-delay: .5s; }
.home-head .gnav { animation-delay: .7s; }
@keyframes dropIn { from { opacity: 0; translate: 0 -12px; } }

/* 芽：区画が画面に入ったら、根元から小さく伸びて出る（短く、さりげなく） */
html.js .grow { transform-origin: 50% 100%; transform: scale(.55); opacity: 0; transition: transform 1.1s var(--ease) .15s, opacity .6s ease .15s; }
html.js .grow.is-in { transform: none; opacity: 1; }

/* スクロールで出る（JS が .reveal を付け、画面に入ったら .is-in） */
html.js .reveal { opacity: 0; translate: 0 28px; transition: opacity 1.2s var(--ease) var(--d, 0s), translate 1.2s var(--ease) var(--d, 0s); }
html.js .reveal.is-in { opacity: 1; translate: 0 0; }
html.js .reveal-title { opacity: 1; translate: none; clip-path: inset(-30% 110% -30% -10%); transition: clip-path 2s var(--ease-io) var(--d, 0s); }
html.js .v-head .reveal-title { clip-path: inset(-10% -30% 110% -30%); }
html.js .reveal-title.is-in, html.js .v-head .reveal-title.is-in { clip-path: inset(-30% -10% -30% -10%); }
html.js .reveal-left, html.js .reveal-right { opacity: 1; translate: none; transition: clip-path 1.8s var(--ease-io) var(--d, 0s); }
html.js .reveal-left { clip-path: inset(0 100% 0 0); }
html.js .reveal-right { clip-path: inset(0 0 0 100%); }
html.js .reveal-left.is-in, html.js .reveal-right.is-in { clip-path: inset(0 0 0 0); }
html.js .reveal-zoom { opacity: 1; translate: none; }
html.js .reveal-zoom img { transform: scale(1.08); transition: transform 2s var(--ease); }
html.js .reveal-zoom.is-in img { transform: none; }

/* マウスを乗せたとき */
.pill .arrow, .text-link .arrow, .pub-go .arrow { transition: translate .3s var(--ease); }
.pill:hover .arrow, .text-link:hover .arrow { translate: 2px -2px; }
.pill-back:hover .arrow { translate: -3px 0; }
.toc-item:hover .arrow { translate: 0 2px; }

/* 確認用の静止画モード（?static） */
.static *, .static *::before, .static *::after { animation: none !important; transition: none !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
