@import url('https://fonts.googleapis.com/css2?family=BIZ+UDPGothic:wght@400;700&family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400&family=Inter:wght@300;400;500;600&family=Noto+Sans+JP:wght@300;400;500;700&family=Noto+Serif+JP:wght@500;600;700&family=Shippori+Mincho+B1:wght@700;800&family=Yuji+Mai&display=swap');

:root {
  --primary: #1B3A5C;
  --primary-deep: #0E2238;
  --primary-light: #5C7FA8;
  --accent-red: #A8332B;
  --accent-red-hover: #8A2922;
  --accent-gold: #B89968;
  --sumi: #1A1A1A;
  --bg-washi: #F4EFE6;
  --bg-warm: #FAF6EE;
  --bg-cool: #EEF1F4;
  --white: #FFFFFF;
  --border-light: #D9CFBC;
  --text-secondary: #5A5145;

  --font-serif: 'Noto Serif JP', serif;
  --font-sans: 'Noto Sans JP', sans-serif;
  --font-title-jp: 'BIZ UDPGothic', 'Noto Sans JP', sans-serif; /* PDF: HGPGothicE 相当 */
  --font-gyosho: 'Yuji Mai', 'Shippori Mincho B1', serif;       /* PDF: HGSGyoshotai 相当（行書体）*/
  --font-theme: 'Yuji Mai', 'Shippori Mincho B1', serif;
  --font-eng-serif: 'Cormorant Garamond', serif;
  --font-eng-sans: 'Inter', sans-serif;                          /* PDF: Calibri 相当 */

  --header-height: 160px;
  --header-height-mobile: 112px;
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  color: var(--sumi);
  background-color: var(--bg-cool);
  line-height: 1.9;
  letter-spacing: 0.04em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* SVG Noise Overlay */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background-image: url('data:image/svg+xml,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="n"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23n)"/%3E%3C/svg%3E');
  opacity: 0.03;
}
/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-cool); }
::-webkit-scrollbar-thumb { background: #cbd2d9; border-radius: 4px; border: 2px solid var(--bg-cool); }
::-webkit-scrollbar-thumb:hover { background: #aeb6c0; }

::selection {
  background-color: rgba(184, 153, 104, 0.4); /* Gold alpha */
  text-shadow: none;
}

/* Page Transitions (View Transitions API) */
@view-transition {
  navigation: auto;
}
::view-transition-group(root) {
  animation-duration: 0.6s;
  animation-timing-function: cubic-bezier(0.19, 1, 0.22, 1);
}
::view-transition-new(root) {
  animation-name: fade-in-scale;
}
::view-transition-old(root) {
  animation-name: fade-out-scale;
}
@keyframes fade-in-scale {
  from { opacity: 0; transform: translateY(15px); filter: blur(3px); }
  to   { opacity: 1; transform: translateY(0); filter: blur(0); }
}
@keyframes fade-out-scale {
  from { opacity: 1; transform: translateY(0); filter: blur(0); }
  to   { opacity: 0; transform: translateY(-15px); filter: blur(3px); }
}

/* 基準フォントサイズ: 前回大会サイト(2026jgb.com=16px)より一回り大きい17px相当。
   サイト全体がrem基準のため、ここを変えると全体が比例して拡大される。 */
html { font-size: 106.25%; scroll-behavior: smooth; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  letter-spacing: 0.12em;
  line-height: 1.5;
  color: var(--sumi);
}
a { color: var(--primary); text-decoration: none; transition: all 0.3s ease; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* Utilities */
.washi-bg {
  background-color: var(--bg-washi);
  background-image:
    radial-gradient(rgba(184, 153, 104, 0.05) 1px, transparent 1px),
    radial-gradient(rgba(26, 26, 26, 0.03) 1px, transparent 1px);
  background-size: 22px 22px, 13px 13px;
  background-position: 0 0, 8px 8px;
}
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 1.2s cubic-bezier(0.19, 1, 0.22, 1), transform 1.2s cubic-bezier(0.19, 1, 0.22, 1); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* Layout: Header */
.top-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 2rem;
  border-bottom: 1px solid var(--border-light);
  background-color: var(--bg-washi);
  background-image:
    linear-gradient(rgba(244, 239, 230, 0.55), rgba(244, 239, 230, 0.62)),
    url('/images/washi-texture.png');
  background-size: auto, 702px 427px;
  background-repeat: no-repeat, repeat;
  background-position: center, center;
  box-shadow: 0 1px 0 var(--border-light), 0 2px 12px rgba(14, 34, 56, 0.05);
}
.header-brand {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.3s ease;
}
.header-brand:hover { opacity: 0.85; }
.header-logo {
  width: 78px;
  height: 78px;
  object-fit: contain;
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 0;
  filter: drop-shadow(0 1px 2px rgba(14, 34, 56, 0.12));
}
.header-titles {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
  min-width: 0;
}
.header-upper {
  font-size: 1.45rem;
  color: var(--primary-deep);
  font-family: var(--font-title-jp);
  letter-spacing: 0.18em;
  line-height: 1;
  font-weight: 700;
  margin: 0;
}
.header-badge {
  font-family: var(--font-title-jp);
  font-size: 2.35rem;
  color: var(--sumi);
  background: none;
  display: inline-block;
  padding: 0;
  border-radius: 0;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  margin: 0;
}
/* タイトルの折り返しは「小線源治療部会」「第29回学術大会」の間でのみ起こす */
.header-badge .badge-line { display: inline-block; }
.header-en {
  font-family: var(--font-eng-sans);
  font-style: normal;
  font-size: 0.92rem;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  line-height: 1.35;
  margin: 0;
  max-width: 840px;
  font-weight: 400;
}
#mobile-menu-toggle { display: none; }

/* Layout: Main Wrapper */
.app-wrapper {
  display: flex;
  width: 100%;
  padding-top: var(--header-height);
  min-height: 100vh;
  background-color: var(--bg-washi);
  box-shadow: 0 0 50px rgba(14, 34, 56, 0.03);
  position: relative;
}

/* Layout: Sidebar */
.sidebar {
  width: 330px;
  flex-shrink: 0;
  border-right: 1px solid var(--border-light);
  padding: 3rem 1.5rem;
  position: sticky;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  overflow-y: auto;
  background-color: var(--bg-warm);
  background-image:
    linear-gradient(rgba(250, 246, 238, 0.62), rgba(250, 246, 238, 0.70)),
    url('/images/washi-texture.png');
  background-size: auto, 702px 427px;
  background-repeat: no-repeat, repeat;
  background-position: center, center;
}
.sidebar-nav ul { list-style: none; padding: 0; margin: 0; }
.sidebar-nav li { position: relative; }

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0.7rem 0.6rem 0.7rem 0.85rem;
  color: var(--sumi);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  white-space: nowrap; /* メニュー項目は折り返さない */
  overflow: hidden;
  isolation: isolate;
  transition:
    color 0.45s cubic-bezier(0.22, 0.61, 0.36, 1),
    letter-spacing 0.55s cubic-bezier(0.22, 0.61, 0.36, 1),
    padding-left 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Layer 1: vertical accent stroke (left edge) — grows from bottom */
.nav-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background-color: var(--accent-gold);
  transform: scaleY(0);
  transform-origin: bottom center;
  transition: transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
  border-radius: 1px;
  z-index: 1;
}

/* Layer 2: washi sweep — subtle alpha gradient panel slides in from left */
.nav-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg,
      rgba(184, 153, 104, 0.12) 0%,
      rgba(184, 153, 104, 0.05) 50%,
      transparent 100%);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
  z-index: -1;
  pointer-events: none;
}

.nav-icon {
  display: inline-block;
  margin-right: 0.65rem;
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1;
  transition:
    color 0.4s ease,
    transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* HOVER state */
.nav-item:hover {
  color: var(--primary-deep);
  letter-spacing: 0.08em;
  padding-left: 1.2rem;
}
.nav-item:hover::before { transform: scaleY(1); }
.nav-item:hover::after  { transform: scaleX(1); }
.nav-item:hover .nav-icon {
  color: var(--accent-gold);
  transform: translateX(2px) scale(1.35);
}

/* ACTIVE state — fully revealed, anchored */
.nav-item.active {
  color: var(--primary-deep);
  padding-left: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.nav-item.active::before { transform: scaleY(1); }
.nav-item.active::after  {
  transform: scaleX(1);
  background:
    linear-gradient(90deg,
      rgba(184, 153, 104, 0.18) 0%,
      rgba(184, 153, 104, 0.06) 40%,
      transparent 100%);
}
.nav-item.active .nav-icon {
  color: var(--accent-gold);
  transform: scale(1.35);
}

@media (prefers-reduced-motion: reduce) {
  .nav-item,
  .nav-item::before,
  .nav-item::after,
  .nav-icon { transition: none; }
}

/* 準備中（初期非公開）— HOME・アクセス以外はリンク切れ扱い */
.nav-item--soon {
  color: var(--text-secondary);
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.nav-item--soon .nav-icon { color: var(--text-secondary); }
.footer-links a.is-soon,
.info-card.is-soon {
  /*opacity: 0.5;*/
  cursor: not-allowed;
  pointer-events: none;
}

.sidebar-poster { margin-top: 4rem; text-align: center; perspective: 1000px; }
.sidebar-poster img {
  width: 100%;
  max-width: 200px;
  border: 1px solid var(--border-light);
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  transition: all 0.6s cubic-bezier(0.19, 1, 0.22, 1);
  transform-style: preserve-3d;
}
.sidebar-poster a:hover img { 
  transform: translateY(-6px) scale(1.02) rotateX(2deg); 
  box-shadow: 0 18px 36px rgba(0,0,0,0.08); 
  border-color: var(--accent-gold);
}
.dl-btn {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.8rem;
  padding: 0.6rem 1rem;
  border: 1px solid var(--border-light);
  background: var(--bg-washi);
  color: var(--text-secondary);
  border-radius: 2px;
}

/* Layout: Main Content */
.main-content {
  flex: 1;
  min-width: 0;
}
.page-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem clamp(2rem, 4vw, 4rem) 6rem;
}
.main-content section { margin-bottom: 8rem; }
/* お知らせ等、インフォカード直後の余白を詰める（トップページ） */
.main-content .info-cards-section { margin-bottom: 3.5rem; }

/* Decorative Elements */
.section-title {
  font-size: 2.2rem;
  margin-bottom: 3rem;
  position: relative;
  color: var(--primary-deep);
  letter-spacing: 0.15em;
}
.section-title::after {
  content: "";
  display: flex;
  width: 0px;
  height: 1px;
  background-color: var(--accent-gold);
  margin-top: 1.2rem;
  position: relative;
  transition: width 1s cubic-bezier(0.19, 1, 0.22, 1) 0.3s;
}
.reveal.is-visible .section-title::after {
  width: 120px;
}
/* A small circle dot in the gold line for Edo flavor */
.section-title-wrapper { position: relative; display: inline-block; }
.section-title-wrapper::after {
  content: "○";
  position: absolute;
  bottom: -2.7rem; left: 130px;
  font-size: 0.55rem; color: var(--accent-gold);
  opacity: 0;
  transform: scale(0);
  transition: all 0.6s cubic-bezier(0.19, 1, 0.22, 1) 0.9s;
}
.reveal.is-visible .section-title-wrapper::after {
  opacity: 1;
  transform: scale(1);
}

/* Typography & Content Nodes */
.text-box { margin-bottom: 1.6em; }
.text-box p { margin-bottom: 1.6em; }
.text-box p:last-child { margin-bottom: 0; }
.num-eng { font-family: var(--font-eng-serif); }

/* Coming-soon placeholder (準備中) */
.coming-soon {
  text-align: center;
  padding: 5rem 1.5rem;
  background-color: var(--bg-warm);
  border: 1px solid var(--border-light);
  position: relative;
  margin: 2rem 0;
}
.coming-soon::before,
.coming-soon::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 48px;
  height: 1px;
  background: var(--accent-gold);
  transform: translateX(-50%);
}
.coming-soon::before { top: 1.5rem; }
.coming-soon::after  { bottom: 1.5rem; }
.coming-soon__label {
  font-family: var(--font-eng-serif);
  font-style: italic;
  font-size: 0.95rem;
  letter-spacing: 0.24em;
  color: var(--accent-gold);
  margin: 0 0 1.2rem;
  text-transform: uppercase;
}
.coming-soon__main {
  font-family: var(--font-title-jp);
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--primary-deep);
  margin: 0 0 1.5rem;
  line-height: 1.2;
  text-indent: 0.3em;
}
.coming-soon__note {
  font-family: var(--font-sans);
  font-size: 0.92rem;
  color: var(--text-secondary);
  letter-spacing: 0.06em;
  margin: 0;
}

.cta-button {
  display: inline-block;
  background-color: var(--accent-red);
  color: var(--white) !important;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  padding: 1rem 3rem;
  border-radius: 2px;
  box-shadow: 0 4px 10px rgba(168, 51, 43, 0.2);
  transition: all 0.6s cubic-bezier(0.19, 1, 0.22, 1);
  letter-spacing: 0.1em;
  position: relative;
  overflow: hidden;
  z-index: 1;
}
.cta-button::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: var(--accent-red-hover);
  z-index: -1;
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}
.cta-button:hover { 
  transform: translateY(-3px); 
  box-shadow: 0 12px 24px rgba(168, 51, 43, 0.35); 
}
.cta-button:hover::after { 
  transform: scaleY(1); 
}

/* Hero Section */
.hero-section {
  position: relative;
  height: calc(100vh - var(--header-height));
  min-height: 440px;
  max-height: 620px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: var(--bg-washi);
}
.hero-layer {
  position: absolute;
  inset: -5%;
  width: 110%;
  height: 110%;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
.hero-ukiyoe {
  z-index: 0;
  background-image: url('/images/ukiyoe.png');
  filter: saturate(0.92) contrast(0.98);
  mask-image:
    linear-gradient(to bottom, transparent 0%, black 10%, black 88%, transparent 100%);
  -webkit-mask-image:
    linear-gradient(to bottom, transparent 0%, black 10%, black 88%, transparent 100%);
  /* 初回は奥から浮上(heroEmerge)、3秒後から常時スローパン(slowPan)へ引き継ぐ */
  animation:
    heroEmerge 3s cubic-bezier(0.22, 0.61, 0.36, 1) forwards,
    slowPan 28s linear 3s infinite alternate;
}
@keyframes slowPan {
  from { transform: scale(1) translate(0, 0); }
  to { transform: scale(1.05) translate(-1%, -1%); }
}
@keyframes heroEmerge {
  0% {
    opacity: 0;
    transform: scale(1.08) translateY(2.5%);
    filter: saturate(0.92) contrast(0.98) blur(18px);
  }
  60% { opacity: 1; }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: saturate(0.92) contrast(0.98) blur(0);
  }
}
/* 航空写真レイヤー — 浮世絵の上にゆっくりクロスフェードで重ねる。
   浮世絵(下層)は不透明のまま土台に、この上層の opacity だけを長周期で 0↔1 させる。 */
.hero-aerial {
  z-index: 1;
  background-image: url('/images/aerial-campus.jpg');
  filter: saturate(0.96) contrast(1.02);
  opacity: 0;
  mask-image:
    linear-gradient(to bottom, transparent 0%, black 10%, black 88%, transparent 100%);
  -webkit-mask-image:
    linear-gradient(to bottom, transparent 0%, black 10%, black 88%, transparent 100%);
  /* 初回浮上(3s)を待ってから、ゆっくりズーム(aerialPan)とクロスフェードを開始 */
  animation:
    aerialPan 30s ease-in-out 3.5s infinite alternate,
    heroCrossfade 26s ease-in-out 3.5s infinite;
}
@keyframes aerialPan {
  from { transform: scale(1.06) translate(1%, 1%); }
  to   { transform: scale(1) translate(-1%, -1%); }
}
@keyframes heroCrossfade {
  0%,   8%  { opacity: 0; }   /* 浮世絵を表示 */
  42%, 58%  { opacity: 1; }   /* 航空写真を表示 */
  92%, 100% { opacity: 0; }   /* 浮世絵へ戻る */
}
.hero-band {
  position: absolute;
  z-index: 2;
  top: 32%; left: 0; right: 0;
  transform: translateY(-50%);
  text-align: center;
  padding: 0 1rem;
  background: transparent;
  box-shadow: none;
}
.hero-band .hero-upper {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--text-secondary);
  letter-spacing: 0.15em;
  margin-bottom: 0.5rem;
}
.hero-band .hero-title {
  font-size: 2.5rem;
  color: var(--sumi);
  margin-bottom: 0.5rem;
}
.hero-band .hero-en {
  font-family: var(--font-eng-serif);
  font-size: 1.1rem;
  color: var(--primary-light);
  font-style: italic;
  margin-bottom: 2.5rem;
}
.hero-theme-img-wrapper {
  position: relative;
  display: inline-block;
  margin-bottom: 1rem;
  z-index: 0; /* ::before(z-index:-1)を文字の背後に収めるためのスタッキングコンテキスト */
}
/* フロスト和紙エフェクト — 文字の背後だけ写真をぼかし＋和紙色を淡く重ね、
   楕円マスクで縁を羽化させて「箱」に見せず文字を浮き上がらせる。
   航空写真の上では情報量が和らぎ、浮世絵の上では淡く溶け込む。 */
.hero-theme-img-wrapper::before {
  content: "";
  position: absolute;
  inset: -24% -18% -28%;
  z-index: -1;
  opacity: 0; /* 既定は非表示。下記アニメで航空写真の表示中だけ現れる */
  /* 2層の放射グラデ:明るい中心コア + ゆるい外周ウォッシュで、上品な「光だまり」の落ち。 */
  background:
    radial-gradient(ellipse 48% 54% at 50% 50%,
      rgba(247, 243, 235, 0.42) 0%,
      rgba(247, 243, 235, 0) 72%),
    radial-gradient(ellipse 66% 76% at 50% 52%,
      rgba(244, 239, 230, 0.22) 0%,
      rgba(244, 239, 230, 0.12) 52%,
      rgba(244, 239, 230, 0) 82%);
  /* 背景の写真をぼかしつつ明度を上げ彩度を抑える → 落ち着いた下地になり文字が均一に映える。 */
  -webkit-backdrop-filter: blur(16px) brightness(1.06) saturate(0.9);
  backdrop-filter: blur(16px) brightness(1.06) saturate(0.9);
  /* 多段ストップで縁をなめらかに羽化(バンディング回避)。 */
  -webkit-mask-image: radial-gradient(ellipse 62% 76% at 50% 52%,
    #000 0%, #000 40%, rgba(0,0,0,0.55) 64%, rgba(0,0,0,0.18) 76%, transparent 86%);
  mask-image: radial-gradient(ellipse 62% 76% at 50% 52%,
    #000 0%, #000 40%, rgba(0,0,0,0.55) 64%, rgba(0,0,0,0.18) 76%, transparent 86%);
  /* 航空写真レイヤー(.hero-aerial)と同一の heroCrossfade で opacity を同期させ、
     航空写真が見えている間だけフロスト効果をフェードイン/アウトさせる。 */
  animation: heroCrossfade 26s ease-in-out 3.5s infinite;
  pointer-events: none;
}

/* Hero theme — 4-character ink emerge animation */
.hero-theme {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 0.18em;
  font-family: var(--font-theme);
  font-size: clamp(3.4rem, 9vw, 6.2rem);
  font-weight: 700;
  color: var(--sumi);
  letter-spacing: 0;
  line-height: 1.05;
  margin: 0;
  perspective: 1000px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
}
.hero-theme__char {
  display: inline-block;
  opacity: 0;
  filter: blur(22px);
  transform: scale(1.5) translateY(14px);
  animation: inkBloom 2.8s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
  animation-delay: 0.4s;
}
@keyframes inkBloom {
  0% {
    opacity: 0;
    filter: blur(22px);
    transform: scale(1.5) translateY(14px);
    text-shadow: 0 0 40px rgba(26, 26, 26, 0.55);
  }
  35% {
    opacity: 0.6;
    filter: blur(7px);
    transform: scale(1.18) translateY(6px);
    text-shadow: 0 0 24px rgba(26, 26, 26, 0.42);
  }
  70% {
    opacity: 0.92;
    filter: blur(1.5px);
    transform: scale(1.04) translateY(1px);
    text-shadow: 0 0 8px rgba(26, 26, 26, 0.18);
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: scale(1) translateY(0);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
  }
}
.theme-caption {
  display: block;
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  text-align: right;
  margin-top: 1rem;
  opacity: 0;
  transform: translateY(8px);
  /* 可読性の地は文字ブロック全体のフロスト効果(.hero-theme-img-wrapper::before)に集約。
     ここでは輪郭を整える淡い和紙色の影のみ(浮世絵背景ではほぼ不可視)。 */
  text-shadow: 0 1px 2px rgba(244, 239, 230, 0.7);
  animation: captionFadeUp 1s cubic-bezier(0.22, 0.61, 0.36, 1) forwards 2.1s;
}
@keyframes captionFadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* 2枚切替インジケーター(NiyodoSeiryuen 参照) — ヒーロー右下に細いプログレスバー＋"01 / 02"。
   表示中の画像のバーが伸び、カウンターも切り替わる。すべてクロスフェードに同期。 */
.hero-indicator {
  position: absolute;
  z-index: 3;
  right: 2.4rem;
  bottom: 1.8rem; /* ヒーロー画像の右下角(角ギリギリまで下げる。info-cards は section の margin-bottom:8rem と相殺し重なり無し) */
  display: flex;
  align-items: center;
  gap: 0.9rem;
  pointer-events: none;
}
/* 参考実装に倣い、インジケーター背後だけ局所的に暗く(フロスト)して可読性を担保。
   羽化マスクで縁を消し、浮世絵の上でも淡い陰影に留める。 */
.hero-indicator::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -0.55rem -1.1rem -0.6rem -1.3rem;
  border-radius: 999px;
  background: rgba(14, 34, 56, 0.30);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  -webkit-mask-image: radial-gradient(ellipse 76% 82% at 52% 50%, #000 42%, transparent 80%);
  mask-image: radial-gradient(ellipse 76% 82% at 52% 50%, #000 42%, transparent 80%);
  pointer-events: none;
}
.hero-bars { display: flex; gap: 0.5rem; }
.hero-bar {
  position: relative;
  width: 2.6rem;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28); /* 参考: 白トラック */
  overflow: hidden;
}
.hero-bar > i {
  position: absolute;
  inset: 0;
  display: block;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96); /* 参考: 白フィル */
  /* heroCrossfade と同周期で各画像の前面度(=幅)を表現 */
  animation: 26s ease-in-out 3.5s infinite;
}
.hero-bar--ukiyoe > i { width: 100%; animation-name: barFillU; } /* 既定は浮世絵が満ち */
.hero-bar--aerial > i { width: 0%;   animation-name: barFillA; }
/* 参考(NiyodoSeiryuen)に倣い「移った瞬間に前のバーの白塗りを即消し、次のバーだけが伸びる」。
   移行中に白いのは伸びていく側だけ。減っていくドレインはせず、瞬時に消去する。 */
@keyframes barFillU {
  0%, 8%    { width: 100%; }  /* img1表示中はバー1が満タン */
  8.001%    { width: 0%; }    /* 1→2へ移った瞬間にバー1の白塗りを即消去(ドレインしない) */
  58%       { width: 0%; }    /* 1→2移行中〜img2表示中は空のまま */
  92%, 100% { width: 100%; }  /* 2→1移行(58→92%)でバー1が0→100に満ちる */
}
@keyframes barFillA {
  0%, 8%    { width: 0%; }    /* img1表示中はバー2は空 */
  42%       { width: 100%; }  /* 1→2移行(8→42%)でバー2が0→100に満ちる */
  58%       { width: 100%; }  /* img2表示中はバー2が満タン */
  58.001%   { width: 0%; }    /* 2→1へ移った瞬間にバー2の白塗りを即消去 */
  100%      { width: 0%; }
}
.hero-counter {
  display: inline-flex;
  align-items: baseline;
  gap: 0.3em;
  font-family: var(--font-eng-serif);
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.88); /* 参考: 白系カウンター */
  text-shadow: 0 1px 4px rgba(14, 34, 56, 0.5);
}
.hero-counter__cur {
  /* 2桁を同一グリッドセルに重ねる。テキストのベースラインが保持されるので
     親の align-items:baseline で "/ 02" と水平が揃う(絶対配置だとズレる)。 */
  display: inline-grid;
}
.hero-counter__n {
  grid-area: 1 / 1; /* 01/02 を同一セルに重ねてクロスフェードで入替(tabular-nums で幅一定) */
  animation: 26s ease-in-out 3.5s infinite;
}
.hero-counter__n--1 { opacity: 1; animation-name: heroCrossfadeInv; } /* 浮世絵=01 */
.hero-counter__n--2 { opacity: 0; animation-name: heroCrossfade; }    /* 航空写真=02 */
.hero-counter__tot { opacity: 0.55; }
@keyframes heroCrossfadeInv {
  0%, 8%   { opacity: 1; }
  42%, 58% { opacity: 0; }
  92%, 100%{ opacity: 1; }
}

/* ヒーロー演出は OS の「動きを減らす」設定に依存させず常に再生する（OS非依存）。
   末尾の全体 reduced-motion 抑制(* { animation-duration:0.01ms })より
   セレクタ詳細度が高いため、!important と併せて確実に上書きされる。 */
@media (prefers-reduced-motion: reduce) {
  .hero-ukiyoe {
    animation:
      heroEmerge 3s cubic-bezier(0.22, 0.61, 0.36, 1) forwards,
      slowPan 28s linear 3s infinite alternate !important;
  }
  .hero-aerial {
    animation:
      aerialPan 30s ease-in-out 3.5s infinite alternate,
      heroCrossfade 26s ease-in-out 3.5s infinite !important;
  }
  .hero-theme-img-wrapper::before {
    animation: heroCrossfade 26s ease-in-out 3.5s infinite !important;
  }
  .hero-bar--ukiyoe > i { animation: barFillU 26s ease-in-out 3.5s infinite !important; }
  .hero-bar--aerial > i { animation: barFillA 26s ease-in-out 3.5s infinite !important; }
  .hero-counter__n--1 { animation: heroCrossfadeInv 26s ease-in-out 3.5s infinite !important; }
  .hero-counter__n--2 { animation: heroCrossfade 26s ease-in-out 3.5s infinite !important; }
  .hero-theme__char {
    animation: inkBloom 2.8s cubic-bezier(0.22, 0.61, 0.36, 1) 0.4s forwards !important;
  }
  .theme-caption {
    animation: captionFadeUp 1s cubic-bezier(0.22, 0.61, 0.36, 1) 2.1s forwards !important;
  }
}

/* Info Cards */
.info-cards-section {
  position: relative;
  z-index: 10;
  margin: -8rem 0 6rem;
  padding: 1.4rem 1.5rem;
  background-color: var(--bg-warm);
  background-image:
    linear-gradient(rgba(250, 246, 238, 0.55), rgba(250, 246, 238, 0.62)),
    url('/images/washi-texture.png');
  background-size: auto, 702px 427px;
  background-repeat: no-repeat, repeat;
  background-position: center, center;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}
.info-cards {
  display: flex;
  margin: 0 auto;
  max-width: 1080px;
}
.info-card {
  flex: 1;
  padding: 1.6rem 2rem;
  text-align: center;
  position: relative;
  transition: all 0.6s cubic-bezier(0.19, 1, 0.22, 1);
  opacity: 0;
  filter: blur(14px);
  transform: scale(1.06) translateY(18px);
  translate: 0 0;
  animation: cardEmerge 1.8s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
  animation-delay: calc(1.6s + var(--i, 0) * 0.28s);
  overflow: hidden;
  background-image: linear-gradient(var(--accent-gold), var(--accent-gold));
  background-size: 0% 2px;
  background-position: center bottom;
  background-repeat: no-repeat;
  border-radius: 4px;
}
.info-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(184, 153, 104, 0.08) 0%, transparent 80%);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}
.info-card:hover { 
  translate: 0 -8px;
  background-size: 100% 2px;
  box-shadow: 0 15px 30px rgba(14, 34, 56, 0.04);
}
.info-card:hover::before {
  opacity: 1;
}
.info-card:hover h3,
.info-card:hover p,
.info-card:hover p span,
.info-card:hover .info-sub {
  color: var(--accent-gold);
}
@keyframes cardEmerge {
  0% {
    opacity: 0;
    filter: blur(14px);
    transform: scale(1.06) translateY(18px);
  }
  45% {
    opacity: 0.7;
    filter: blur(4px);
    transform: scale(1.02) translateY(6px);
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: scale(1) translateY(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .info-card {
    animation: none;
    opacity: 1;
    filter: none;
    transform: none;
  }
}
.info-card:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 20%; right: 0; bottom: 20%;
  width: 1px; background: var(--border-light);
}
.info-card h3 {
  font-family: var(--font-title-jp);
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--primary-deep);
  margin-bottom: 0.6rem;
  transition: color 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}
.info-card p,
.info-card p span,
.info-card .info-sub {
  transition: color 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}
.info-card p {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.08em;
  color: var(--sumi);
}
.info-card .num-en {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  font-weight: inherit;
}
.info-card .info-sub {
  display: inline-block;
  margin-top: 0.4rem;
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Tables (Overview, etc.) */
.shibui-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
  border-top: 1px solid var(--border-light);
}
.shibui-table th, .shibui-table td {
  padding: 1.5rem 1rem;
  border-bottom: 1px solid var(--border-light);
  text-align: left;
  vertical-align: top;
}
.shibui-table th {
  width: 25%;
  font-weight: 600;
  color: var(--sumi);
  background: var(--bg-warm);
}

/* DL Lists */
.shibui-dl {
  border-top: 1px solid var(--border-light);
}
.shibui-dl > div {
  display: flex;
  border-bottom: 1px solid var(--border-light);
}
.shibui-dl dt {
  width: 30%;
  padding: 1.5rem 1rem;
  font-weight: 600;
  background: var(--bg-warm);
}
.shibui-dl dd {
  width: 70%;
  padding: 1.5rem 1rem;
}

/* News List */
.news-list li {
  display: flex;
  padding: 1.2rem 0;
  border-bottom: 1px dashed var(--border-light);
}
.news-date {
  font-family: var(--font-eng-serif);
  width: 120px;
  color: var(--text-secondary);
}
.news-title {
  flex: 1;
}

/* Footer */
.site-footer {
  padding: 3.5rem 3rem;
  background-color: var(--bg-washi);
  background-image:
    linear-gradient(rgba(244, 239, 230, 0.62), rgba(244, 239, 230, 0.70)),
    url('/images/washi-texture.png');
  background-size: auto, 702px 427px;
  background-repeat: no-repeat, repeat;
  background-position: center, center;
  border-top: 2px solid var(--accent-gold);
  position: relative;
  overflow: hidden;
  color: var(--text-secondary);
}
.footer-content {
  max-width: 1040px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}
.footer-logo {
  font-family: var(--font-title-jp);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--primary-deep);
  margin-bottom: 1.8rem;
  line-height: 1.6;
}
/* 折り返しは「日本放射線腫瘍学会」「小線源治療部会第29回学術大会」の間でのみ起こす */
.footer-logo .footer-logo-line { display: inline-block; }
.footer-links {
  display: flex;
  gap: 1.4rem 1.8rem;
  list-style: none;
  justify-content: center;
  flex-wrap: wrap;
  margin: 0 0 2rem;
  padding: 0;
}
.footer-links a {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-decoration: none;
  letter-spacing: 0.06em;
  transition: color 0.3s ease;
  position: relative;
  padding-bottom: 3px;
}
.footer-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent-red);
  transition: width 0.3s ease;
}
.footer-links a:hover {
  color: var(--primary-deep);
}
.footer-links a:hover::after {
  width: 100%;
}
.footer-contacts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.8rem;
  text-align: left;
}
.footer-contact {
  padding: 1.2rem 1.4rem;
  background: rgba(255, 255, 255, 0.38);
  border: 1px solid var(--border-light);
  border-radius: 2px;
}
.footer-contact__label {
  font-family: var(--font-title-jp);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  color: var(--primary-deep);
  margin: 0 0 0.6rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--accent-gold);
}
.footer-contact p:not(.footer-contact__label) {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin: 0;
}
.footer-contact a {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px dotted var(--primary-light);
  transition: color 0.3s ease;
}
.footer-contact a:hover {
  color: var(--accent-red);
}
.footer-copyright {
  padding-top: 1.4rem;
  border-top: 1px solid var(--border-light);
  font-family: var(--font-eng-sans);
  font-size: 0.7rem;
  color: var(--text-secondary);
  letter-spacing: 0.08em;
  margin: 0;
  opacity: 0.7;
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 2.5rem; right: 2.5rem;
  width: 56px; height: 56px;
  background-color: var(--bg-washi);
  color: transparent; /* hide original text */
  border: 1px solid var(--border-light);
  border-radius: 50%;
  opacity: 0; pointer-events: none;
  transition: all 0.8s cubic-bezier(0.19, 1, 0.22, 1);
  z-index: 90;
  box-shadow: 0 10px 30px rgba(14, 34, 56, 0.05);
  overflow: hidden;
}

.back-to-top::before {
  content: "";
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 0%;
  background: var(--accent-gold);
  border-radius: 50% 50% 0 0;
  transition: all 0.6s cubic-bezier(0.19, 1, 0.22, 1);
  z-index: -1;
}

.back-to-top::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" fill="none" stroke="%231e3244" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><line x1="12" y1="17" x2="12" y2="7"></line><polyline points="8 11 12 7 16 11"></polyline></svg>');
  background-size: 24px 24px;
  background-position: center;
  background-repeat: no-repeat;
  transition: all 0.6s cubic-bezier(0.19, 1, 0.22, 1);
  z-index: 1;
}

.back-to-top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top:not(.is-visible) { transform: translateY(30px); }

.back-to-top:hover { 
  transform: translateY(-5px); 
  border-color: var(--accent-gold);
  box-shadow: 0 15px 35px rgba(184, 153, 104, 0.25);
}

.back-to-top:hover::before {
  height: 100%;
  border-radius: 0;
}

.back-to-top:hover::after {
  background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" fill="none" stroke="%23ffffff" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><line x1="12" y1="17" x2="12" y2="7"></line><polyline points="8 11 12 7 16 11"></polyline></svg>');
  transform: translateY(-2px);
}

/* Mobile Overlay */
.mobile-menu-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  z-index: 95; opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}
.mobile-menu-overlay.is-active { opacity: 1; pointer-events: auto; }

/* Responsive */
@media (max-width: 1024px) {
  :root { --header-height: var(--header-height-mobile); }
  .top-header { padding: 0 1.2rem; }
  .header-logo { width: 58px; height: 58px; margin-top: 0; }
  .header-badge { font-size: 1.55rem; letter-spacing: 0.06em; }
  .header-upper { font-size: 1.1rem; letter-spacing: 0.16em; }
  .header-en { font-size: 0.78rem; }
  .header-brand { gap: 0.8rem; }

  .app-wrapper { flex-direction: column; }
  .sidebar {
    position: fixed; top: var(--header-height); right: -330px; left: auto;
    width: 320px;
    height: calc(100vh - var(--header-height));
    z-index: 100;
    transition: right 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
    border-right: none;
    border-left: 1px solid var(--border-light);
  }
  .sidebar.is-open {
    right: 0;
    box-shadow: -8px 0 28px rgba(14, 34, 56, 0.12);
  }

  #mobile-menu-toggle {
    display: flex; flex-direction: column; justify-content: space-between;
    width: 26px; height: 20px;
    margin-left: auto;
    flex-shrink: 0;
    order: 2;
  }
  #mobile-menu-toggle span {
    display: block; width: 100%; height: 2px;
    background-color: var(--sumi); transition: all 0.3s ease;
  }
  #mobile-menu-toggle.is-active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  #mobile-menu-toggle.is-active span:nth-child(2) { opacity: 0; }
  #mobile-menu-toggle.is-active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  .info-cards-section { margin: -6rem 0 4rem; padding: 2rem 1rem; }
  .hero-indicator { right: 1.4rem; bottom: 1.3rem; } /* スマホも画像右下角ギリギリまで下げる */
  .info-cards { flex-direction: column; }
  .info-card { padding: 2rem 1.5rem; }
  .info-card h3 { font-size: 1.2rem; }
  .info-card p { font-size: 1.15rem; }
  .info-card .info-sub { font-size: 0.9rem; }
  .info-card:not(:last-child)::after {
    width: 80%; height: 1px; top: auto; bottom: 0; left: 10%; right: auto;
  }
  .page-content { padding: 4rem 1.5rem; }
  .shibui-dl > div { flex-direction: column; }
  .shibui-dl dt, .shibui-dl dd { width: 100%; }
}

@media (max-width: 768px) {
  .hero-band .hero-title { font-size: 1.6rem; }
  .hero-band .hero-en { font-size: 0.85rem; }
  .header-en { display: none; }
  .header-badge { font-size: 1.3rem; }

  .site-footer { padding: 2.5rem 1.4rem; }
  .footer-contacts { grid-template-columns: 1fr; }
  .footer-links { flex-direction: column; gap: 0.85rem; align-items: center; }
}

/* スマホ: タイトルを「日本放射線腫瘍学会／小線源治療部会／第29回学術大会」の3行表示にする */
@media (max-width: 480px) {
  .header-upper { font-size: 0.95rem; letter-spacing: 0.1em; }
  .header-badge { font-size: 1.2rem; letter-spacing: 0.04em; }
  .header-badge .badge-line { display: block; }
  .header-titles { gap: 0.25rem; }
  .header-logo { width: 44px; height: 44px; }
}

@media print {
  .top-header, .sidebar, .hero-section, .back-to-top { display: none !important; }
  .app-wrapper { padding-top: 0; }
  .page-content { padding: 0; max-width: 100%; }
  body { background: white; color: black; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
