/* 第69回全肢頭研 福岡大会 - スタイルシート */

:root {
  --gold: #c9a227;
  --gold-light: #e8c55a;
  --gold-pale: #f5e9c0;
  --dark: #0d1117;
  --dark-2: #161c28;
  --dark-card: #1c2436;

  /* ライトセクション用 */
  --bg-light: #fafaf8;
  --bg-light-2: #f2f0eb;
  --text-dark: #1a1e2e;
  --text-mid: #4a5168;
  --text-sub: #7a8299;
  --border-light: rgba(0, 0, 0, 0.08);
  --border-gold: rgba(201, 162, 39, 0.35);

  /* ダーク用（ヒーロー・フッター） */
  --text-hero: #ede8de;
  --text-hero-sub: #a8b4cc;
  --border-dark: rgba(201, 162, 39, 0.25);
  --border-dark-subtle: rgba(255, 255, 255, 0.08);

  --font-size-base: 16px;
}

body.invert-mode {
  filter: invert(1) hue-rotate(180deg);
}
body.invert-mode img {
  filter: invert(1) hue-rotate(180deg);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  font-size: var(--font-size-base);
}
body {
  font-family: 'YakuHanJP', 'Noto Sans JP', sans-serif;
  background: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.75;
}

/* ===== A11Y BAR ===== */
#a11y-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  flex-shrink: 0;
}
#a11y-bar span {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.85);
  margin-right: 4px;
  white-space: nowrap;
}
.a11y-btn {
  background: rgba(201, 162, 39, 0.12);
  border: 0.5px solid var(--border-dark);
  color: var(--gold-light);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  font-family: 'YakuHanJP', 'Noto Sans JP', sans-serif;
  transition: background 0.2s;
  white-space: nowrap;
}
.a11y-btn:hover {
  background: rgba(201, 162, 39, 0.25);
}

/* ===== HEADER ===== */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  height: 60px;
  background: rgba(13, 17, 23, 0.9);
  border-bottom: 0.5px solid var(--border-dark-subtle);
  backdrop-filter: blur(12px);
  transition: all 0.3s;
}
@media (max-width: 1200px) {
  #site-header {
    padding: 0 3px 0 15px;
  }
}
.site-logo {
  font-family: 'YakuHanMP', 'Noto Serif JP', serif;
  font-size: clamp(0.813rem, 0.787rem + 0.13vw, 0.938rem);
  color: var(--gold);
  letter-spacing: 0.05em;
  white-space: nowrap;
}
nav {
  display: flex;
  gap: 0;
}
nav a {
  font-size: clamp(0.75rem, 0.725rem + 0.13vw, 0.875rem);
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  padding: 0 13px;
  height: 60px;
  display: flex;
  align-items: center;
  letter-spacing: 0.05em;
  transition: color 0.2s;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
nav a:hover {
  color: var(--gold-light);
  border-bottom-color: var(--gold);
}

/* ===== HERO ===== */
#hero {
  height: 100vh;
  padding: 60px 0 0 0 !important; /* ヘッダー分のスペースを確保 */
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: stretch;
}
.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}
.hero-bg-img {
  position: absolute;
  inset: 60px 0 0; /* ヘッダー分のスペースを空ける */
  background-image: url('../img/hero-wave.jpg'); /* 非対応ブラウザ用フォールバック */
  background-image: image-set(
    url('../img/hero-wave.webp') type('image/webp'),
    url('../img/hero-wave.jpg') type('image/jpeg')
  );
  background-size: cover;
  background-position: center;
  z-index: 0;
}
.hero-bg-overlay {
  position: absolute;
  inset: 60px 0 0; /* ヘッダー分のスペースを空ける */
  z-index: 1;
  /* background: linear-gradient(
    135deg,
    rgba(13,17,23,0.82) 0%,
    rgba(13,17,23,0.65) 40%,
    rgba(13,17,23,0.30) 100%
  ); */
}

.hero-content {
  position: relative;
  z-index: 2; /* 画像の前面に重ねる */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start; /* 各ボックスを内容幅で左寄せ（全幅に広げない） */
  max-width: 800px; /* 本文の最大幅。主題はこの幅で折り返す */
  padding: 80px 60px 80px 80px;
}
.hero-number {
  font-family: 'YakuHanMP', 'Noto Serif JP', serif;
  font-size: 120px;
  font-weight: 300;
  color: rgba(201, 162, 39, 0.1);
  line-height: 1;
  position: absolute;
  top: 60px;
  left: 60px;
  pointer-events: none;
  user-select: none;
  z-index: 2;
}
.hero-eyebrow {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--gold);
  font-weight: 500;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.hero-eyebrow::before {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--gold);
}
.hero-title {
  font-family: 'YakuHanMP', 'Noto Serif JP', serif;
  font-size: clamp(30px, 3.8vw, 48px);
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
  margin-bottom: 12px;
}
.hero-title em {
  color: var(--gold);
  font-style: normal;
}
.hero-org {
  font-size: 13px;
  color: var(--text-hero-sub);
  letter-spacing: 0.05em;
  margin-bottom: 32px;
}
.hero-date-box {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.07);
  border: 0.5px solid rgba(201, 162, 39, 0.4);
  border-radius: 8px;
  padding: 14px 22px;
  margin-bottom: 24px;
  backdrop-filter: blur(4px);
}
.hero-date-box .label {
  font-size: 10px;
  color: var(--gold);
  letter-spacing: 0.15em;
  font-weight: 500;
}
.hero-date-box .value {
  font-size: 15px;
  color: #fff;
  font-weight: 500;
  white-space: nowrap;
}
.hero-theme {
  border-left: 2px solid var(--gold);
  padding: 12px 18px;
  background: rgba(201, 162, 39, 0.07);
  border-radius: 0 6px 6px 0;
  margin-bottom: 40px;
  backdrop-filter: blur(4px);
}
.hero-theme .label {
  font-size: 10px;
  color: var(--gold);
  letter-spacing: 0.15em;
  margin-bottom: 4px;
  font-weight: 500;
}
.hero-theme .value {
  /* 画面幅に応じて14px〜20pxで可変（clamp） */
  font-size: clamp(0.875rem, 0.8rem + 0.38vw, 1.25rem);
  color: var(--text-hero);
  line-height: 1.4;
  font-family: 'YakuHanMP', 'Noto Serif JP', serif;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--gold);
  color: #0d1117;
  text-decoration: none;
  padding: 14px 32px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.05em;
  transition:
    background 0.2s,
    transform 0.2s;
  width: fit-content;
}
.hero-cta:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
}

/* 画像はヒーロー右側に全高で配置し、左端を本文の背面に食い込ませる */
.hero-image-side {
  position: absolute;
  top: 10px; /* 基準枠(.hero-inner)が既にヘッダー下から始まるため0でヘッダー直下に揃う */
  right: 10px;
  bottom: 10px;
  left: auto;
  width: 62%;
  z-index: 0;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 0;
}
/* picture はレイアウトに影響させず、中の img を従来どおり扱う */
.hero-image-side picture {
  display: contents;
}
.hero-image-side img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 1;
  transition: opacity 0.3s;
}
/* 左側を暗くして本文を読みやすく、右は画像を見せる */
.hero-image-side::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    90deg,
    rgba(13, 17, 23, 0.85) 0%,
    rgba(13, 17, 23, 0.15) 10%,
    rgba(13, 17, 23, 0.05) 38%,
    rgba(13, 17, 23, 0) 55%
  );
}

.hero-image-caption {
  position: absolute;
  bottom: 2.5vw;
  right: 2.5vw;
  font-size: 13px;
  color: rgba(255, 255, 255);
  background: rgba(0, 0, 0, 0.45);
  padding: 5px 10px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
  z-index: 2;
  white-space: nowrap;
}

/* ===== SECTION COMMON ===== */
section {
  padding: 96px 80px;
}
.section-inner {
  max-width: 1040px;
  margin: 0 auto;
}

/* ライトセクション */
.sec-light {
  background: var(--bg-light);
}
.sec-light-2 {
  background: var(--bg-light-2);
}

.section-label {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--gold);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.section-label::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--gold);
}
.section-title {
  font-family: 'YakuHanMP', 'Noto Serif JP', serif;
  font-size: clamp(22px, 2.8vw, 32px);
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 48px;
  line-height: 1.4;
}
.section-divider {
  width: 48px;
  height: 2px;
  background: var(--gold);
  margin: 16px 0 44px;
  border-radius: 2px;
}

/* ===== NEWS ===== */
.news-list {
  border: 0.5px solid var(--border-light);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.05);
}
.news-item {
  display: grid;
  grid-template-columns: 100px auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 18px 28px;
  border-bottom: 0.5px solid var(--border-light);
  color: var(--text-dark);
  background: #fff;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
}
.news-item:last-child {
  border-bottom: none;
}
.news-item:hover {
  background: #fbf8f0;
}
.news-date {
  font-size: 12px;
  color: var(--text-sub);
  white-space: nowrap;
}
.news-tag {
  font-size: 10px;
  padding: 3px 12px;
  border-radius: 20px;
  background: rgba(201, 162, 39, 0.12);
  color: #8b6a10;
  white-space: nowrap;
  border: 0.5px solid rgba(201, 162, 39, 0.3);
  font-weight: 500;
}
.news-title {
  font-size: 14px;
  color: var(--text-dark);
}
.news-more {
  font-size: 12px;
  color: var(--gold);
  white-space: nowrap;
  font-weight: 500;
}
.news-more::after {
  content: ' ›';
  font-size: 16px;
}

/* ===== MODAL ===== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(13, 17, 23, 0.6);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-overlay.open {
  display: flex;
}
.modal-box {
  background: #fff;
  border-radius: 14px;
  width: 100%;
  max-width: 800px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
  position: relative;
  animation: modalIn 0.2s ease;
}
@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.modal-header {
  padding: 28px 32px 20px;
  border-bottom: 0.5px solid var(--border-light);
}
.modal-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.modal-date {
  font-size: 12px;
  color: var(--text-sub);
}
.modal-photo {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 14px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  background: #e8e6e3;
}
.modal-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
/* 肩書き：団体名（上・小）／氏名（中・大）／所属（下・小） */
.modal-org {
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.5;
  margin-bottom: 2px;
}
.modal-affil {
  font-size: 12px;
  color: var(--text-sub);
  margin-top: 4px;
  line-height: 1.5;
}
/* PC：名前・肩書を左、顔写真を右に少し大きく（写真がある時のみ） */
.modal-header.has-photo {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    'meta  photo'
    'org   photo'
    'title photo'
    'affil photo';
  column-gap: 32px;
  align-items: center;
}
.modal-header.has-photo .modal-meta {
  grid-area: meta;
}
.modal-header.has-photo .modal-org {
  grid-area: org;
}
.modal-header.has-photo .modal-title {
  grid-area: title;
}
.modal-header.has-photo #modal-affiliation {
  grid-area: affil;
}
.modal-header.has-photo .modal-photo {
  grid-area: photo;
  align-self: center;
  justify-self: end;
  width: 128px;
  height: 128px;
  margin-bottom: 0;
  margin-right: 24px; /* 右上の×ボタンと重ならないよう余白 */
}
.modal-title {
  font-family: 'YakuHanMP', 'Noto Serif JP', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.4;
}
.modal-body {
  padding: 24px 32px 25vh;
  font-size: 15px;
  color: var(--text-mid);
  line-height: 2;
  letter-spacing: 0.05em;
}
/* 段落：全角字下げ＋段落間に余白。tb0は次段落と続けて表示 */
.modal-body p {
  margin: 0 0 1.6em;
  text-indent: 1em;
}
.modal-body p:last-child {
  margin-bottom: 0;
}
.modal-body p.tb0 {
  margin-bottom: 0;
}
.modal-body a {
  color: var(--gold);
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--bg-light-2);
  border: 0.5px solid var(--border-light);
  cursor: pointer;
  font-size: 18px;
  color: var(--text-sub);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.modal-close:hover {
  background: #e8e4da;
}

/* ===== GREETING / CONGRATULATIONS ===== */
.greeting-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.congratulations-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.greeting-card,
.congratulations-card {
  background: #fff;
  border: 0.5px solid var(--border-light);
  border-radius: 16px;
  padding: 36px 28px 28px;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition:
    box-shadow 0.2s,
    transform 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.greeting-card:hover,
.congratulations-card:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  transform: translateY(-3px);
}

/* 円形写真：ボーダーなし・シンプル */
.card-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 16px;
  flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  background: #e8e6e3;
}
.card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* ロールバッジ */
.card-role {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  padding: 3px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
  white-space: nowrap;
}
.greeting-card .card-role {
  background: rgba(201, 162, 39, 0.12);
  color: #8b6a10;
  border: 0.5px solid rgba(201, 162, 39, 0.3);
}
.congratulations-card .card-role {
  background: rgba(139, 106, 16, 0.08);
  color: #8b6a10;
  border: 0.5px solid rgba(139, 106, 16, 0.25);
}

/* 名前・所属 */
.card-org {
  font-size: 12px;
  color: var(--text-mid);
  line-height: 1.5;
  margin-bottom: 4px;
}
.card-name {
  font-family: 'YakuHanMP', 'Noto Serif JP', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 6px;
  line-height: 1.4;
}
/* 役職「会長」は団体名の行と同じ大きさ・太さ（名前より控えめ） */
.card-name .name-role {
  font-family: 'YakuHanJP', 'Noto Sans JP', sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-mid);
}
.modal-title .name-role {
  font-family: 'YakuHanJP', 'Noto Sans JP', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-mid);
}
.card-affil {
  font-size: 11px;
  color: var(--text-sub);
  line-height: 1.7;
  margin-bottom: 20px;
  width: 100%;
}

/* ボタン */
.card-read-more {
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: none;
  background: none;
  cursor: pointer;
  font-family: 'YakuHanJP', 'Noto Sans JP', sans-serif;
  padding: 0;
  margin-top: auto;
}
/* 「全文を読む」の上に区切り線（所属欄の有無に関わらず一律） */
.greeting-card .card-read-more,
.congratulations-card .card-read-more {
  width: 100%;
  padding-top: 20px;
  border-top: 0.5px solid var(--border-light);
  justify-content: center;
}
.greeting-card .card-read-more {
  color: var(--gold);
}
.congratulations-card .card-read-more {
  color: #8b6a10;
}
.card-read-more::after {
  content: '›';
  font-size: 16px;
}

/* 準備中カード：写真・サンプル文言なし。中央に「準備中」 */
.greeting-card.is-preparing,
.congratulations-card.is-preparing {
  cursor: default;
  justify-content: center;
  gap: 24px;
}
.greeting-card.is-preparing:hover,
.congratulations-card.is-preparing:hover {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
  transform: none;
}
.preparing-mark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.preparing-main {
  font-family: 'YakuHanMP', 'Noto Serif JP', serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-sub);
}
.preparing-sub {
  font-size: 12px;
  color: var(--text-sub);
  opacity: 0.8;
}

@media (max-width: 960px) {
  .greeting-grid,
  .congratulations-grid {
    gap: 16px;
  }
}
@media (max-width: 600px) {
  /* モーダル：SPは顔写真を上・名前肩書を下に縦積み（PCのグリッドを解除） */
  /* SP：顔写真を左・名前肩書はその右（写真は縦中央） */
  .modal-header.has-photo {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      'photo meta'
      'photo org'
      'photo title'
      'photo affil';
    column-gap: 16px;
    align-items: center;
  }
  .modal-header.has-photo .modal-photo {
    align-self: center;
    justify-self: start;
    width: 90px;
    height: 90px;
    margin: 0;
  }
  /* 新着情報・ご案内：1段目=日付+タグ、2段目=タイトル全幅、3段目=続きを読む（右） */
  .news-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    padding: 16px 18px;
  }
  .news-title {
    flex: 0 0 100%; /* タイトルは全幅で改行 */
    min-width: 0;
    font-size: 15px;
    line-height: 1.6;
  }
  .news-more {
    flex: 0 0 100%; /* 続きを読むは全幅・右寄せ */
    text-align: right;
  }

  /* 開催要項：ラベル(th)を上、値(val)を下に縦積み（どちらも全幅・左上寄せ）。
     ベースの .outline-table 定義がこの@mediaより後にあるため、#outline(ID)で
     詳細度を上げて確実に上書きする。 */
  #outline .outline-table,
  #outline .outline-table tbody,
  #outline .outline-table tr,
  #outline .outline-table td {
    display: block;
    width: 100%;
  }
  #outline .outline-table tr:last-child {
    border-bottom: none;
  }
  /* 上下対称の余白にして、ラベル・値とも各帯で文字が縦中央に来るように */
  #outline .outline-table td {
    text-align: left;
    padding: 9px 16px;
  }
  /* td.th はベースの width:140px を上書きして全幅のラベル帯に */
  #outline .outline-table td.th {
    width: 100%;
    border-right: none;
  }
}

/* ===== OUTLINE ===== */
.outline-table {
  width: 100%;
  border-collapse: collapse;
  border: 0.5px solid var(--border-light);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.04);
}
.outline-table tr {
  border-bottom: 0.5px solid var(--border-light);
}
.outline-table tr:last-child {
  border-bottom: none;
}
.outline-table td {
  padding: 18px 28px;
  font-size: 14px;
  background: #fff;
  vertical-align: top;
}
.outline-table td.th {
  background: #fefbf2;
  color: #8b6a10;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  white-space: nowrap;
  width: 140px;
  border-right: 0.5px solid var(--border-light);
}
.outline-table td.val {
  color: var(--text-dark);
  line-height: 1.8;
}
.sponsor-wrap {
  margin-top: 36px;
}
.sponsor-title {
  font-size: 12px;
  color: var(--text-sub);
  letter-spacing: 0.1em;
  margin-bottom: 14px;
  font-weight: 500;
}
.sponsor-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sponsor-tag {
  font-size: 12px;
  padding: 6px 14px;
  border-radius: 20px;
  border: 0.5px solid var(--border-light);
  color: var(--text-mid);
  background: #fff;
}

/* ===== PROGRAM ===== */
.prog-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(201, 162, 39, 0.1);
  border: 0.5px solid var(--border-gold);
  border-radius: 6px;
  padding: 10px 18px;
  margin-bottom: 40px;
  font-size: 13px;
  color: #8b6a10;
}
.prog-block {
  margin-bottom: 40px;
}
.prog-block-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.prog-block-num {
  font-family: 'YakuHanMP', 'Noto Serif JP', serif;
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.15em;
  white-space: nowrap;
}
.prog-block-title {
  font-family: 'YakuHanMP', 'Noto Serif JP', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-dark);
}
.prog-block-header::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-light);
}
/* 基調講演カード */
.prog-keynote {
  background: #fff;
  border: 0.5px solid var(--border-light);
  border-left: 3px solid var(--gold);
  border-radius: 0 10px 10px 0;
  padding: 24px 28px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}
.prog-keynote .kn-label {
  font-size: 10px;
  color: var(--gold);
  letter-spacing: 0.15em;
  font-weight: 500;
  margin-bottom: 8px;
}
.prog-keynote .kn-title {
  font-family: 'YakuHanMP', 'Noto Serif JP', serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 12px;
}
.prog-keynote .kn-person {
  font-size: 13px;
  color: var(--text-mid);
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.prog-keynote .kn-person .name {
  white-space: nowrap;
}
.prog-keynote .kn-person span {
  color: var(--text-sub);
}
.prog-keynote .kn-person .name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
}
/* 分科会グリッド */
.bunka-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
.bunka-card {
  background: #fff;
  border: 0.5px solid var(--border-light);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}
.bunka-head {
  background: #fefbf2;
  border-bottom: 0.5px solid var(--border-light);
  padding: 14px 18px;
}
.bunka-head .bk-num {
  font-size: 10px;
  color: var(--gold);
  letter-spacing: 0.15em;
  font-weight: 500;
}
.bunka-head .bk-theme {
  font-family: 'YakuHanMP', 'Noto Serif JP', serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  margin-top: 4px;
}
.bunka-body {
  padding: 18px 24px;
}
.bunka-reporters {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3px;
  margin-bottom: 4px;
}
.bunka-role {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--text-sub);
  margin: 12px 0 6px;
}
.bunka-role:first-child {
  margin-top: 0;
}
.bunka-person {
  font-size: 13px;
  color: var(--text-dark);
  margin-bottom: 3px;
  line-height: 1.6;
  /* PC：所属＋氏名（.p-body）の後ろに地域タグを並べ、縦中央そろえ */
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 8px;
  row-gap: 3px;
}
/* 所属＋氏名のかたまり。CJKは不自然な位置で改行させない
   （改行は半角スペース／<wbr>のみ許可） */
.bunka-person .p-body {
  order: 1;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.bunka-person .name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  white-space: nowrap;
}
/* 氏名＋敬称「氏」が分断・段落ちしないように一体で折り返す */
.bunka-person .who,
.prog-keynote .kn-person .who {
  white-space: nowrap;
}
.bunka-person .affil {
  font-size: 11px;
  color: var(--text-sub);
  display: block;
  margin-top: 1px;
}
.bunka-person .region {
  order: 2;
  flex-shrink: 0;
  font-size: 10px;
  background: rgba(201, 162, 39, 0.1);
  color: #8b6a10;
  border: 0.5px solid rgba(201, 162, 39, 0.25);
  border-radius: 20px;
  padding: 1px 8px;
  white-space: nowrap;
}
/* モバイル：地域タグを氏名の「上」に左寄せで配置 */
@media (max-width: 600px) {
  .bunka-person {
    flex-direction: column;
    align-items: flex-start;
    row-gap: 3px;
  }
  /* 縦積み時、所属＋氏名は全幅にして自然に折り返す（max-content化＝はみ出し防止） */
  .bunka-person .p-body {
    width: 100%;
  }
  .bunka-person .region {
    order: -1;
  }
  /* 振込先：ラベルと値を縦積み */
  .bank-row {
    flex-direction: column;
    gap: 2px;
  }
  .bank-label {
    min-width: 0;
    padding-top: 0;
  }
  /* 申込ステップ：番号を上部センターに */
  .apply-step {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
  .apply-step .step-body {
    width: 100%;
  }
}
.bunka-divider {
  height: 0.5px;
  background: var(--border-light);
  margin: 10px 0;
}
/* 指導・助言（分科会全体・独立ブロック） */
.bunka-advice {
  background: #fff;
  border: 0.5px solid var(--border-light);
  border-left: 3px solid var(--gold);
  border-radius: 0 10px 10px 0;
  padding: 16px 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}
.bunka-advice .bunka-role {
  margin-top: 0;
}
/* 文科省講話 */
.prog-monka {
  background: #fff;
  border: 0.5px solid var(--border-light);
  border-left: 3px solid #888;
  border-radius: 0 10px 10px 0;
  padding: 24px 28px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}
.prog-monka .mn-label {
  font-size: 10px;
  color: var(--text-sub);
  letter-spacing: 0.15em;
  font-weight: 500;
  margin-bottom: 8px;
}
.prog-monka .mn-title {
  font-family: 'YakuHanMP', 'Noto Serif JP', serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 12px;
}
.prog-monka .mn-person {
  font-size: 14px;
  color: var(--text-dark);
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.prog-monka .mn-person span {
  font-size: 12px;
  color: var(--text-sub);
}
.prog-monka .mn-person .name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
}
.prog-monka .mn-person .who,
.prog-monka .mn-person .who .name {
  white-space: nowrap;
}
.prog-monka .mn-person .who .name {
  font-size: 15px;
}

/* ===== APPLY ===== */
.apply-steps {
  max-width: 760px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.apply-step {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 22px 28px;
  background: #fff;
  border: 0.5px solid var(--border-light);
  border-bottom: none;
}
.apply-step:first-child {
  border-radius: 10px 10px 0 0;
}
.apply-step:last-child {
  border-bottom: 0.5px solid var(--border-light);
  border-radius: 0 0 10px 10px;
}
.apply-step.highlight-step {
  background: #fefbf2;
}
/* ===== 参加申込CTAボタン（目立たせる） ===== */
.apply-cta-wrap {
  display: flex;
  justify-content: flex-start;
  max-width: 760px;
  margin: 36px 0 42px;
}
.apply-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: #0d1117;
  text-decoration: none;
  padding: 20px 60px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.08em;
  box-shadow: 0 8px 24px rgba(201, 162, 39, 0.4);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  animation: applyPulse 2.2s ease-in-out infinite;
}
.apply-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 34px rgba(201, 162, 39, 0.6);
  animation: none;
}
.apply-cta-arrow {
  font-size: 21px;
  transition: transform 0.2s;
}
.apply-cta:hover .apply-cta-arrow {
  transform: translateX(5px);
}
@keyframes applyPulse {
  0%,
  100% {
    box-shadow: 0 8px 24px rgba(201, 162, 39, 0.4);
  }
  50% {
    box-shadow: 0 10px 32px rgba(201, 162, 39, 0.72);
  }
}
@media (prefers-reduced-motion: reduce) {
  .apply-cta {
    animation: none;
  }
}
@media (max-width: 600px) {
  .apply-cta {
    width: 100%;
    padding: 18px 32px;
    font-size: 17px;
  }
}
.step-num {
  min-width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--gold);
  color: #0d1117;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: -2px;
}
.step-body {
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.8;
}
.step-body strong {
  color: var(--text-dark);
}
.step-link {
  color: var(--gold);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.step-link:hover {
  color: #8b6a10;
}
.bank-box {
  margin-top: 14px;
  background: var(--bg-light-2);
  border: 0.5px solid var(--border-light);
  border-radius: 8px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bank-row {
  display: flex;
  gap: 16px;
  font-size: 13px;
}
/* 銀行名などが不自然な位置で改行しないように（改行は<wbr>のみ許可） */
.bank-row > span {
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.bank-label {
  color: var(--text-sub);
  min-width: 72px;
  font-size: 11px;
  padding-top: 1px;
}
.step-dates {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 0;
}
.date-row {
  display: flex;
  gap: 16px;
  align-items: baseline;
  flex-wrap: wrap;
}
.date-label {
  font-size: 11px;
  color: var(--gold);
  font-weight: 500;
  letter-spacing: 0.1em;
  min-width: 68px;
  background: rgba(201, 162, 39, 0.1);
  border: 0.5px solid var(--border-gold);
  border-radius: 4px;
  padding: 2px 8px;
  white-space: nowrap;
}
.step-dates s {
  color: var(--text-sub);
  text-decoration-color: #c0392b;
}
.date-new {
  color: #c0392b;
  font-weight: 600;
}
.date-note {
  margin: 2px 0 0;
  color: #c0392b;
  font-size: 13px;
  line-height: 1.7;
}

/* ===== CONTACT ===== */
#contact {
  padding-bottom: 25vh;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.contact-card {
  background: #fff;
  border: 0.5px solid var(--border-light);
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.04);
}
.contact-card .card-label {
  font-size: 10px;
  color: var(--gold);
  letter-spacing: 0.15em;
  font-weight: 500;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.contact-card .card-label::before {
  content: '';
  width: 16px;
  height: 1px;
  background: var(--gold);
}
.contact-card h3 {
  font-family: 'YakuHanMP', 'Noto Serif JP', serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 18px;
}
.contact-info-row {
  display: flex;
  font-size: 13px;
  gap: 16px;
  margin-bottom: 10px;
  color: var(--text-mid);
  align-items: flex-start;
}
.contact-info-row .info-label {
  color: var(--text-sub);
  min-width: 44px;
  font-size: 11px;
  letter-spacing: 0.05em;
  padding-top: 1px;
}

/* ===== FOOTER ===== */
footer {
  background: var(--dark);
  border-top: 0.5px solid rgba(201, 162, 39, 0.2);
  padding: 40px 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-logo {
  font-family: 'YakuHanMP', 'Noto Serif JP', serif;
  font-size: 13px;
  color: #606878;
}
.footer-copy {
  font-size: 11px;
  color: #404858;
}

/* ===== HAMBURGER ===== */
#hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
  flex-shrink: 0;
  margin-left: 8px;
}
#hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
  transition:
    transform 0.3s,
    opacity 0.3s;
  transform-origin: center;
}
#hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
#hamburger.open span:nth-child(2) {
  opacity: 0;
}
#hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

#mobile-nav {
  display: none;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  z-index: 890;
  background: rgba(13, 17, 23, 0.97);
  border-bottom: 0.5px solid var(--border-dark);
  backdrop-filter: blur(12px);
  flex-direction: column;
  padding: 8px 0 16px;
}
#mobile-nav.open {
  display: flex;
}
#mobile-nav a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  padding: 14px 32px;
  letter-spacing: 0.05em;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.06);
  transition:
    color 0.2s,
    background 0.2s;
}
#mobile-nav a:last-of-type {
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.06);
}
#mobile-a11y {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
}
#mobile-a11y span {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.85);
  margin-right: 4px;
}
#mobile-nav a:hover {
  color: var(--gold);
  background: rgba(201, 162, 39, 0.06);
}

/* ===== RESPONSIVE ===== */
/* デスクトップナビは横1行に収まらなくなる手前でハンバーガーへ切替
   （ナビ文字が段落ちしないよう余裕を持って1200pxで切替） */
@media (max-width: 1200px) {
  nav {
    display: none;
  }
  #hamburger {
    display: flex;
  }
  #a11y-bar {
    display: none;
  }
}
@media (max-width: 960px) {
  /* 画像右・本文左前面のレイアウトは基本スタイルで全幅共通に適用。
     ここでは本文が高い端末で見切れないよう高さを可変にするだけ。 */
  #hero {
    height: auto;
    /* min-height: 100vh; */
  }
  /* 2項目間の縦区切り線（インライン指定のdiv）はモバイルでは不要 */
  .hero-date-box > div:nth-child(2) {
    display: none;
  }
  .hero-image-side {
  width: 68%;
}
  section {
    padding: 64px 24px;
  }
  .contact-grid,
  .bunka-grid {
    grid-template-columns: 1fr;
  }
  /* 祝辞・ご挨拶は 600〜960px で横2列 */
  .greeting-grid,
  .congratulations-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  footer {
    flex-direction: column;
    gap: 12px;
    text-align: center;
    padding: 32px 24px;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .hero-content {
    padding: 48px 28px;
  }
}
/* ===== PAGE TOP BUTTON ===== */
#page-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 800;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gold);
  color: #0d1117;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition:
    opacity 0.3s,
    transform 0.3s,
    background 0.2s;
}
#page-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
#page-top:hover {
  background: var(--gold-light);
}
@media (max-width: 600px) {
  #page-top {
    bottom: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
    font-size: 17px;
  }
  /* 祝辞・ご挨拶は 600px以下で1列（@media 960pxの2列を上書き） */
  .greeting-grid,
  .congratulations-grid {
    grid-template-columns: 1fr;
  }
  /* 携帯時（段落ち）：画像は本文の下に横幅100%で配置（自然な高さ） */
  #hero {
    min-height: 0;
  }
  /* 波背景は本文エリアまで。段落ちした画像（全幅 = 100vw × 1235/1647）の
     高さ分を下から差し引く（端のスキマ防止に20px重ねる） */
  .hero-bg-img {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    bottom: calc(100vw * 1235 / 1647 - 20px);
    background-image: url('../img/hero-wave-tb.jpg'); /* フォールバック */
    background-image: image-set(
      url('../img/hero-wave-tb.webp') type('image/webp'),
      url('../img/hero-wave-tb.jpg') type('image/jpeg')
    );
    background-size: cover;
    background-position: center;
    z-index: 0;
  }
  .hero-image-side {
    position: static;
    width: auto;
    height: auto;
  }
  .hero-image-side::before {
    display: none;
  }
  .hero-image-side img {
    height: auto;
    object-fit: fill;
  }
  .hero-date-box,.hero-theme{
    width: 100%;
  }
}

@media (max-width: 480px) {
  /* 日付ボックスは横並びだと狭い画面で見切れるため縦積みにする */
  .hero-date-box {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  /* 波背景は本文エリアまで。段落ちした画像の高さ分を下から差し引く */
  .hero-bg-img {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    bottom: calc(100vw * 1235 / 1647 - 20px);
    background-image: url('../img/hero-wave-sp.jpg'); /* フォールバック */
    background-image: image-set(
      url('../img/hero-wave-sp.webp') type('image/webp'),
      url('../img/hero-wave-sp.jpg') type('image/jpeg')
    );
    background-size: cover;
    background-position: center;
    z-index: 0;
  }
}
/* ===== DOWNLOAD BOX ===== */
.download-box {
  max-width: 760px;
  margin-top: 28px;
  background: #fff;
  border: 0.5px solid var(--border-light);
  border-left: 3px solid var(--gold);
  border-radius: 0 10px 10px 0;
  padding: 22px 28px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}
.download-box-title {
  font-family: 'YakuHanMP', 'Noto Serif JP', serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}
.download-box-desc {
  font-size: 13px;
  color: var(--text-mid);
  margin-bottom: 16px;
  line-height: 1.7;
}
.download-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.download-list li::before {
  content: '■';
  font-size: 8px;
  color: var(--gold);
  margin-right: 8px;
}
.download-list a {
  font-size: 13px;
  color: var(--text-dark);
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  transition: color 0.15s;
}
.download-list a:hover {
  color: var(--gold);
  text-decoration: underline;
}
.download-list a span {
  font-size: 11px;
  color: var(--text-sub);
}
.login-btn-wrap {
  margin-bottom: 16px;
}
.login-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 30px;
  background: var(--gold);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 6px;
  box-shadow: 0 3px 10px rgba(201, 162, 39, 0.28);
  transition: background 0.18s, box-shadow 0.18s, transform 0.18s;
}
.login-btn:hover {
  background: #b8911f;
  box-shadow: 0 5px 16px rgba(201, 162, 39, 0.4);
  transform: translateY(-1px);
}
.login-btn-arrow {
  font-size: 15px;
  transition: transform 0.18s;
}
.login-btn:hover .login-btn-arrow {
  transform: translateX(3px);
}

.bg-white {
  background: #fff;
}