@import url("https://fonts.googleapis.com/css2?family=Noto+Sans:wght@400;500;600;700&family=Noto+Sans+JP:wght@400;500;600;700&display=swap");

html {
  --pst-font-family-base: "Noto Sans", "Noto Sans JP", sans-serif;
  --pst-font-family-heading: "Noto Sans", "Noto Sans JP", sans-serif;
  --pst-font-family-monospace: "Noto Sans", "Noto Sans JP", sans-serif;
}

body,
button,
input,
select,
textarea {
  font-family: "Noto Sans", "Noto Sans JP", sans-serif;
}

/* 長い日本語の委員会名を、小さい画面でも折り返して表示します。 */
.navbar-brand {
  white-space: normal;
  height: auto;
  min-width: 0;
}

.navbar-brand .title {
  white-space: normal;
  font-size: clamp(1.15rem, 2.5vw, 1.75rem);
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.bd-header .navbar-header-items__start {
  min-width: 0;
}

h1 {
  line-height: 1.5;
  overflow-wrap: anywhere;
}

/* 委員会名と、その下のメニューバー。 */
.committee-header {
  width: 100%;
  min-width: 0;
}

.bd-header .navbar-header-items__start {
  flex: 1 1 auto;
}

.committee-nav {
  border-top: 1px solid var(--pst-color-border);
  margin-top: .4rem;
}

.committee-menu {
  display: flex;
  flex-wrap: wrap;
  gap: .2rem 1rem;
  list-style: none;
  padding: .35rem 0;
  margin: 0;
}

.committee-menu > li {
  display: flex;
  align-items: center;
}

.committee-menu > li > a,
.committee-submenu-toggle {
  padding: .5rem .35rem;
  color: var(--pst-color-text-base);
  border-radius: .25rem;
}

.committee-menu a,
.committee-menu a:hover,
.committee-menu a:focus {
  text-decoration: none;
}

.committee-menu a[aria-current="page"] {
  color: var(--pst-color-primary);
  font-weight: 700;
}

.committee-submenu-toggle {
  border: 0;
  background: transparent;
  min-width: 2.75rem;
  min-height: 2.75rem;
}

.committee-menu > li > a:hover,
.committee-submenu-toggle:hover {
  background: var(--pst-color-surface);
}

.committee-menu a:focus-visible,
.committee-submenu-toggle:focus-visible {
  outline: 2px solid var(--pst-color-primary);
  outline-offset: 2px;
}

/* 全画面幅で、タイトル → メニューバー → 本文の一列構成にします。 */
.committee-brand {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding-bottom: .75rem;
  color: var(--pst-color-text-base);
  text-decoration: none;
}

.committee-brand:hover {
  color: var(--pst-color-text-base);
  text-decoration: none;
}

.committee-brand-image {
  display: block;
  height: 120px;
  width: auto;
  max-width: none;
  flex: 0 0 auto;
}

.committee-brand-title {
  font-size: clamp(1.15rem, 2.5vw, 1.75rem);
  font-weight: 700;
  line-height: 1.6;
  overflow-wrap: anywhere;
  min-width: 0;
}

.committee-brand:focus-visible {
  outline: 2px solid var(--pst-color-primary);
  outline-offset: 4px;
}

.committee-site-header {
  display: block;
  position: relative;
  height: auto;
  padding: 0;
  background: var(--pst-color-background);
}

.committee-header-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem .25rem;
}

.committee-header .navbar-brand {
  display: block;
  margin: 0;
  padding: 0 0 .75rem;
}

#pst-primary-sidebar,
#pst-secondary-sidebar,
#pst-primary-sidebar-modal,
#pst-secondary-sidebar-modal,
.bd-header-article {
  display: none !important;
}

.bd-container__inner,
.bd-main,
.bd-content,
.bd-article-container {
  width: 100%;
  max-width: 1140px;
  margin-inline: auto;
}

.bd-main .bd-article-container {
  padding: 2rem 1.5rem;
}

.bd-main .bd-article {
  max-width: none;
}

/* 学術団体らしい紺色のアクセントと、読みやすい紙面。 */
html[data-theme="light"] {
  --pst-color-primary: #234e70;
  --pst-color-background: #f4f6f8;
  --pst-color-text-base: #283746;
}

.committee-site-header {
  border-top: 5px solid #234e70;
  border-bottom: 1px solid var(--pst-color-border);
}

.committee-brand-title {
  color: var(--pst-color-primary);
  letter-spacing: .04em;
}

.committee-nav {
  border-top: 1px solid var(--pst-color-border);
}

.committee-menu a[aria-current="page"] {
  background: var(--pst-color-surface);
  box-shadow: inset 0 -3px 0 var(--pst-color-primary);
}

.bd-main .bd-article {
  background: var(--pst-color-background);
  border: 1px solid var(--pst-color-border);
  border-top: 3px solid var(--pst-color-primary);
  border-radius: 3px;
  padding: clamp(1.25rem, 4vw, 3rem);
  box-shadow: 0 4px 18px rgb(25 45 65 / 4%);
}

html[data-theme="light"] .bd-main .bd-article {
  background: #fff;
}

.bd-article h1 {
  color: var(--pst-color-primary);
  font-size: clamp(1.5rem, 3vw, 2rem);
  padding-bottom: 1rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--pst-color-border);
}

.bd-article h2 {
  font-size: 1.4rem;
  padding: .45rem 0 .45rem 1rem;
  border-left: 4px solid var(--pst-color-primary);
  margin-top: 2.5rem;
}

.bd-article h3 {
  font-size: 1.15rem;
  color: var(--pst-color-primary);
}

/* 賞別の見出しは、ページ内リンクで移動した後も同じ装飾にします。 */
.bd-main .bd-content .bd-article-container .bd-article #encouragement-award > h2,
.bd-main .bd-content .bd-article-container .bd-article #student-award > h2 {
  background-color: transparent;
}

.bd-article p,
.bd-article li {
  line-height: 1.95;
}

.bd-article a.meeting-notice-button {
  background-color: #234e70;
  border-color: #234e70;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.bd-article a.meeting-notice-button:hover,
.bd-article a.meeting-notice-button:active {
  background-color: #e2edf5;
  border-color: #234e70;
  color: #234e70;
  text-decoration: none;
}

.bd-article a.meeting-notice-button:focus-visible {
  outline: 3px solid #234e70;
  outline-offset: 3px;
}

.bd-article a.meeting-submission-button {
  background-color: #a84716;
  border-color: #a84716;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.bd-article a.meeting-submission-button:hover,
.bd-article a.meeting-submission-button:active {
  background-color: #fbe9dc;
  border-color: #a84716;
  color: #843711;
  text-decoration: none;
}

.bd-article a.meeting-submission-button:focus-visible {
  outline: 3px solid #a84716;
  outline-offset: 3px;
}

.academic-intro {
  padding: 1.5rem;
  margin-bottom: 2rem;
  border-left: 4px solid var(--pst-color-primary);
  background: var(--pst-color-surface);
}

.academic-intro p:last-child {
  margin-bottom: 0;
}

.committee-announcement {
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  border: 1px solid #e4c4a3;
  border-left: 5px solid #a84716;
  border-radius: 4px;
  background: #fff7ed;
  color: #493323;
}

.committee-announcement strong {
  color: #843711;
  font-size: 1.1rem;
}

.committee-announcement a {
  color: #843711;
  font-weight: 700;
}

.committee-announcement p:last-child {
  margin-bottom: 0;
}

.bd-article .sd-card {
  border-radius: 3px;
  border-top: 3px solid var(--pst-color-primary);
  box-shadow: none !important;
}

.bd-article .sd-card-title {
  color: var(--pst-color-primary);
  font-size: 1.05rem;
  line-height: 1.6;
}

.bd-article .committee-news-card {
  border-top-color: #a84716;
}

.bd-article .committee-news-card .sd-card-body {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  column-gap: 1.5rem;
  row-gap: .5rem;
  align-items: start;
}

.bd-article .committee-news-card .sd-card-title {
  grid-column: 2;
  grid-row: 1;
  margin-bottom: 0;
}

.bd-article .committee-news-card .sd-card-body > p:not(:has(img)) {
  grid-column: 2;
  grid-row: 2;
  margin: 0;
}

.bd-article .committee-news-card .sd-card-body > p:has(img) {
  grid-column: 1;
  grid-row: 1 / span 2;
  margin: 0;
}

.bd-article .committee-news-card img {
  display: block;
  height: 120px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}

/* カード本文は2行まで表示し、写真はそのまま表示します。 */
.bd-article .sd-card-body > p:not(:has(img)) {
  font-size: .9rem;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.committee-card-expand {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.committee-card-expand:hover {
  text-decoration: underline;
}

.committee-card-expand:focus-visible {
  outline: 2px solid var(--pst-color-primary);
  outline-offset: 4px;
}

.committee-card-dialog {
  width: min(900px, calc(100% - 2rem));
  max-height: 90vh;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  border: 1px solid var(--pst-color-border);
  border-top: 4px solid var(--pst-color-primary);
  border-radius: 6px;
  background: var(--pst-color-background);
  color: var(--pst-color-text-base);
  overflow-y: auto;
}

.committee-card-dialog::backdrop {
  background: rgb(15 30 45 / 65%);
}

.committee-card-dialog-close {
  display: block;
  margin-left: auto;
  padding: .4rem .75rem;
  border: 1px solid var(--pst-color-border);
  border-radius: 4px;
  background: var(--pst-color-surface);
  color: var(--pst-color-text-base);
  cursor: pointer;
}

.committee-card-dialog h2 {
  margin: 1rem 0 1.5rem;
  color: var(--pst-color-primary);
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  line-height: 1.6;
}

.committee-card-dialog-content {
  font-size: 1.05rem;
  line-height: 1.9;
}

.committee-card-dialog-content img {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 1.5rem;
}

@media (max-width: 575.98px) {
  .bd-article .committee-news-card .sd-card-body {
    column-gap: .75rem;
  }

  .bd-article .committee-news-card img {
    max-width: 28vw;
  }

  .committee-brand {
    gap: .75rem;
  }

  .committee-header-inner {
    padding-inline: 1rem;
  }

  .committee-menu {
    gap: .2rem .5rem;
  }

  .bd-main .bd-article-container {
    padding: 1.5rem 1rem;
  }
}
