:root {
  --pj-bg-start: #ffffff;
  --pj-bg-end: #f4efe3;
  --pj-panel: #ffffff;
  --pj-panel-soft: #f7f3ea;
  --pj-ink: #24201a;
  --pj-sub: #6b6258;
  --pj-line: #e3dccb;
  --pj-accent: #c2924a;
  --pj-accent-dark: #a5793a;
  --pj-accent-soft: rgba(194, 146, 74, 0.14);
  --pj-on-accent: #2a2013;
  --pj-danger: #c1554a;
  --pj-font-serif: 'Shippori Mincho', 'Yu Mincho', serif;
  --pj-font-sans: 'Noto Sans JP', 'Segoe UI', 'Yu Gothic UI', sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body {
  font-family: var(--pj-font-sans);
  color: var(--pj-ink);
  background: linear-gradient(160deg, var(--pj-bg-start) 0%, var(--pj-bg-end) 100%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.pj-page {
  width: min(1200px, calc(100% - 32px));
  margin: 32px auto 72px;
}

.pj-page-title-wrap {
  margin: 0 0 20px;
  padding: 20px 26px;
  border-radius: 4px;
  border: 1px solid var(--pj-line);
  background: var(--pj-panel);
  position: relative;
  overflow: hidden;
}

.pj-page-title-wrap::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--pj-accent);
}

.pj-page-title {
  margin: 0;
  padding-left: 16px;
  font-family: var(--pj-font-serif);
  font-weight: 600;
  font-size: clamp(1.5rem, 2.8vw, 2.15rem);
  line-height: 1.35;
  letter-spacing: 0.02em;
  color: var(--pj-ink);
}

/* ヒーロー写真を画面いっぱいに広げ、タイトルを上部に重ねる構成 */
.pj-hero-frame {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  margin: 0;
}

.pj-page-title-wrap-overlay {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: auto;
  z-index: 4;
  margin: 0;
  padding: clamp(28px, 6vh, 56px) clamp(20px, 5vw, 64px) 0;
  border: 0;
  border-radius: 0;
  background: none;
  pointer-events: none;
}

.pj-page-title-wrap-overlay::before {
  content: '';
  position: static;
  display: block;
  width: 52px;
  height: 3px;
  margin-bottom: 16px;
  background: var(--pj-accent);
}

.pj-page-title-wrap-overlay .pj-page-title {
  padding-left: 0;
  color: #faf6ec;
  font-size: clamp(1.7rem, 3.6vw, 2.7rem);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.6);
}

.pj-hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  align-items: stretch;
}

.pj-hero-no-summary {
  grid-template-columns: 1fr;
}

.pj-hero-no-summary .pj-slideshow {
  width: 100%;
}

.pj-hero-frame .pj-hero,
.pj-hero-frame .pj-slideshow,
.pj-hero-frame .pj-slide-track {
  height: 100%;
  border-radius: 0;
}

.pj-slideshow {
  background: var(--pj-panel);
  border: 1px solid var(--pj-line);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  align-self: start;
}

.pj-hero-frame .pj-slideshow {
  border: 0;
}

.pj-hero-frame .pj-slideshow::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(4, 3, 2, 0.32) 0%, rgba(4, 3, 2, 0.08) 30%, rgba(4, 3, 2, 0) 55%, rgba(4, 3, 2, 0.25) 100%);
}

.pj-slide-track {
  position: relative;
  height: 480px;
}

/* JSが計算するcontain用の高さを打ち消し、常に画面いっぱいに表示する */
.pj-hero-frame .pj-slide-track {
  height: 100vh !important;
  height: 100dvh !important;
}

.pj-slide {
  opacity: 0;
  position: absolute;
  inset: 0;
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--pj-panel-soft);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  transition: opacity 1.2s ease;
}

.pj-slide.is-active {
  opacity: 1;
  z-index: 1;
}

.pj-slide img {
  width: 100%;
  height: 100%;
  display: block;
  max-width: 100%;
  object-fit: contain;
  object-position: center center;
  margin: 0;
  flex: 0 0 auto;
}

/* ヒーロー画像はゆっくりズームしながらクロスフェードで切り替える */
@keyframes pj-hero-kenburns {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.15);
  }
}

.pj-hero-frame .pj-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform-origin: center center;
  will-change: transform;
}

.pj-hero-frame .pj-slide.is-active img {
  animation: pj-hero-kenburns 9s ease-out forwards;
}

.pj-slide-fallback {
  height: 100%;
  background: linear-gradient(135deg, #f7f2e6 0%, #eee3ca 100%);
  display: grid;
  place-items: center;
}

.pj-slide-fallback-inner {
  width: min(82%, 620px);
  text-align: left;
}

.pj-slide-fallback-inner h1 {
  margin: 0 0 12px;
  font-family: var(--pj-font-serif);
  font-weight: 600;
  font-size: clamp(1.4rem, 2.8vw, 2.05rem);
  color: var(--pj-ink);
}

.pj-slide-fallback-inner p {
  margin: 0;
  color: var(--pj-sub);
  line-height: 1.8;
}

.pj-slide-dots {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 5;
}

.pj-slide-dot {
  width: 7px;
  height: 7px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  padding: 0;
  transition: width 0.2s ease, background 0.2s ease;
}

.pj-slide-dot.is-active {
  width: 20px;
  background: var(--pj-accent);
  box-shadow: none;
}

.pj-summary-card {
  background: var(--pj-panel);
  border: 1px solid var(--pj-line);
  border-radius: 4px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ヒーロー写真の上に重ねる支援サマリー（ねぶた祭サイトのような写真主体の見せ方） */
.pj-hero-frame .pj-summary-card {
  position: absolute;
  left: clamp(20px, 5vw, 64px);
  right: clamp(20px, 5vw, 64px);
  bottom: clamp(22px, 5vh, 52px);
  z-index: 4;
  max-width: 460px;
  background: rgba(10, 8, 6, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-color: rgba(255, 255, 255, 0.14);
  padding: 20px 22px;
  gap: 14px;
}

.pj-hero-frame .pj-summary {
  font-size: 0.92rem;
  line-height: 1.65;
}

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

.pj-hero-frame .pj-stat-item {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 10px 12px;
}

.pj-hero-frame .pj-progress-wrap {
  padding: 4px 2px 0;
}

.pj-hero-frame .pj-cta {
  align-self: flex-start;
}

.pj-title {
  margin: 0;
  font-family: var(--pj-font-serif);
  font-size: clamp(1.2rem, 1.6vw, 1.6rem);
}

.pj-title-frame {
  border: 1px solid var(--pj-line);
  border-radius: 4px;
  padding: 14px 16px;
  background: var(--pj-panel-soft);
}

.pj-summary {
  margin: 0;
  color: var(--pj-sub);
  line-height: 1.75;
}

.pj-stats {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.pj-stat-item {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 14px;
  background: var(--pj-panel-soft);
  border: 1px solid var(--pj-line);
  border-radius: 4px;
}

.pj-stat-item dt {
  color: var(--pj-sub);
  min-width: 0;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}

.pj-stat-item dd {
  margin: 0;
  font-weight: 600;
  font-size: 1.02rem;
  min-width: 0;
  overflow-wrap: anywhere;
  font-family: var(--pj-font-serif);
  color: var(--pj-ink);
}

.pj-stats .pj-stat-item:first-child dd {
  font-size: clamp(2.5rem, 4.2vw, 3.1rem);
  font-weight: 600;
  line-height: 1.1;
  color: var(--pj-accent);
}

.pj-stats .pj-stat-item:nth-child(2) dd {
  font-size: 1.02rem;
  font-weight: 600;
  line-height: normal;
}

.pj-stats .pj-stat-item:nth-child(3) dd,
.pj-stats .pj-stat-item:nth-child(4) dd {
  font-size: clamp(1.35rem, 2.1vw, 1.65rem);
  font-weight: 600;
  line-height: 1.1;
}

/* 写真オーバーレイのサマリーカードは項目数が減るため、均等なバランスで表示する */
.pj-hero-frame .pj-stats .pj-stat-item:first-child dd,
.pj-hero-frame .pj-stats .pj-stat-item:nth-child(2) dd {
  font-size: clamp(1.5rem, 2.3vw, 1.9rem);
  font-weight: 600;
  line-height: 1.15;
  color: var(--pj-accent);
}

.pj-progress-wrap {
  padding: 12px 14px 0;
}

.pj-progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.88rem;
  color: var(--pj-sub);
  letter-spacing: 0.02em;
  margin-bottom: 9px;
}

.pj-progress-meta strong {
  font-family: var(--pj-font-serif);
  font-size: 1.55em;
  line-height: 1;
  color: var(--pj-accent);
  font-weight: 600;
}

.pj-progress-bar {
  width: 100%;
  height: 6px;
  background: var(--pj-line);
  border-radius: 999px;
  overflow: hidden;
}

.pj-progress-bar > span {
  display: block;
  height: 100%;
  background: var(--pj-accent);
}

.pj-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--pj-accent);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.03em;
  border-radius: 3px;
  padding: 12px 20px;
  color: var(--pj-accent);
  background: transparent;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
  pointer-events: auto;
}

.pj-cta:hover {
  background: var(--pj-accent);
  color: var(--pj-on-accent);
}

.pj-cta-sub {
  color: var(--pj-sub);
  background: transparent;
  border: 1px solid var(--pj-line);
  padding: 9px 14px;
  border-radius: 3px;
  font-weight: 500;
}

.pj-cta-sub:hover {
  background: var(--pj-panel-soft);
  color: var(--pj-ink);
  border-color: var(--pj-sub);
}

.pj-contents,
.pj-returns,
.pj-messages {
  margin-top: 28px;
  background: var(--pj-panel);
  border: 1px solid var(--pj-line);
  border-radius: 4px;
  padding: 28px;
}

.pj-contents h3,
.pj-returns h3,
.pj-support h3,
.pj-messages h3 {
  margin: 0 0 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--pj-line);
  font-family: var(--pj-font-serif);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: 0.03em;
  color: var(--pj-ink);
  position: relative;
}

.pj-contents h3::after,
.pj-returns h3::after,
.pj-support h3::after,
.pj-messages h3::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 40px;
  height: 1px;
  background: var(--pj-accent);
}

.pj-message-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.pj-message-card {
  background: var(--pj-panel-soft);
  border: 1px solid var(--pj-line);
  border-radius: 4px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pj-message-body {
  margin: 0;
  color: var(--pj-ink);
  line-height: 1.75;
  font-size: 0.94rem;
  flex: 1;
  white-space: pre-line;
}

.pj-message-body.js-message-toggle {
  cursor: pointer;
}

.pj-message-more {
  align-self: flex-start;
  margin: -4px 0 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--pj-accent);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.pj-message-more:hover {
  text-decoration: underline;
}

.pj-message-name {
  margin: 0;
  color: var(--pj-accent);
  font-family: var(--pj-font-serif);
  font-size: 0.88rem;
  font-weight: 600;
  text-align: right;
}

.pj-contents-body {
  color: var(--pj-sub);
  line-height: 1.85;
}

.pj-contents-body img {
  max-width: 100% !important;
  height: auto !important;
  border-radius: 2px;
}

.pj-section-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--pj-line);
  position: relative;
}

.pj-section-head::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 40px;
  height: 1px;
  background: var(--pj-accent);
}

.pj-section-head h3 {
  margin: 0;
  padding: 0;
  border: 0;
}

.pj-section-head h3::after {
  display: none;
}

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

.pj-return-card {
  background: var(--pj-panel-soft);
  border: 1px solid var(--pj-line);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.pj-return-card:hover {
  box-shadow: 0 16px 32px rgba(36, 32, 26, 0.16);
  transform: translateY(-2px);
  border-color: var(--pj-accent);
}

.pj-return-card > header {
  padding: 16px 16px 10px;
}

.pj-return-card h4 {
  margin: 0;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--pj-ink);
}

.pj-return-price {
  margin: 10px 0 0;
  font-family: var(--pj-font-serif);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--pj-accent);
}

.pj-return-image-wrap {
  aspect-ratio: 16 / 9;
  background: var(--pj-panel-soft);
}

.pj-return-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
}

.pj-return-description {
  margin: 0;
  padding: 14px 16px;
  color: var(--pj-sub);
  flex: 1;
  line-height: 1.7;
  font-size: 0.94rem;
}

.pj-return-btn {
  margin: 0 16px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 1px solid var(--pj-accent);
  border-radius: 3px;
  background: var(--pj-accent);
  color: var(--pj-on-accent);
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 11px 12px;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.pj-return-btn:hover {
  background: var(--pj-accent-dark);
  border-color: var(--pj-accent-dark);
}

.pj-empty,
.pj-error {
  margin: 0;
  color: var(--pj-sub);
}

.pj-error {
  color: var(--pj-danger);
}

.pj-required {
  font-style: normal;
  font-size: 0.7em;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--pj-accent);
  background: var(--pj-accent-soft);
  border-radius: 2px;
  padding: 2px 6px;
  margin-left: 8px;
  vertical-align: middle;
}

.pj-support {
  margin-top: 28px;
  background: var(--pj-panel);
  border: 1px solid var(--pj-line);
  border-radius: 4px;
  padding: 28px;
}

.pj-support-alert {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 3px;
  font-size: 0.92rem;
  border: 1px solid transparent;
}

.pj-support-alert-success {
  background: rgba(76, 148, 62, 0.1);
  border-color: rgba(76, 148, 62, 0.35);
  color: #3f7d34;
}

.pj-support-alert-error {
  background: rgba(224, 133, 122, 0.14);
  border-color: rgba(224, 133, 122, 0.4);
  color: var(--pj-danger);
}

.pj-support-form {
  display: grid;
  gap: 18px;
}

.pj-support-selected {
  border: 1px solid var(--pj-line);
  border-radius: 4px;
  background: var(--pj-panel-soft);
  padding: 14px 16px;
}

.pj-support-selected dl {
  margin: 0;
  display: grid;
  gap: 9px;
}

.pj-support-selected dl > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.pj-support-selected dt {
  color: var(--pj-sub);
  font-size: 0.92rem;
}

.pj-support-selected dd {
  margin: 0;
  font-weight: 600;
}

.pj-support-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.pj-support-field {
  display: grid;
  gap: 7px;
}

.pj-support-field-wide {
  grid-column: 1 / -1;
}

.pj-support-field span {
  font-size: 0.88rem;
  color: var(--pj-sub);
  letter-spacing: 0.02em;
}

.pj-support-field input,
.pj-support-field textarea {
  width: 100%;
  border: 1px solid var(--pj-line);
  border-radius: 3px;
  padding: 11px 12px;
  font: inherit;
  color: var(--pj-ink);
  background: var(--pj-panel-soft);
  transition: border-color 0.16s ease;
}

.pj-support-field input:focus,
.pj-support-field textarea:focus {
  outline: none;
  border-color: var(--pj-accent);
}

.pj-support-payment {
  margin: 0;
  border: 1px solid var(--pj-line);
  border-radius: 4px;
  padding: 12px 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
}

.pj-support-payment legend {
  padding: 0 6px;
  color: var(--pj-sub);
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}

.pj-support-payment label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.95rem;
}

.pj-support-actions {
  display: flex;
  justify-content: flex-end;
  flex-direction: row;
  gap: 10px;
  margin-top: 10px;
}

.pj-support-actions .pj-return-btn,
.pj-support-actions .pj-cta {
  width: 140px;
  flex: 0 0 140px;
  margin: 0;
}

.pj-support-confirm {
  border: 1px solid var(--pj-line);
  border-radius: 4px;
  padding: 18px;
  background: var(--pj-panel-soft);
}

.pj-support-confirm h4 {
  margin: 0 0 14px;
  font-family: var(--pj-font-serif);
  font-weight: 600;
  font-size: 1.05rem;
}

.pj-support-confirm-list {
  margin: 0 0 14px;
  display: grid;
  gap: 12px;
}

.pj-support-confirm-list > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-bottom: 1px solid var(--pj-line);
  padding: 4px 0 12px;
}

.pj-support-confirm-list dt {
  color: var(--pj-sub);
  font-size: 0.88rem;
}

.pj-support-confirm-list dd {
  margin: 0;
  font-weight: 600;
}

.pj-support-confirm .pj-support-actions {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  gap: 10px;
}

.pj-support-confirm .pj-support-actions .pj-cta,
.pj-support-confirm .pj-support-actions .pj-return-btn {
  width: 140px;
  flex: 0 0 140px;
}

@media (max-width: 1000px) {
  .pj-hero {
    grid-template-columns: 1fr;
  }

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

  .pj-stats .pj-stat-item:first-child {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .pj-stats .pj-stat-item:first-child dd {
    text-align: right;
    font-size: clamp(2rem, 7vw, 2.8rem);
  }
}

@media (max-width: 680px) {
  .pj-page {
    width: min(100%, calc(100% - 20px));
    margin: 14px auto 40px;
  }

  .pj-page-title-wrap {
    padding: 14px 14px 14px 16px;
    margin-bottom: 14px;
  }

  .pj-page-title {
    padding-left: 10px;
    font-size: clamp(1.25rem, 6vw, 1.75rem);
  }

  .pj-page-title-wrap-overlay {
    padding: 26px 18px 0;
  }

  .pj-summary-card,
  .pj-contents,
  .pj-returns,
  .pj-support {
    padding: 16px;
  }

  .pj-return-grid {
    grid-template-columns: 1fr;
  }

  .pj-stats .pj-stat-item:first-child {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .pj-stats .pj-stat-item:first-child dd {
    text-align: right;
    font-size: clamp(2rem, 9vw, 2.5rem);
  }

  .pj-support-grid {
    grid-template-columns: 1fr;
  }

  .pj-support-confirm .pj-support-actions {
    flex-direction: row;
  }
}
