:root {
  --navy: #17395c;
  --blue: #1f6fa9;
  --cyan: #3aa7b8;
  --green: #4c8b75;
  --ink: #17202a;
  --muted: #5d6b78;
  --line: #dce5ea;
  --paper: #ffffff;
  --soft: #f4f8fa;
  --warm: #f7f2e8;
  --shadow: 0 18px 45px rgba(23, 57, 92, 0.12);
}

.highlight-notice {
  margin: 12px 0 16px;
  padding: 8px 12px;
  border-radius: 5px;
  color: #fff;
  background: #c62828;
  font-size: 0.72rem;
  line-height: 1.6;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "YuGothic", "Noto Sans JP", "Segoe UI", sans-serif;
  line-height: 1.6;
  background: var(--paper);
}

body.lightbox-active {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

p {
  margin: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 24px;
  min-height: 96px;
  padding: 16px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(220, 229, 234, 0.9);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.brand > span {
  min-width: 0;
}

.brand-logo {
  width: 68px;
  height: 68px;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(23, 57, 92, 0.14);
}

.brand-ja,
.brand-en {
  display: block;
  line-height: 1.35;
}

.brand-ja {
  font-weight: 700;
  font-size: 23px;
}

.brand-en {
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  gap: 28px;
  align-items: center;
  color: #314254;
  font-size: 20px;
  font-weight: 600;
  text-transform: uppercase;
}

.site-nav a {
  position: relative;
  padding: 8px 0;
}

.site-nav a::after {
  position: absolute;
  right: 0;
  bottom: 2px;
  left: 0;
  height: 2px;
  background: var(--cyan);
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.site-nav a:hover::after,
.site-nav a.active::after {
  transform: scaleX(1);
}

.header-instagram {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-left: 12px;
  padding: 12px 16px;
  border: 1px solid #778da1;
  border-radius: 8px;
  color: #213e56;
  background: #fff;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

@media (max-width: 1500px) and (min-width: 1101px) {
  .site-header {
    gap: 16px;
    padding-right: 28px;
    padding-left: 28px;
  }

  .brand-ja {
    font-size: 20px;
  }

  .brand-en {
    font-size: 13px;
  }

  .site-nav {
    gap: 18px;
    font-size: 17px;
  }

  .header-instagram {
    gap: 7px;
    padding: 10px 12px;
    font-size: 16px;
  }

  .header-instagram-icon {
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 1100px) {
  .site-header {
    display: flex;
    gap: 12px;
  }

  .nav-toggle {
    display: block;
    margin-left: auto;
  }

  .site-nav {
    position: absolute;
    top: 96px;
    right: 18px;
    left: 18px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    padding: 10px 12px;
  }
}

.header-instagram:hover {
  border-color: var(--blue);
  background: #f4f8fa;
}

.header-instagram-icon {
  display: block;
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 6px;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--navy);
}

.section {
  padding: clamp(28px, 4vw, 48px) 0;
}

@media (min-width: 921px) {
  main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  main > .section {
    grid-column: 1 / -1;
  }

  main > #home {
    grid-row: 1;
  }

  main > .intro {
    grid-row: 2;
  }

  main > #members {
    grid-row: 3;
  }

  main > .whats-new {
    grid-column: 1;
    grid-row: 4;
  }

  main > #publications {
    grid-column: 2;
    grid-row: 4;
  }

  main > #activity {
    grid-row: 5;
  }

  main > #tools {
    grid-row: 6;
  }

  main > #contact {
    grid-row: 7;
  }

  main > .partner-section {
    grid-column: 1 / -1;
    grid-row: 8;
  }
}

@media (max-width: 920px) {
  main > #publications { order: 5; }
  main > .instagram-feed-section { order: 6; }
  main > #activity { order: 7; }
  main > #tools { order: 8; }
  main > #contact { order: 9; }
  main > .partner-section { order: 10; }
}

@media (max-width: 920px) {
  main {
    display: flex;
    flex-direction: column;
  }

  main > #home { order: 1; }
  main > .intro { order: 2; }
  main > #members { order: 3; }
  main > .whats-new { order: 4; }
  main > #publications { order: 5; }
  main > #activity { order: 6; }
  main > #tools { order: 7; }
  main > #contact { order: 8; }
  main > .partner-section { order: 9; }
}

.legacy-news {
  display: block;
}

@media (min-width: 921px) {
  main > #activity { grid-row: 4; }
  main > .legacy-news { grid-column: 1 / -1; grid-row: 5; }
  main > #publications { grid-column: 1 / -1; grid-row: 6; }
  main > .instagram-feed-section { grid-column: 1 / -1; grid-row: 7; }
  main > #tools { grid-row: 8; }
  main > #contact { grid-row: 9; }
  main > .partner-section { grid-row: 10; }
}

@media (max-width: 920px) {
  main > #activity { order: 4; }
  main > .legacy-news { order: 5; }
  main > #publications { order: 6; }
  main > .instagram-feed-section { order: 7; }
  main > #tools { order: 8; }
  main > #contact { order: 9; }
  main > .partner-section { order: 10; }
}

@media (min-width: 921px) {
  main > .whats-new,
  main > #publications {
    height: 560px;
  }
}

/* Keep the home hero compact and let the background illustration breathe. */
.hero {
  min-height: 0;
  height: 540px;
  background-size: auto 88%;
  background-repeat: no-repeat;
  background-position: right center;
}

@media (max-width: 920px) {
  .hero {
    height: auto;
    min-height: 520px;
    background-size: auto 100%;
  }
}

/* Present the Mission heading and copy as one readable vertical column. */
.intro .split {
  grid-template-columns: 1fr;
}

.container {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
}

/* Highlight pages stay as a single vertical document at desktop widths. */
main.page {
  display: block;
}

.hero {
  position: relative;
  min-height: 430px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.9) 48%, rgba(255, 255, 255, 0.32) 100%),
    url("assets/hero-pancreas.jpeg") center right / cover;
}

.hero::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 12px;
  background: linear-gradient(90deg, var(--navy), var(--cyan), var(--green));
  content: "";
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1000px;
  margin-left: max(18px, calc((100vw - 1120px) / 2));
}

.hero h1 {
  margin: 10px 0 16px;
  color: var(--navy);
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.22;
}

.hero h1 span {
  display: block;
}

.lead {
  max-width: 720px;
  margin-top: 10px;
  color: #314254;
  font-size: clamp(16px, 2vw, 19px);
}

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

.eyebrow {
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.notice {
  display: grid;
  gap: 6px;
  max-width: 760px;
  margin-top: 22px;
  padding: 14px 16px;
  border-left: 5px solid var(--cyan);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.target-audience {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 780px;
  margin-top: 12px;
}

.target-audience span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid rgba(31, 111, 169, 0.2);
  border-radius: 8px;
  color: var(--navy);
  background: rgba(255, 255, 255, 0.84);
  font-size: 13px;
  font-weight: 700;
}

.hero-visual {
  position: absolute;
  inset: auto 5vw 46px auto;
  width: min(36vw, 420px);
  opacity: 0.86;
}

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

.visual-grid span {
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 8px;
  background: rgba(23, 57, 92, 0.2);
  backdrop-filter: blur(3px);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(22px, 4.5vw, 54px);
  align-items: start;
}

h2 {
  margin: 8px 0 0;
  color: var(--navy);
  font-size: clamp(27px, 3.4vw, 40px);
  line-height: 1.35;
}

h3 {
  margin: 8px 0 10px;
  color: var(--navy);
  font-size: 20px;
  line-height: 1.45;
}

.intro-text {
  display: grid;
  gap: 12px;
  font-size: 16px;
}

.tinted {
  background: var(--soft);
}

.whats-new {
  background: #fff;
}

.board-section {
  min-width: 0;
  background: #fff;
}

.board-section .section-head {
  margin-bottom: 18px;
}

.board-section .news-list,
.board-section .publication-list {
  height: 680px;
  max-height: 680px;
}

.news-list {
  display: grid;
  gap: 8px;
  max-height: 340px;
  overflow-y: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(23, 57, 92, 0.08);
}

.news-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfe;
}

/* Keep archived highlight pages available while showing only the latest notice. */
.news-item:has(a[href*="weekly-highlights/"]):not(:has(a[href*="weekly-highlight-2026-11-22.html"])) {
  display: none;
}

.news-item summary {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 16px;
  align-items: center;
  padding: 12px 14px;
  color: var(--navy);
  font-weight: 700;
  cursor: pointer;
}

.news-item summary::marker {
  color: var(--blue);
}

.news-item time {
  color: var(--blue);
  font-weight: 700;
  white-space: nowrap;
}

.news-new {
  color: #d7263d;
  font-weight: 800;
}

.news-body {
  display: grid;
  gap: 6px;
  padding: 0 14px 14px 142px;
  color: #314254;
}

.news-photo {
  margin: 6px 0 0;
  max-width: 260px;
}

.news-photo-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
}

.news-photo-grid .news-photo {
  flex: 1 1 240px;
  max-width: 360px;
}

.news-photo img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.news-item a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.news-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 36px;
  padding: 7px 14px;
  border-radius: 8px;
  color: #fff !important;
  background: var(--blue);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none !important;
}

.news-button:hover {
  background: var(--navy);
}

.news-signature {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.section-head {
  max-width: 780px;
  margin-bottom: 24px;
}

.section-head p:last-child {
  margin-top: 10px;
  color: var(--muted);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.simple-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.simple-card {
  min-height: 180px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(23, 57, 92, 0.06);
}

.simple-card h3 {
  margin: 10px 0 8px;
  color: var(--navy);
  font-size: 18px;
}

.simple-card p {
  color: #46586b;
  font-size: 15px;
}

.tool-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.tool-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.tool-card-grid-featured {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 14px;
}

.tool-card-link {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 82px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--navy);
  background: #fff;
  box-shadow: 0 8px 20px rgba(23, 57, 92, 0.08);
  font-weight: 700;
  line-height: 1.35;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.tool-card-link:hover {
  border-color: var(--cyan);
  box-shadow: 0 12px 26px rgba(23, 57, 92, 0.14);
  transform: translateY(-2px);
}

.tool-card-icon {
  display: grid;
  flex: 0 0 54px;
  place-items: center;
  width: 54px;
  height: 54px;
  overflow: hidden;
  border-radius: 8px;
  background: #e8f5f8;
  box-shadow: 0 5px 12px rgba(23, 57, 92, 0.16);
}

.tool-card-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.affiliated-members {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.affiliated-members h3 {
  margin: 0 0 12px;
  color: var(--navy);
  font-size: 20px;
}

.affiliated-member-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.affiliated-member {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.affiliated-member strong,
.affiliated-member span {
  display: block;
}

.affiliated-member strong {
  color: var(--navy);
  font-size: 18px;
}

.affiliated-member span {
  margin-top: 2px;
  color: var(--green);
  font-size: 14px;
  font-weight: 700;
}

.member-researchmap {
  flex: 0 0 auto;
  padding: 8px 10px;
  border-radius: 6px;
  color: #fff;
  background: var(--navy);
  font-size: 12px;
  font-weight: 700;
}

.tool-card-label {
  display: block;
}

.tool-card-label small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.3;
}

@media (max-width: 920px) {
  .tool-card-grid,
  .tool-card-grid-featured {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .tool-card-grid {
    grid-template-columns: 1fr;
  }

  .affiliated-member-list {
    grid-template-columns: 1fr;
  }
}

.neuro-tool-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.quiet-tools {
  max-width: 1180px;
  margin: 0 auto;
  padding: 4px 24px 10px;
  justify-content: flex-end;
  border-top: 0;
  opacity: 0.72;
}

.tool-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px 16px;
  border: 1px solid rgba(31, 111, 169, 0.18);
  border-radius: 8px;
  color: #fff;
  background: var(--blue);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  box-shadow: 0 8px 20px rgba(31, 111, 169, 0.14);
}

.tool-button:hover {
  background: var(--navy);
}

.tool-button.neuro-tool-button {
  min-height: 34px;
  padding: 6px 12px;
  border-color: rgba(76, 139, 117, 0.24);
  background: var(--green);
  font-size: 12px;
  box-shadow: 0 6px 14px rgba(76, 139, 117, 0.16);
}

.tool-button.neuro-tool-button:hover {
  background: #336f5b;
}

.card,
.construction-box,
.contact-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(23, 57, 92, 0.08);
}

.card {
  min-height: 260px;
  padding: 20px;
}

.training-card {
  grid-column: 1 / -1;
}

.training-card h4 {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: 16px;
}

.training-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.training-grid > div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfe;
}

.training-illustration {
  margin: 14px 0 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.training-illustration img {
  display: block;
  width: 100%;
  max-height: 340px;
  object-fit: contain;
}

.procedure-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
  padding: 0;
  list-style: none;
}

.procedure-stats li {
  min-height: 82px;
  padding: 10px 8px;
  border-radius: 8px;
  color: #fff;
  background: var(--navy);
  text-align: center;
}

.procedure-stats a {
  display: grid;
  align-content: center;
  min-height: 62px;
  color: inherit;
}

.procedure-stats li:has(a) {
  transition: transform 0.16s ease, background 0.16s ease;
}

.procedure-stats li:has(a):hover {
  background: var(--blue);
  transform: translateY(-2px);
}

.procedure-stats strong {
  display: block;
  font-size: 26px;
  line-height: 1.15;
}

.procedure-stats span {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.4;
}

.training-note {
  padding: 12px 14px;
  border-left: 4px solid var(--cyan);
  border-radius: 0 8px 8px 0;
  color: var(--navy);
  background: #eef8fa;
  font-weight: 700;
}

.ep-card {
  border-top: 4px solid var(--green);
}

.pancreatitis-card {
  border-top: 4px solid var(--cyan);
}

.ep-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.reference-line {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.tool-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  margin-top: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(23, 57, 92, 0.08);
}

.tool-card h3 {
  margin-top: 10px;
}

.tool-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 18px;
  border-radius: 8px;
  color: #fff;
  background: var(--navy);
  font-weight: 700;
  white-space: nowrap;
}

.tool-link:hover {
  background: var(--blue);
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 10px;
  border: 1px solid #d7c9a8;
  border-radius: 999px;
  color: #785f25;
  background: var(--warm);
  font-size: 12px;
  font-weight: 700;
}

.member-list {
  display: grid;
  gap: 12px;
}

.member {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 14px;
  align-items: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.member-profile {
  grid-template-columns: 1fr 160px;
  align-items: start;
}

.member-photo {
  width: 150px;
  height: 184px;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
  object-position: center top;
  box-shadow: 0 8px 20px rgba(23, 57, 92, 0.12);
  justify-self: end;
}

.member-bio {
  min-width: 0;
}

.profile-heading {
  margin-bottom: 10px;
}

.profile-name {
  color: var(--navy);
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 700;
  line-height: 1.25;
}

.profile-role {
  margin-top: 4px;
  color: var(--green);
  font-size: 17px;
  font-weight: 700;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 16px;
}

.profile-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  min-width: 138px;
  padding: 10px 18px;
  border: 1px solid var(--navy);
  border-radius: 8px;
  color: #fff;
  background: var(--navy);
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(23, 57, 92, 0.16);
}

.profile-links a:hover {
  border-color: var(--blue);
  color: #fff;
  background: var(--blue);
}

.bio-sections {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.bio-sections details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfe;
}

.bio-sections summary {
  padding: 10px 14px;
  color: var(--navy);
  font-weight: 700;
  cursor: pointer;
}

.bio-list {
  display: grid;
  gap: 9px;
  max-height: 420px;
  margin: 0;
  padding: 0 14px 14px;
  overflow: auto;
  list-style: none;
}

.bio-list li {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding-top: 9px;
  border-top: 1px solid rgba(220, 229, 234, 0.85);
  font-size: 14px;
  line-height: 1.6;
}

.bio-list span {
  color: var(--muted);
  font-weight: 700;
}

.bio-list a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 8px;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(135deg, var(--navy), var(--green));
}

.construction-box {
  padding: 20px;
}

.publication-list {
  display: grid;
  gap: 8px;
  max-height: 260px;
  padding: 12px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(23, 57, 92, 0.08);
}

.publication-list details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfe;
}

.publication-list summary {
  padding: 13px 16px;
  color: var(--navy);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.55;
  cursor: pointer;
}

.publication-meta {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.publication-detail {
  display: grid;
  gap: 6px;
  padding: 0 16px 14px;
  color: #314254;
  font-size: 15px;
}

.publication-detail a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.education-visuals {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 16px;
  margin-bottom: 24px;
}

.education-visuals figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(23, 57, 92, 0.08);
}

.education-visuals img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.education-visuals figcaption {
  padding: 10px 12px;
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
}

.education-focus-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.education-focus {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 168px;
  gap: 16px;
  align-items: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(23, 57, 92, 0.08);
}

.education-focus h3 {
  margin: 8px 0 8px;
  color: var(--navy);
  font-size: 19px;
}

.education-focus p {
  margin: 0 0 10px;
  color: #435569;
}

.education-focus p:last-child {
  margin-bottom: 0;
}

.image-expand {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 8px;
  border: 1px solid #b8d4dd;
  border-radius: 8px;
  background: #eef8fb;
  color: var(--blue);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.image-expand:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(23, 57, 92, 0.16);
}

.image-expand img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  background: #102a43;
}

.radiation-media {
  display: grid;
  gap: 10px;
}

.image-link-card {
  display: grid;
  gap: 7px;
  width: 100%;
  margin: 0;
  padding: 8px;
  border: 1px solid #b8d4dd;
  border-radius: 8px;
  background: #f4fbfd;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
}

.image-link-card img {
  display: block;
  width: 100%;
  border-radius: 6px;
  background: #fff;
}

.qr-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.qr-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(23, 57, 92, 0.16);
}

.qr-card img {
  aspect-ratio: 1 / 1;
  object-fit: contain;
}

.protection-card img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.protection-card figcaption {
  color: var(--blue);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  padding: 28px;
  background: rgba(11, 29, 48, 0.78);
}

.lightbox.open {
  display: grid;
}

.lightbox figure {
  width: min(1120px, 94vw);
  max-height: 88vh;
  margin: 0;
  padding: 12px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.35);
}

.lightbox img {
  display: block;
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
}

.lightbox figcaption {
  padding: 10px 4px 0;
  color: var(--navy);
  font-weight: 800;
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.timeline article {
  padding: 18px 0 0;
  border-top: 3px solid var(--cyan);
}

.timeline span {
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
}

.contact-section {
  background: linear-gradient(180deg, #fff 0%, #eef5f8 100%);
}

.contact-card {
  display: block;
  padding: 30px;
}

.instagram-links {
  display: grid;
  gap: 12px;
  align-content: start;
  margin-top: 28px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.legacy-news {
  display: none;
}

.instagram-feed-section {
  background: #fff;
}

.instagram-feed-lead {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 22px);
}

.instagram-feed-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 480px));
  gap: 28px;
  align-items: start;
}

.instagram-post-card {
  min-width: 0;
  width: 100%;
  max-width: 480px;
  height: 435px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.instagram-post-card .instagram-media {
  min-width: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-height: 435px !important;
  margin: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
}

.instagram-feed-link {
  margin-top: 18px;
  text-align: right;
}

.instagram-feed-link a {
  color: var(--blue);
  font-size: 18px;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.instagram-links strong {
  display: block;
  color: var(--navy);
  text-align: center;
}

.instagram-links a {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  min-height: 88px;
  padding: 14px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--navy);
  background: #fff;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}

.instagram-links a:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.instagram-icon {
  display: block;
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  object-fit: contain;
  border-radius: 10px;
}

.instagram-arrow {
  margin-left: auto;
  font-size: 24px;
  line-height: 1;
}

.contact-info h3 {
  margin-top: 0;
  font-size: 24px;
}

.contact-info h4 {
  margin: 26px 0 8px;
  color: var(--navy);
  font-size: 18px;
}

.contact-form-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 16px;
  border-radius: 8px;
  color: #fff;
  background: var(--blue);
  font-weight: 700;
  text-decoration: none;
}

.contact-form-button:hover {
  background: var(--navy);
}

.contact-info {
  min-width: 0;
}

.small {
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
}

.partner-section {
  padding: 22px 0 30px;
  background: #eef5f8;
}

.partner-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.partner-link {
  display: grid;
  grid-template-rows: auto 150px;
  gap: 10px;
  align-content: start;
  min-width: 0;
  min-height: 220px;
  padding: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(23, 57, 92, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.partner-link img {
  display: block;
  width: 100%;
  height: 150px;
  margin: 0;
  object-fit: contain;
  background: #f7fafc;
}

.partner-link-wide img {
  width: 100%;
  max-height: none;
}

.partner-link span {
  order: -1;
  min-width: 0;
  margin: 0;
  padding: 0;
  color: var(--ink);
  background: transparent;
  font-weight: 700;
  line-height: 1.35;
}

.partner-link:hover span {
  color: var(--blue);
}

.partner-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(23, 57, 92, 0.14);
}

.site-footer {
  padding: 20px 0;
  color: #d8e8ef;
  background: var(--navy);
}

.footer-inner {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.footer-note {
  display: inline-block;
  margin-top: 6px;
  color: rgba(216, 232, 239, 0.82);
  font-size: 12px;
  line-height: 1.5;
}

.back-to-top {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  color: #fff;
  background: transparent;
  cursor: pointer;
}

@media (max-width: 920px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 96px;
    right: 18px;
    left: 18px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    padding: 10px 12px;
  }

  .hero {
    min-height: 430px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.86) 70%, rgba(255, 255, 255, 0.62) 100%),
      url("assets/hero-pancreas.jpeg") center / cover;
  }

  .hero-content {
    margin: 0 auto;
  }

  .hero-visual {
    display: none;
  }

  .split,
  .card-grid,
  .simple-card-grid,
  .education-visuals,
  .education-focus-grid,
  .training-grid,
  .news-item,
  .timeline {
    grid-template-columns: 1fr;
  }

  .procedure-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ep-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tool-card {
    grid-template-columns: 1fr;
  }

  .tool-button-row {
    align-items: stretch;
  }

  .tool-button {
    flex: 1 1 220px;
  }

  .tool-button.neuro-tool-button {
    flex: 0 1 150px;
  }

  .neuro-tool-button-row {
    align-items: stretch;
  }

  .education-focus {
    grid-template-columns: 1fr;
  }

  .image-expand {
    max-width: 260px;
  }
}

@media (max-width: 620px) {
  .site-header {
    min-height: 82px;
    padding: 10px 14px;
  }

  .brand-ja {
    font-size: 16px;
  }

  .brand-logo {
    width: 52px;
    height: 52px;
  }

  .brand-en {
    max-width: 230px;
    font-size: 13px;
    white-space: normal;
  }

  .site-nav {
    top: 82px;
  }

  .header-instagram {
    gap: 5px;
    padding: 8px 10px;
    font-size: 14px;
  }

  .header-instagram-icon {
    width: 34px;
    height: 34px;
  }

  .section {
    padding: 42px 0;
  }

  .instagram-feed-grid {
    grid-template-columns: 1fr;
  }

  .instagram-post-card {
    max-width: 480px;
    height: 435px;
  }

  .hero {
    min-height: 430px;
  }

  .hero h1 {
    font-size: 32px;
  }

  .notice {
    padding: 13px;
  }

  .lightbox {
    padding: 14px;
  }

  .lightbox-close {
    top: 10px;
    right: 12px;
  }

  .member {
    grid-template-columns: 1fr;
  }

  .member-profile {
    grid-template-columns: 1fr;
  }

  .member-photo {
    width: 132px;
    height: 162px;
    justify-self: start;
  }

  .news-list {
    max-height: 440px;
    padding: 10px;
  }

  .news-item summary {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .news-body {
    padding: 0 16px 16px;
  }

  .bio-list li {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .procedure-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .publication-list {
    height: 680px;
    max-height: 680px;
    padding: 12px;
  }

  .contact-card {
    grid-template-columns: 1fr;
  }

  .instagram-links {
    justify-items: start;
    text-align: left;
  }

  .header-instagram {
    margin-left: 0;
  }

  .partner-link {
    display: grid;
    grid-template-rows: auto 150px;
    gap: 12px;
    justify-items: start;
    min-height: 220px;
    padding: 14px;
  }

  .partner-links {
    grid-template-columns: 1fr;
  }

  .partner-link img {
    width: 100%;
    height: 150px;
  }

  .partner-link span {
    width: 100%;
    margin: 0;
    text-align: left;
  }

  .footer-inner {
    display: grid;
  }
}
/* Keep the primary navigation available when the header has limited width. */
@media (max-width: 1100px) {
  .site-header {
    flex-wrap: wrap;
  }

  .brand {
    flex: 1 1 auto;
  }

  .nav-toggle {
    display: none !important;
  }

  .site-nav,
  .site-nav.open {
    position: static;
    order: 3;
    display: flex;
    flex: 1 0 100%;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 18px;
    padding: 4px 0 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .site-nav a {
    padding: 6px 0;
  }
}

/* Use the compact menu at every viewport width. */
.nav-toggle {
  display: block !important;
  cursor: pointer;
}

.site-nav,
.site-nav.open {
  position: absolute;
  top: calc(100% + 1px);
  right: clamp(18px, 4vw, 56px);
  left: auto;
  z-index: 30;
  display: none;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  min-width: 240px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.site-nav.open {
  display: flex;
}

.site-nav a {
  padding: 10px 12px;
}

.publication-list {
  height: 400px;
  max-height: 400px;
  overflow-y: auto;
}

/* Restore the notices panel below Activity. */
.legacy-news {
  display: block !important;
}

/* Keep the main content compact while retaining readable section separation. */
main > .whats-new,
main > #publications,
main > .legacy-news,
main > .instagram-feed-section {
  padding-top: 24px;
  padding-bottom: 24px;
}

.whats-new .news-list {
  height: 400px;
  max-height: 400px;
  overflow-y: auto;
}

.whats-new .news-body {
  padding-left: 14px;
}


@media (min-width: 921px) {
  main > #activity {
    grid-column: 1 / -1;
    grid-row: 4;
  }

  main > .whats-new {
    grid-column: 1;
    grid-row: 5;
  }

  main > #publications {
    grid-column: 2;
    grid-row: 5;
  }

  main > .instagram-feed-section {
    grid-column: 1 / -1;
    grid-row: 6;
  }

  main > #tools {
    grid-row: 7;
  }

  main > #contact {
    grid-row: 8;
  }

  main > .partner-section {
    grid-row: 9;
  }
}

@media (max-width: 920px) {
  main > #activity { order: 4; }
  main > .whats-new { order: 5; }
  main > #publications { order: 6; }
  main > .instagram-feed-section { order: 7; }
  main > #tools { order: 8; }
  main > #contact { order: 9; }
  main > .partner-section { order: 10; }
}
