.env-banner {
  background: #c62828;
  color: #fff;
  text-align: center;
  padding: 0.3rem;
  font-weight: bold;
}

.contact-form label {
  display: block;
  font-weight: bold;
  margin-bottom: 0.2rem;
}

.contact-form fieldset label {
  display: inline-block;
  font-weight: normal;
  margin-right: 1rem;
}

.contact-form input[type="text"],
.contact-form input[type="tel"],
.contact-form input[type="email"],
.contact-form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.5rem;
  border: 1px solid var(--md-default-fg-color--lighter);
  border-radius: 4px;
  background: var(--md-default-bg-color);
  color: var(--md-default-fg-color);
  font: inherit;
}

.contact-form .must,
.contact-form .free {
  display: inline-block;
  padding: 0 0.4rem;
  margin-right: 0.4rem;
  border-radius: 3px;
  font-size: 0.7rem;
  color: #fff;
}

.contact-form .must { background: #c62828; }
.contact-form .free { background: #757575; }

.contact-form .hp {
  position: absolute;
  left: -9999px;
}

.contact-note { text-align: center; }
.contact-submit { text-align: center; }
.contact-ok { color: #2e7d32; font-weight: bold; }
.contact-error { color: #c62828; font-weight: bold; }

/* 入力エラーの表示（docs/javascripts/contact.js が付与する） */
.contact-form input,
.contact-form textarea {
  /* 固定ヘッダーに、フォーカスした欄が隠れないようにする */
  scroll-margin-top: 9rem;
}

.contact-form [aria-invalid="true"] {
  border-color: #c62828;
  outline: 1px solid #c62828;
}

.contact-form .field-error {
  display: block;
  margin-top: 0.25rem;
  color: #c62828;
  font-size: 0.75rem;
  font-weight: bold;
}

.contact-error-summary {
  margin-bottom: 1rem;
  padding: 0.6rem 1rem;
  border-left: 4px solid #c62828;
  background: #fdecea;
  color: #7f1d1d;
}

.contact-error-summary[hidden] { display: none; }
.contact-error-summary p { margin: 0 0 0.3rem; font-weight: bold; }
.contact-error-summary ul { margin: 0; padding-left: 1.2rem; }
.contact-error-summary a { color: #c62828; text-decoration: underline; }

/* 右側の目次（「目次」）を、全ページで非表示にする。
   テーマの `.md-sidebar--secondary:not([hidden])` と同じ優先度で上書きする。
   本文の幅は、目次があったときと同じに保つ。 */
.md-sidebar--secondary:not([hidden]) { display: none; }
.md-content { max-width: 810px; }

.md-typeset .grid.cards {
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)) !important;
}

.md-typeset .grid.cards > ul > li img {
  width: 100%;
  height: 10rem;
  object-fit: cover;
  border-radius: 4px;
}

/* ---- 現行サイトに近づけたデザイン ---- */
:root,
[data-md-color-scheme="default"] {
  --md-primary-fg-color: #066a9c;
  --md-primary-fg-color--light: #3a8cb5;
  --md-primary-fg-color--dark: #04567f;
  --md-primary-bg-color: #fff;
  --md-accent-fg-color: #066a9c;
  --md-typeset-a-color: #066a9c;
  --md-text-font: "Noto Sans JP", "Hiragino Sans", "Yu Gothic Medium",
    Meiryo, sans-serif;
}

body { overflow-x: clip; }

/* ヘッダー: 白地にロゴ、タブは現行サイト風 */
.site-topline {
  display: flex;
  gap: 1.2rem;
  justify-content: flex-end;
  padding: 0.25rem 1rem;
  font-size: 0.65rem;
  background: #f5f5f5;
  color: #444;
}

.md-header,
.md-tabs {
  background: #fff;
  color: #222;
}

.md-header { box-shadow: none; border-bottom: 1px solid #e6e6e6; }
.md-header__button.md-logo img { height: 2.1rem; width: auto; }
.md-header__title { display: none; }
.md-header__button,
.md-search__icon { color: #222; }
.md-tabs { border-bottom: 1px solid #e6e6e6; }
.md-tabs__link {
  opacity: 1;
  font-size: 0.7rem;
  padding: 0.5rem 0.9rem;
}
.md-tabs__item { height: auto; }
.md-tabs__item--active .md-tabs__link {
  background: #066a9c;
  color: #fff;
}
.md-tabs__link:hover { color: #066a9c; }
.md-tabs__item--active .md-tabs__link:hover { color: #fff; }

/* 本文 */
.md-typeset h1 {
  color: #111;
  font-weight: 500;
  font-size: 1.7rem;
  margin-bottom: 1.2rem;
}
.md-typeset h2 {
  font-weight: 500;
  border-left: 5px solid #066a9c;
  padding-left: 0.6rem;
  margin-top: 2.2rem;
}
.md-typeset table:not([class]) {
  border: 1px solid #d5e3ec;
  font-size: 0.7rem;
}
.md-typeset table:not([class]) th {
  background: #b5d2e2;
  color: #000;
  font-weight: normal;
  white-space: nowrap;
}
.md-typeset .md-button {
  border-radius: 0;
  background: #066a9c;
  border-color: #066a9c;
  color: #fff;
}
.md-nav__link--active,
.md-nav__item .md-nav__link--active { color: #066a9c; }

.page-hero { margin: 0 0 1.2rem; }
.page-hero img { width: 100%; height: auto; display: block; }

/* トップページ */
.home { margin: 0; }
.home-hero,
.home-intro,
.home-banners {
  position: relative;
}

.home-hero {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  height: 28rem;
  overflow: hidden;
  background: #335;
}
.home-hero__slides div {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  animation: home-fade 18s infinite;
}
.home-hero__slides div:nth-child(1) { opacity: 1; }
.home-hero__slides div:nth-child(2) { animation-delay: 6s; }
.home-hero__slides div:nth-child(3) { animation-delay: 12s; }
@keyframes home-fade {
  0% { opacity: 0; }
  8% { opacity: 1; }
  33% { opacity: 1; }
  41% { opacity: 0; }
  100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .home-hero__slides div { animation: none; }
  .home-hero__slides div:not(:first-child) { display: none; }
}
.home-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.18);
}
.home-hero__text {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  padding-bottom: 3rem;
}
.home-hero__catch {
  font-family: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho",
    serif;
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  line-height: 1.6;
  margin: 0 0 1.2rem;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

.home-btn,
.md-typeset a.home-btn {
  display: inline-block;
  min-width: 12rem;
  padding: 0.8rem 1.5rem;
  background: #066a9c;
  color: #fff;
  text-align: center;
  font-weight: 700;
  font-size: 0.7rem;
}
.md-typeset a.home-btn:hover { background: #04567f; color: #fff; }

.home-intro {
  max-width: 50rem;
  margin: -4.5rem auto 3rem;
  padding: 2.2rem 1.5rem;
  background: #fff;
  text-align: center;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.08);
  z-index: 2;
}
.home-intro h1 {
  font-family: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho",
    serif;
  font-size: clamp(1.1rem, 2.8vw, 1.6rem);
  font-weight: 700;
  margin: 0 0 1rem;
}
.home-intro p { margin: 0; font-size: 0.7rem; }

.home-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  max-width: 50rem;
  margin: 0 auto 2rem;
  border: 1px solid #e3e3e3;
}
.home-cards a {
  display: flex;
  flex-direction: column;
  color: inherit;
  border-right: 1px solid #e3e3e3;
  background: #fff;
}
.home-cards a:last-child { border-right: 0; }
.home-cards__title {
  padding: 1.2rem 1rem 0.2rem;
  text-align: center;
  font-family: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho",
    serif;
  font-size: 1.1rem;
  font-weight: 700;
}
.home-cards__sub {
  padding: 0 1rem 1rem;
  text-align: center;
  font-size: 0.65rem;
}
.home-cards img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.2s;
}
.home-cards a:hover img { opacity: 0.8; }

.home-center { text-align: center; margin: 1.5rem 0; }

.home-heading {
  text-align: center;
  border: 0 !important;
  padding: 0 !important;
  margin: 3rem 0 0.5rem;
  font-family: "Noto Serif JP", "Hiragino Mincho ProN", serif;
  font-size: 2rem;
  font-weight: 700;
  color: #111;
}
.home-heading small {
  display: block;
  font-family: var(--md-text-font);
  font-size: 0.65rem;
  font-weight: 400;
}
.home-news { max-width: 50rem; margin: 0 auto; }
.md-typeset .home-news__list {
  list-style: none;
  margin: 1.5rem 0;
  padding: 0;
  border-top: 1px solid #e3e3e3;
}
.md-typeset .home-news__list li {
  display: flex;
  gap: 1.2rem;
  margin: 0;
  padding: 0.8rem 1rem;
  background: #f7f7f7;
  border-bottom: 1px solid #e3e3e3;
  font-size: 0.7rem;
}
.home-news__list time { color: #444; white-space: nowrap; }
.home-news__list a { color: #222; }
.home-news__list a:hover { color: #066a9c; }

.home-banners {
  width: 100vw;
  margin: 3rem 0 0 calc(50% - 50vw);
  padding: 2.5rem 1rem;
  background: #f3f3f3;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1.5rem;
  box-sizing: border-box;
}
.home-banners a {
  position: relative;
  display: block;
  max-width: 22rem;
  width: 100%;
  margin: 0 auto;
  min-height: 5.5rem;
  background: #4d4d4d;
  overflow: hidden;
  color: #fff;
}
.home-banners img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}
.home-banners a::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0) 75%);
}
.home-banners span {
  position: absolute;
  z-index: 1;
  left: 1rem;
  right: 25%;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 700;
  font-size: 0.75rem;
}
.md-main__inner:has(.home) { margin-top: 0; }
.md-content:has(.home) { max-width: none; }
.md-content:has(.home) .md-content__inner {
  margin: 0 auto;
  padding: 0 0.8rem;
  max-width: 61rem;
}
.md-content:has(.home) .md-content__inner::before { display: none; }

/* フッター */
.md-footer { display: none; }
.site-footer { background: #fff; border-top: 1px solid #e6e6e6; }
.site-footer__lead {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  max-width: 61rem;
  margin: 0 auto;
  padding: 1.4rem 1rem;
  font-size: 0.65rem;
}
.site-footer__lead img { display: block; }
.site-footer__lead p { margin: 0; }
.site-footer__cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  max-width: 61rem;
  margin: 0 auto;
  border-top: 1px solid #e6e6e6;
  border-left: 1px solid #e6e6e6;
  border-right: 1px solid #e6e6e6;
}
.site-footer__cols > div {
  padding: 1.2rem 1.4rem;
  border-right: 1px solid #e6e6e6;
}
.site-footer__cols > div:last-child { border-right: 0; }
.site-footer h4 { margin: 0 0 0.7rem; font-size: 0.75rem; }
.site-footer h4 a { color: #066a9c; font-weight: 700; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0.3rem 0; font-size: 0.65rem; }
.site-footer li a { color: #222; }
.site-footer li a:hover { color: #066a9c; }
.site-footer__copy {
  margin-top: 1.5rem;
  padding: 1.1rem 1rem;
  background: #066a9c;
  color: #fff;
  text-align: center;
  font-size: 0.6rem;
  font-weight: 700;
}

@media (max-width: 59.9375em) {
  .site-topline { display: none; }
  .home-hero { height: 20rem; }
  .home-cards a { border-right: 0; border-bottom: 1px solid #e3e3e3; }
}

.home a,
.site-footer a { text-decoration: none; }
.home-banners {
  justify-items: center;
  padding-left: max(1rem, calc(50vw - 30.5rem));
  padding-right: max(1rem, calc(50vw - 30.5rem));
}
.home-banners a { max-width: none; }

@media (max-width: 59.9375em) {
  .home-cards img { max-height: 14rem; }
}

/* サイドバーの画像バナー */
.side-banners { margin: 1.5rem 0.6rem 1rem; }
.side-banners a {
  position: relative;
  display: block;
  margin-bottom: 0.6rem;
  background: #333;
  overflow: hidden;
  line-height: 0;
}
.side-banners img { display: block; width: 100%; height: auto; }
.side-banners a::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 80%);
}
.side-banners span {
  position: absolute;
  z-index: 1;
  left: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 1.5;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
.side-banners a:hover img { opacity: 0.85; }

/* 地図の静止画像 */
.map-figure { margin: 1rem 0; }
.map-figure img { width: 100%; height: auto; display: block; }
.map-figure figcaption { font-size: 0.6rem; margin-top: 0.3rem; }
