/* ===== 研究室サイト 共通スタイル ===== */
:root {
  --accent: #e8792b;        /* メインカラー（オレンジ） */
  --accent-dark: #c45f17;
  --accent-soft: #fdf1e7;
  --text: #3b3330;
  --muted: #7a6f69;
  --line: #eadfd6;
  --bg: #fffdfa;
  --white: #ffffff;
  --max: 1080px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Noto Sans JP", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.9;
  letter-spacing: 0.03em;
}

a { color: var(--accent-dark); }
img { max-width: 100%; display: block; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }

/* ---- ヘッダー ---- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px 16px; max-width: var(--max); margin: 0 auto;
}
.brand {
  display: flex; align-items: center; gap: 14px;
  text-decoration: none; color: var(--text); line-height: 1.2;
}
.brand img { height: 44px; width: auto; }
.brand strong {
  font-family: "BIZ UDPGothic", "BIZ UDPゴシック", "Meiryo", sans-serif;
  font-size: 1.6rem; font-weight: 400; letter-spacing: 0.06em; white-space: nowrap;
}

.contact-btn {
  background: var(--accent); color: var(--white); text-decoration: none;
  padding: 8px 20px; border-radius: 999px; font-weight: 700; font-size: 0.9rem;
  white-space: nowrap;
}
.contact-btn:hover { background: var(--accent-dark); }

.menu-toggle {
  display: none; background: none; border: 1px solid var(--line);
  border-radius: 8px; padding: 6px 10px; font-size: 1.1rem; cursor: pointer; color: var(--text);
}

/* ---- グローバルナビ ---- */
.global-nav { background: var(--white); border-bottom: 3px solid var(--accent); }
.global-nav ul {
  list-style: none; display: flex; justify-content: center;
  max-width: var(--max); margin: 0 auto;
}
.global-nav li { flex: 1; }
.global-nav a {
  display: block; text-align: center; padding: 14px 8px;
  text-decoration: none; color: var(--text); font-weight: 700; font-size: 0.95rem;
}
.global-nav a:hover, .global-nav a[aria-current="page"] {
  background: var(--accent-soft); color: var(--accent-dark);
}

/* ---- トップの大きな画像エリア ---- */
.hero {
  background:
    radial-gradient(circle at 15% 30%, #ffe3c9 0 18%, transparent 19%),
    radial-gradient(circle at 85% 70%, #ffd9b8 0 22%, transparent 23%),
    radial-gradient(circle at 70% 15%, #e6f4e1 0 12%, transparent 13%),
    linear-gradient(135deg, #fff7ef, #fdebdc);
  padding: 72px 16px; text-align: center;
}
.hero p.lead { font-size: clamp(1.3rem, 4vw, 2rem); font-weight: 700; letter-spacing: 0.1em; }
.hero p.sub { color: #000; margin-top: 8px; }

/* ---- 下層ページの見出し帯 ---- */
.page-title {
  background: linear-gradient(135deg, #fff7ef, #fdebdc);
  padding: 48px 16px; text-align: center;
}
.page-title h1 { font-size: clamp(1.5rem, 4vw, 2rem); letter-spacing: 0.12em; }
.page-title p {
  font-family: "Shippori Mincho", serif; font-weight: 600; line-height: 1.1;
  font-size: clamp(1.5rem, 4vw, 2rem); letter-spacing: 0.24em; text-indent: 0.24em;
  color: var(--accent); opacity: 0.85; margin-bottom: 10px;
}

/* ---- セクション ---- */
main section { padding: 56px 0; }
main section:nth-of-type(even) { background: var(--white); }

h2 {
  text-align: center; font-size: 1.5rem; margin-bottom: 32px; letter-spacing: 0.12em;
}
h2::before {
  content: ""; display: block; width: 36px; height: 4px; border-radius: 2px;
  background: var(--accent); margin: 0 auto 12px;
}
h3 {
  font-size: 1.15rem; margin: 32px 0 12px; padding-left: 12px;
  border-left: 5px solid var(--accent);
}
.prose { max-width: 820px; margin: 0 auto; }
.prose p + p { margin-top: 1em; }
.center { text-align: center; }

.placeholder { color: var(--muted); }

/* ---- 活動カード（トップ） ---- */
.cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.card {
  display: block; text-decoration: none; color: var(--text);
  background: var(--white); border: 1px solid var(--line); border-radius: 16px;
  overflow: hidden; transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.card .thumb {
  aspect-ratio: 16 / 9; display: grid; place-items: center; font-size: 2.6rem;
  background: var(--accent-soft);
}
.card .label { padding: 14px; text-align: center; font-weight: 700; }

/* ---- おしらせ ---- */
.news { max-width: 820px; margin: 0 auto; list-style: none; }
.news li {
  display: flex; gap: 24px; padding: 14px 4px; border-bottom: 1px dashed var(--line);
}
.news time { color: var(--accent-dark); font-weight: 700; white-space: nowrap; }

/* ---- 表（プロフィール・アクセス） ---- */
.table { width: 100%; max-width: 820px; margin: 0 auto; border-collapse: collapse; }
.table th, .table td {
  border-bottom: 1px solid var(--line); padding: 12px; text-align: left; vertical-align: top;
}
.table th { width: 30%; color: var(--accent-dark); white-space: nowrap; }

.list { padding-left: 1.4em; }
.list li + li { margin-top: 6px; }
.list.no-bullet { list-style: none; padding-left: 0; }
.note { margin-top: 1em; font-size: 0.9rem; color: var(--muted); }

/* ---- お問い合わせフォーム（Googleフォーム埋め込み） ---- */
.form-slot {
  margin-top: 24px; background: var(--white); border: 1px solid var(--line);
  border-radius: 16px; padding: 16px; text-align: center;
}
.form-slot iframe { display: block; width: 100%; height: 960px; border: 0; }

/* ---- プロフィールの顔イラスト ---- */
.profile-head {
  display: flex; align-items: center; gap: 28px;
  max-width: 820px; margin: 0 auto 32px;
}
.profile-head img {
  width: 140px; height: 140px; object-fit: cover; border-radius: 50%;
  border: 4px solid var(--accent-soft); background: var(--white);
}
.profile-name { font-size: 1.6rem; font-weight: 700; letter-spacing: 0.1em; line-height: 1.4; }
.profile-name small {
  display: block; font-size: 0.85rem; font-weight: 400; color: var(--muted); letter-spacing: 0.05em;
}

.sp-br { display: none; }

/* ---- フッター ---- */
.site-footer {
  background: #4a3f3a; color: #f3ebe5; padding: 32px 16px; text-align: center; font-size: 0.85rem;
}
.site-footer nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 14px; }
.site-footer a { color: #f3ebe5; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ---- ページ上部へ戻るボタン ---- */
.to-top {
  position: fixed; right: 16px; bottom: 16px; width: 48px; height: 48px;
  border-radius: 50%; background: var(--accent); color: var(--white);
  display: grid; place-items: center; text-decoration: none; font-size: 1.2rem;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}

.global-nav .sp-only { display: none; }

/* ---- スマホ ---- */
@media (max-width: 760px) {
  .global-nav .sp-only { display: block; }
  .brand { flex-direction: column; align-items: flex-start; gap: 2px; }
  .brand img { height: 30px; }
  .brand strong { font-size: 1.2rem; }
  .sp-br { display: inline; }
  .prose.center br { display: none; }
  .profile-head { flex-direction: column; text-align: center; gap: 12px; }
  .menu-toggle { display: block; }
  .contact-btn { display: none; }
  .global-nav { display: none; }
  .global-nav.open { display: block; }
  .global-nav ul { flex-direction: column; }
  .global-nav a { text-align: left; padding: 12px 16px; border-top: 1px solid var(--line); }
  .cards { grid-template-columns: 1fr; }
  .news li { flex-direction: column; gap: 2px; }
  .table th, .table td { display: block; width: 100%; }
  .table th { border-bottom: none; padding-bottom: 0; }
  main section { padding: 40px 0; }
}

/* ---- フッターの大学バナー ---- */
.footer-inner { max-width: var(--max); margin: 0 auto; display: flex; align-items: center; gap: 20px 36px; }
.footer-main { flex: 1; text-align: left; }
.footer-main nav { justify-content: flex-start; margin-bottom: 8px; }
.banner-link { display: inline-block; flex: none; background: var(--white); padding: 10px 18px; border-radius: 10px; }
@media (max-width: 720px) {
  .footer-inner { flex-direction: column; }
  .footer-main { text-align: center; }
  .footer-main nav { justify-content: center; margin-bottom: 14px; }
}
.banner-link img { height: 44px; width: auto; }
.banner-link:hover { opacity: 0.85; }

/* ---- お問い合わせ前の注意書き ---- */
.notice { background: var(--accent-soft); border: 1px solid var(--accent); border-radius: 12px; padding: 16px 20px; margin: 20px 0; font-size: 0.95rem; line-height: 1.8; }
.notice-title { font-weight: 700; color: var(--accent-dark); margin-bottom: 6px; }
.notice ul { padding-left: 1.3em; }
.notice li + li { margin-top: 6px; }


/* ---- 年ごとの小見出し ---- */
.year { margin: 28px 0 8px; font-size: 1rem; color: var(--accent-dark); letter-spacing: 0.1em; }

/* ---- 日付をそろえる一覧 ---- */
.year + .list li { display: grid; grid-template-columns: 6em 1fr; column-gap: 0.5em; }
.year + .list .d { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--muted); }

/* ---- 古い年は折りたたむ ---- */
.year-fold { margin: 28px 0 8px; }
.year-fold summary { cursor: pointer; font-size: 1rem; color: var(--accent-dark); letter-spacing: 0.1em; font-weight: 700; padding: 4px 0; }
.year-fold summary:hover { text-decoration: underline; }
.year-fold .list { margin-top: 10px; }
.year-fold .list li { display: grid; grid-template-columns: 6em 1fr; column-gap: 0.5em; }
.year-fold .list .d { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--muted); }

/* ---- 見出し形式の折りたたみ ---- */
.fold { margin: 20px 0; }
.fold summary { cursor: pointer; font-size: 1.15rem; font-weight: 700; padding-left: 12px; border-left: 5px solid var(--accent); }
.fold summary:hover { color: var(--accent-dark); }
.fold .list { margin-top: 14px; }

/* ---- ヘッダーのボタン（学生専用ページ・お問い合わせ） ---- */
.header-actions { display: flex; gap: 10px; align-items: center; }
.student-btn {
  background: var(--white); color: var(--accent-dark); text-decoration: none;
  border: 2px solid var(--accent); padding: 6px 18px; border-radius: 999px;
  font-weight: 700; font-size: 0.9rem; white-space: nowrap;
}
.student-btn:hover { background: var(--accent-soft); }
@media (max-width: 760px) { .header-actions { display: none; } }

/* ---- ログイン欄 ---- */
.login-form { max-width: 420px; margin: 24px auto 0; display: flex; flex-direction: column; gap: 6px; }
.login-form label { font-weight: 700; margin-top: 10px; }
.login-form input { font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
.login-form input:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.login-form button { margin-top: 18px; font: inherit; font-weight: 700; padding: 10px; border: 0; border-radius: 999px; background: var(--accent); color: var(--white); cursor: pointer; }
.login-form button:hover { background: var(--accent-dark); }
.login-msg { margin-top: 14px; padding: 10px 14px; background: var(--accent-soft); border-radius: 8px; font-size: 0.95rem; }
