.mpf-system {
  width: min(1100px, calc(100% - 32px));
  margin: 56px auto;
  color: #172033;
  font-size: 16px;
  line-height: 1.8;
}

.mpf-system *,
.mpf-system *::before,
.mpf-system *::after {
  box-sizing: border-box;
}

.mpf-system p {
  margin: 0;
}

.mpf-system img {
  max-width: 100%;
  display: block;
}

.mpf-system .mpf-main-image {
  max-width: none;
  width: 100%;
  height: 100%;
}

.mpf-system button,
.mpf-system input,
.mpf-system select,
.mpf-system textarea {
  font: inherit;
}

.mpf-gallery {
  --mpf-navy: #07175d;
  --mpf-blue: #163b8f;
  --mpf-gold: #c7a34a;
  --mpf-ink: #172033;
  --mpf-muted: #667085;
  --mpf-line: #e7eaf0;
}
.mpf-gallery-heading {
  text-align: center;
  margin-bottom: 28px;
}
.mpf-gallery-subtitle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  color: var(--mpf-blue);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.mpf-gallery-subtitle::before,
.mpf-gallery-subtitle::after {
  content: "";
  width: 34px;
  height: 1px;
  background: var(--mpf-gold);
}
.mpf-gallery-heading h2 {
  position: relative;
  margin: 0;
  padding-bottom: 16px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.35;
  font-weight: 900;
  letter-spacing: .04em;
  color: var(--mpf-navy);
}
.mpf-gallery-heading h2::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 74px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--mpf-navy), var(--mpf-gold));
  transform: translateX(-50%);
}

.mpf-category-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0 0 24px;
}

.mpf-tab {
  appearance: none;
  border: 1px solid rgba(7, 23, 93, .16);
  background: #fff;
  color: var(--mpf-navy);
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(7, 23, 93, .06);
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}

.mpf-tab:hover,
.mpf-tab:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(199, 163, 74, .7);
  outline: none;
}

.mpf-tab.is-active {
  background: var(--mpf-navy);
  border-color: var(--mpf-navy);
  color: #fff;
}

.mpf-thumb.is-hidden {
  display: none;
}
.mpf-main-frame {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, .85fr);
  gap: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--mpf-line);
  border-radius: 24px;
  box-shadow: 0 18px 45px rgba(7, 23, 93, .14);
}
.mpf-main-image-wrap {
  position: relative;
  height: clamp(320px, 36vw, 460px);
  background: #f3f5f9;
  overflow: hidden;
}

.mpf-main-image-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 10px rgba(255,255,255,.58);
}

.mpf-main-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center center;
  opacity: 1;
  transform: scale(1);
  transition: opacity .28s ease, transform .28s ease;
}

.mpf-main-frame.is-changing .mpf-main-image {
  opacity: .18;
  transform: scale(.985);
}
.mpf-main-caption {
  position: relative;
  padding: clamp(24px, 4vw, 42px);
  background: linear-gradient(145deg, #ffffff 0%, #f7f9fd 100%);
  border-left: 1px solid var(--mpf-line);
}
.mpf-main-caption::before {
  content: "";
  position: absolute;
  top: 28px;
  right: 28px;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(199,163,74,.22), rgba(199,163,74,0) 68%);
}
.mpf-main-date {
  display: inline-flex;
  margin: 0 0 18px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(7, 23, 93, .08);
  color: var(--mpf-navy);
  font-weight: 800;
  font-size: 13px;
  line-height: 1.4;
}
.mpf-main-caption h3 {
  margin: 18px 0;
  color: var(--mpf-navy);
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.5;
  font-weight: 900;
}
.mpf-main-desc {
  margin: 0;
  color: var(--mpf-muted);
  font-size: 15px;
  line-height: 1.9;
  white-space: pre-line;
}
.mpf-thumb-grid {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

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

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

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


.mpf-thumb {
  appearance: none;
  width: 100%;
  padding: 0;
  overflow: hidden;
  text-align: left;
  background: #fff;
  border: 1px solid var(--mpf-line);
  border-radius: 0 0 18px 18px;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(7, 23, 93, .08);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.mpf-thumb:hover,
.mpf-thumb:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(22,59,143,.35);
  box-shadow: 0 16px 34px rgba(7, 23, 93, .14);
  outline: none;
}
.mpf-thumb.is-active {
  border-color: var(--mpf-gold);
  box-shadow: 0 16px 34px rgba(199, 163, 74, .22);
}
.mpf-thumb-photo {
  position: relative;
  display: block;
  width: calc(100% + 2px);
  aspect-ratio: 4 / 3;
  margin: -1px -1px 0;
  padding: 0;
  background: #f3f5f9;
  overflow: hidden;
  line-height: 0;
}


.mpf-thumb-photo::after {
  content: "選択中";
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--mpf-navy);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: .04em;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
}
.mpf-thumb-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center top;
  margin: 0;
  padding: 0;
  border: 0;
  transition: transform .28s ease;
}
.mpf-thumb:hover .mpf-thumb-photo img {
  transform: scale(1.04);
}
.mpf-thumb-caption {
  display: block;
  padding: 17px 16px 19px;
}
.mpf-thumb-date {
  display: block;
  margin: 0 0 10px;
  color: var(--mpf-blue);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}
.mpf-thumb-title {
  display: block;
  margin: 0;
  color: var(--mpf-ink);
  font-size: 15px;
  line-height: 1.65;
  font-weight: 800;
}
.mpf-empty {
  width: min(1100px, calc(100% - 32px));
  margin: 24px auto;
  padding: 16px;
  background: #fff8e5;
  border: 1px solid #f1d48a;
  border-radius: 10px;
}
.mpf-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 28px 0 0;
}

.mpf-pagination[hidden] {
  display: none;
}

.mpf-page-btn {
  appearance: none;
  min-width: 38px;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid rgba(7, 23, 93, .18);
  border-radius: 999px;
  background: #fff;
  color: var(--mpf-navy);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(7, 23, 93, .06);
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}

.mpf-page-btn:hover,
.mpf-page-btn:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(199, 163, 74, .7);
  outline: none;
}

.mpf-page-btn.is-active {
  background: var(--mpf-navy);
  border-color: var(--mpf-navy);
  color: #fff;
}

.mpf-page-btn:disabled {
  opacity: .45;
  cursor: default;
  transform: none;
  box-shadow: none;
}
@media (max-width: 860px) {
  .mpf-system {
    width: min(100% - 24px, 1100px);
    margin: 40px auto;
  }

  .mpf-main-frame {
    grid-template-columns: 1fr;
    border-radius: 20px;
  }

	.mpf-main-image-wrap {
	  height: 280px;
	}

  .mpf-main-caption {
    border-left: 0;
    border-top: 1px solid var(--mpf-line);
    padding: 22px;
  }

  .mpf-thumb-grid {
    gap: 14px;
  }

  .mpf-columns-3 .mpf-thumb-grid,
  .mpf-columns-4 .mpf-thumb-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 540px) {
  .mpf-system {
    width: min(100% - 20px, 1100px);
    margin: 32px auto;
  }

  .mpf-gallery-subtitle::before,
  .mpf-gallery-subtitle::after {
    width: 20px;
  }

  .mpf-category-tabs {
    gap: 8px;
    margin-bottom: 18px;
  }

  .mpf-tab {
    padding: 8px 13px;
    font-size: 13px;
  }

  .mpf-main-frame {
    border-radius: 18px;
  }

	.mpf-main-image-wrap {
	  height: 220px;
	}

  .mpf-main-caption {
    padding: 20px;
  }

  .mpf-main-caption h3 {
    font-size: 22px;
  }

  .mpf-main-desc {
    font-size: 14px;
    line-height: 1.8;
  }

  .mpf-columns-2 .mpf-thumb-grid,
  .mpf-columns-3 .mpf-thumb-grid,
  .mpf-columns-4 .mpf-thumb-grid {
    grid-template-columns: 1fr;
  }

  .mpf-thumb-caption {
    padding: 16px 15px 18px;
  }

  .mpf-thumb-date {
    margin-bottom: 9px;
    font-size: 13px;
    line-height: 1.45;
  }

  .mpf-thumb-title {
    font-size: 14px;
    line-height: 1.65;
  }

  .mpf-page-btn {
    min-width: 36px;
    min-height: 36px;
    padding: 7px 11px;
    font-size: 13px;
  }
}
