/* 岸高'e'博物館・岸高教育コレクション共通 */

.museum-hero {
  position: relative;
  overflow: hidden;
  background: #edf7f3;
}

.museum-hero::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 65, 50, 0.9), rgba(0, 98, 76, 0.66) 55%, rgba(0, 74, 57, 0.3)),
    radial-gradient(circle at 82% 30%, rgba(255, 255, 255, 0.22), transparent 30%);
  content: "";
}

.museum-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.museum-hero .page-hero__inner {
  z-index: 1;
}

.museum-hero .page-hero__label,
.museum-hero h1,
.museum-hero .page-hero__lead {
  color: #fff;
}

.museum-hero--compact .page-hero__inner {
  min-height: 250px;
}

.museum-title-alias {
  white-space: nowrap;
}

.museum-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(250px, 0.8fr);
  gap: clamp(22px, 4vw, 46px);
  align-items: center;
}

.museum-intro__eyebrow,
.museum-section__eyebrow,
.collection-eyebrow {
  margin: 0 0 5px;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.subpage-content .museum-intro h2,
.subpage-content .museum-intro p {
  margin-top: 0;
}

.museum-intro__facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.museum-intro__facts div {
  padding: 18px;
  border: 1px solid #d7e6e0;
  border-radius: 14px;
  background: #f7fbf9;
}

.museum-intro__facts dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.museum-intro__facts dd {
  margin: 3px 0 0;
  color: var(--green);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 900;
  line-height: 1.3;
}

.museum-portals {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 40px 0;
}

.museum-portal {
  position: relative;
  display: flex;
  min-height: 310px;
  padding: clamp(24px, 4vw, 40px);
  overflow: hidden;
  border-radius: 22px;
  color: #fff;
  isolation: isolate;
}

.museum-portal::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(145deg, rgba(0, 57, 44, 0.96), rgba(0, 122, 94, 0.82));
  content: "";
}

.museum-portal--collection::before {
  background:
    linear-gradient(145deg, rgba(57, 45, 24, 0.94), rgba(100, 73, 27, 0.72)),
    url("../images/kishicolle/items/02-03/02-03_00.jpg") center / cover;
}

.museum-portal--research::before {
  background:
    linear-gradient(145deg, rgba(6, 46, 80, 0.95), rgba(29, 71, 144, 0.75)),
    url("../images/education-cover.png") center / cover;
}

.museum-portal__body {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.museum-portal__label {
  margin-bottom: 20px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.museum-portal strong {
  display: block;
  margin-bottom: 12px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.4;
}

.museum-portal small {
  display: block;
  font-size: 15px;
  line-height: 1.8;
}

.museum-portal__action {
  align-self: flex-start;
  margin-top: auto;
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.museum-portal:hover .museum-portal__action {
  background: #fff;
  color: var(--green);
}

.museum-link-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.museum-link-card {
  display: flex;
  flex-direction: column;
  min-height: 180px;
  padding: 22px;
  border: 1px solid #d8e4e0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(24, 56, 47, 0.06);
}

.museum-link-card strong {
  margin: 5px 0 8px;
  font-size: 19px;
}

.museum-link-card small {
  color: var(--muted);
  line-height: 1.7;
}

.museum-link-card span:last-child {
  margin-top: auto;
  padding-top: 14px;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
}

.museum-link-card:hover {
  border-color: var(--green);
  transform: translateY(-2px);
}

/* 図鑑検索 */
.collection-page {
  background: #f4f7f6;
}

.collection-search-shell {
  margin-top: 24px;
  position: relative;
  z-index: 2;
}

.collection-search {
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid #d8e5e0;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(31, 61, 52, 0.1);
}

.collection-search__heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.collection-search__heading h2,
.collection-search__heading p {
  margin: 0;
}

.collection-search__heading > p {
  color: var(--muted);
  font-size: 14px;
}

.collection-filter {
  display: grid;
  grid-template-columns: minmax(260px, 2fr) minmax(170px, 1fr) minmax(180px, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.collection-filter > * {
  min-width: 0;
}

.collection-filter label {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
  font-weight: 800;
}

.collection-filter input,
.collection-filter select {
  width: 100%;
  min-height: 48px;
  padding: 10px 13px;
  border: 1px solid #cbd9d4;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.collection-filter input:focus,
.collection-filter select:focus {
  border-color: var(--green);
}

.collection-filter__clear {
  min-height: 48px;
  padding: 9px 16px;
  border: 1px solid #bccdc7;
  border-radius: 10px;
  background: #f4f7f6;
  color: var(--green);
  font-weight: 800;
  cursor: pointer;
}

.collection-category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.collection-chip {
  padding: 7px 12px;
  border: 1px solid #d6e2de;
  border-radius: 999px;
  background: #fff;
  color: #3c514b;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.collection-chip.is-active,
.collection-chip:hover {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.collection-results {
  padding: 38px 0 60px;
}

.collection-results__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.collection-results__bar p {
  margin: 0;
}

.collection-results__count {
  font-size: 18px;
  font-weight: 900;
}

.collection-results__hint {
  color: var(--muted);
  font-size: 13px;
}

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

.collection-card {
  position: relative;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid #dce4e1;
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.collection-card:hover {
  border-color: #86b9a9;
  box-shadow: 0 12px 28px rgba(25, 63, 51, 0.12);
  transform: translateY(-3px);
}

.collection-card__image {
  display: block;
  width: 100%;
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #e9efed;
}

.collection-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.collection-card:hover .collection-card__image img {
  transform: scale(1.035);
}

.collection-card__number {
  position: absolute;
  right: 9px;
  bottom: 9px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(0, 53, 41, 0.82);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

.collection-card__body {
  display: block;
  min-height: 154px;
  padding: 15px;
}

.collection-card__category {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
}

.collection-card__title {
  display: block;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.45;
}

.collection-card__summary {
  display: -webkit-box;
  margin-top: 7px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.collection-load-more {
  display: block;
  min-width: 220px;
  min-height: 48px;
  margin: 30px auto 0;
  padding: 10px 22px;
  border: 1px solid var(--green);
  border-radius: 999px;
  background: #fff;
  color: var(--green);
  font-weight: 900;
  cursor: pointer;
}

.collection-load-more:hover {
  background: var(--green);
  color: #fff;
}

.collection-empty {
  padding: 46px 24px;
  border: 1px dashed #bdcec8;
  border-radius: 16px;
  background: #fff;
  text-align: center;
}

.collection-empty h3,
.collection-empty p {
  margin: 0;
}

.collection-empty p {
  margin-top: 6px;
  color: var(--muted);
}

.collection-note {
  margin-top: 34px;
  padding: 20px 24px;
  border-left: 4px solid var(--green);
  border-radius: 0 12px 12px 0;
  background: #edf5f2;
}

.collection-note h2,
.collection-note p {
  margin: 0;
}

.collection-note h2 {
  font-size: 17px;
}

.collection-note p {
  margin-top: 6px;
  color: #44534e;
  font-size: 13px;
}

/* 詳細ダイアログ */
.collection-dialog {
  width: min(940px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0, 30, 23, 0.3);
}

.collection-dialog::backdrop {
  background: rgba(10, 24, 20, 0.72);
}

.collection-dialog__close {
  position: sticky;
  top: 12px;
  z-index: 2;
  float: right;
  width: 44px;
  height: 44px;
  margin: 12px 12px -56px 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: #24312d;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.collection-dialog__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
}

.collection-dialog__media {
  min-width: 0;
  padding: 18px;
  background: #e7eeeb;
}

.collection-dialog__main-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
}

.collection-dialog__thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  padding: 2px;
  overflow-x: auto;
}

.collection-dialog__thumb {
  flex: 0 0 66px;
  width: 66px;
  height: 52px;
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.collection-dialog__thumb.is-active {
  border-color: var(--green);
}

.collection-dialog__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.collection-dialog__content {
  padding: clamp(26px, 4vw, 42px);
}

.collection-dialog__category {
  margin: 0 0 7px;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.collection-dialog__content h2 {
  margin: 0;
  font-size: clamp(25px, 3vw, 35px);
  line-height: 1.4;
}

.collection-dialog__summary {
  margin: 20px 0 0;
  color: #37423e;
  font-size: 14px;
  white-space: pre-line;
}

.collection-dialog__meta {
  display: grid;
  gap: 7px;
  margin: 22px 0 0;
  padding: 16px 0;
  border-top: 1px solid #e0e7e4;
  border-bottom: 1px solid #e0e7e4;
}

.collection-dialog__meta div {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 10px;
}

.collection-dialog__meta dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.collection-dialog__meta dd {
  margin: 0;
  font-size: 13px;
}

.collection-dialog__documents {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.collection-dialog__documents a {
  padding: 8px 13px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.collection-dialog__source {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 11px;
}

/* 3Dアーカイブ */
.museum-coming-soon {
  max-width: 760px;
  margin: 20px auto 0;
  padding: clamp(42px, 8vw, 78px) clamp(24px, 6vw, 64px);
  border: 1px solid #d5e3de;
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 0, rgba(0, 122, 94, 0.1), transparent 46%),
    #f8fbfa;
  text-align: center;
}

.museum-coming-soon__mark {
  display: grid;
  width: 92px;
  height: 92px;
  margin: 0 auto 22px;
  place-items: center;
  border: 1px solid #b9d3ca;
  border-radius: 22px;
  background: #fff;
  color: var(--green);
  font-size: 29px;
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1;
  box-shadow: 0 10px 28px rgba(24, 68, 54, 0.1);
}

.subpage-content .museum-coming-soon h2,
.subpage-content .museum-coming-soon p {
  margin-top: 0;
}

.subpage-content .museum-coming-soon h2 {
  margin-bottom: 12px;
}

.subpage-content .museum-coming-soon > p:last-child {
  max-width: 580px;
  margin: 0 auto;
  color: #53615c;
}

@media (max-width: 920px) {
  .collection-filter {
    grid-template-columns: 2fr 1fr;
  }

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

  .collection-dialog__layout {
    grid-template-columns: 1fr;
  }

  .collection-dialog__main-image {
    max-height: 52vh;
  }
}

@media (max-width: 720px) {
  .museum-intro,
  .museum-portals,
  .museum-link-grid,
  .model-info-grid {
    grid-template-columns: 1fr;
  }

  .museum-portal {
    min-height: 270px;
  }

  .collection-search-shell {
    margin-top: 12px;
  }

  .collection-search__heading,
  .collection-results__bar,
  .model-stage__bar {
    display: block;
  }

  .collection-search__heading > p,
  .collection-results__hint,
  .model-stage__bar p {
    margin-top: 6px;
  }

  .collection-filter {
    grid-template-columns: 1fr;
  }

  .collection-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .collection-card__body {
    min-height: 138px;
    padding: 12px;
  }

  .collection-card__title {
    font-size: 15px;
  }

  .collection-card__summary {
    font-size: 11px;
  }

  .collection-dialog__media {
    padding: 12px;
  }

  .collection-dialog__content {
    padding: 24px 20px 30px;
  }

}

@media (max-width: 420px) {
  .museum-hero--compact h1 {
    font-size: 27px;
  }

  .collection-search {
    padding: 18px 16px;
    border-radius: 16px;
  }

  .collection-search__heading {
    margin-bottom: 14px;
  }

  .collection-search__heading h2 {
    font-size: clamp(20px, 6vw, 23px);
    line-height: 1.45;
  }

  .collection-filter {
    gap: 12px;
  }

  .collection-category-chips {
    gap: 6px;
  }

  .collection-chip {
    padding: 6px 10px;
  }

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

  .collection-card {
    display: grid;
    grid-template-columns: 42% 1fr;
  }

  .collection-card__image {
    height: 100%;
    aspect-ratio: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .collection-card,
  .collection-card__image img,
  .museum-link-card {
    transition: none;
  }
}
