html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  overflow-x: clip;
  line-height: 1.75;
}

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

::selection {
  background: #b99a55;
  color: #10263f;
}

a,
button {
  -webkit-tap-highlight-color: transparent;
}

#site-header a {
  transition: color 0.2s ease, background-color 0.2s ease;
}

.compact-nav a {
  transition: color 0.2s ease, background-color 0.2s ease;
}

.section {
  padding-block: clamp(4.25rem, 8vw, 6.5rem);
}

.section-heading {
  margin-inline: auto;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
  max-width: 54rem;
  overflow-wrap: anywhere;
}

.section-heading h2 {
  margin-top: 0.9rem;
  color: #17202b;
  font-size: clamp(2rem, 4vw, 3.3rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.2;
}

.section-heading p:not(.eyebrow) {
  margin-top: 1.2rem;
  color: rgba(23, 32, 43, 0.68);
  font-size: 1rem;
  line-height: 2;
}

.eyebrow {
  color: #227b80;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero-section {
  background:
    radial-gradient(circle at 78% 18%, rgba(76, 182, 177, 0.24), transparent 26rem),
    radial-gradient(circle at 25% 88%, rgba(185, 154, 85, 0.18), transparent 24rem),
    linear-gradient(135deg, #0b1b2d 0%, #10263f 52%, #26313f 100%);
}

/* --------------------------------------- */
@media (min-width: 1280px) and (max-height: 900px) {
  .hero-section .hero-inner {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
  }

  .hero-meta {
    display: grid;
    grid-template-columns: 16rem minmax(0, 1fr);
    grid-template-areas:
      "logo location"
      "logo badges";
    column-gap: 1rem;
    row-gap: 1.25rem;
    align-items: start;
    margin-bottom: 1.75rem;
  }

  .hero-endex-logo {
    grid-area: logo;
    margin-bottom: 0;
  }

  .hero-location {
    grid-area: location;
    margin-bottom: 0;
    justify-self: start;
  }

  .hero-badges {
    grid-area: badges;
    margin-bottom: 0;
    gap: 0.5rem;
  }

  .hero-badges > div {
    gap: 0.5rem;
  }

  .hero-section .hero-actions {
    margin-top: 2rem;
  }
}
/* --------------------------------------- */
.hero-visual {
  opacity: 0.95;
}

.hero-line,
.hero-glow {
  position: absolute;
  display: block;
  pointer-events: none;
}

.hero-line {
  width: 44rem;
  height: 44rem;
  border: 1px solid rgba(207, 233, 246, 0.16);
  border-radius: 50%;
}

.hero-line-1 {
  top: 10%;
  right: -14rem;
}

.hero-line-2 {
  bottom: -20rem;
  left: 38%;
}

.hero-glow {
  width: 0.55rem;
  height: 18rem;
  border-radius: 999px;
  background: linear-gradient(180deg, transparent, rgba(76, 182, 177, 0.62), transparent);
  transform: rotate(38deg);
}

.hero-glow-1 {
  top: 22%;
  right: 22%;
}

.hero-glow-2 {
  right: 9%;
  bottom: 16%;
  background: linear-gradient(180deg, transparent, rgba(185, 154, 85, 0.58), transparent);
}

.hero-title {
  max-width: 12em;
}

.hero-copy {
  width: 100%;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.hero-program {
  color: #cfe9f6;
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  font-weight: 900;
  letter-spacing: 0.08em;
}

.hero-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  max-width: 39rem;
}

.hero-info-card {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.8rem;
  backdrop-filter: blur(10px);
}

.hero-info-card span {
  flex: 0 0 auto;
  font-size: 1.25rem;
}

.hero-info-card p {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1.2;
}

.hero-info-card strong {
  display: block;
  margin-top: 0.25rem;
  color: #ffffff;
  font-size: clamp(0.88rem, 2.6vw, 1.02rem);
  font-weight: 900;
  line-height: 1.45;
}

.hero-secondary-link {
  border: 1px solid transparent;
}

.hero-secondary-link:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1.3;
}

.badge-light {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
}

.badge-gold {
  background: #b99a55;
  color: #10263f;
}

.event-card,
.hero-info-card,
.info-shell,
.issue-card,
.funeral-ai-card,
.funeral-ai-message,
.funeral-ai-timebox,
.process-grid article,
.takeaway-item,
.takeaway-panel,
.speaker-card,
.photo-panel,
.brand-strip,
.archive-grid figure,
.archive-placeholder,
.faq-item {
  border-radius: 8px;
}

.support-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.16);
  padding: 1rem;
}

.support-row p {
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.75;
}

.issue-card {
  border: 1px solid rgba(16, 38, 63, 0.1);
  background: #fbfaf5;
  padding: 1.55rem;
  box-shadow: 0 18px 45px rgba(16, 38, 63, 0.06);
}

.issue-card span {
  display: grid;
  width: 2.65rem;
  height: 2.65rem;
  place-items: center;
  border-radius: 999px;
  background: rgba(76, 182, 177, 0.12);
  color: #227b80;
}

.issue-card h3 {
  margin-top: 1.1rem;
  color: #17202b;
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.issue-card p {
  margin-top: 0.75rem;
  color: rgba(23, 32, 43, 0.66);
  font-size: 0.93rem;
  line-height: 1.9;
  overflow-wrap: anywhere;
}

.issue-card.accent-card {
  border-color: rgba(185, 154, 85, 0.36);
  background: linear-gradient(145deg, rgba(185, 154, 85, 0.14), #fbfaf5 58%);
}

.funeral-ai-section {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 10% 0%, rgba(76, 182, 177, 0.13), transparent 22rem),
    radial-gradient(circle at 92% 18%, rgba(185, 154, 85, 0.16), transparent 20rem),
    #f4efe4;
}

.funeral-ai-layout {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}

.funeral-ai-intro {
  min-width: 0;
}

.funeral-ai-intro h2 {
  margin-top: 0.9rem;
  color: #17202b;
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.funeral-ai-copy {
  display: grid;
  gap: 0.95rem;
  max-width: 52rem;
  margin-top: 1.4rem;
  color: rgba(23, 32, 43, 0.72);
  font-size: 0.98rem;
  line-height: 2;
}

.funeral-ai-message {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.9rem;
  border: 1px solid rgba(16, 38, 63, 0.12);
  background: rgba(255, 255, 255, 0.74);
  padding: 1.25rem;
  box-shadow: 0 18px 45px rgba(16, 38, 63, 0.07);
}

.funeral-ai-message span {
  display: grid;
  width: 2.6rem;
  height: 2.6rem;
  place-items: center;
  border-radius: 999px;
  background: rgba(185, 154, 85, 0.18);
  color: #10263f;
}

.funeral-ai-message p {
  color: #10263f;
  font-size: 0.96rem;
  font-weight: 900;
  line-height: 1.9;
  overflow-wrap: anywhere;
}

.funeral-ai-card-grid {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

.funeral-ai-card {
  display: flex;
  min-width: 0;
  height: 100%;
  flex-direction: column;
  border: 1px solid rgba(16, 38, 63, 0.1);
  background: rgba(255, 255, 255, 0.82);
  padding: 1.35rem;
  box-shadow: 0 18px 45px rgba(16, 38, 63, 0.06);
}

.funeral-ai-card span {
  display: grid;
  width: 2.55rem;
  height: 2.55rem;
  place-items: center;
  border-radius: 999px;
  background: rgba(76, 182, 177, 0.12);
  color: #227b80;
}

.funeral-ai-card h3 {
  margin-top: 1rem;
  color: #17202b;
  font-size: 1.08rem;
  font-weight: 900;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.funeral-ai-card p {
  margin-top: 0.75rem;
  color: rgba(23, 32, 43, 0.68);
  font-size: 0.92rem;
  line-height: 1.9;
  overflow-wrap: anywhere;
}

.funeral-ai-timebox {
  margin-top: 1rem;
  border: 1px solid rgba(185, 154, 85, 0.36);
  border-left: 4px solid #b99a55;
  background: rgba(255, 255, 255, 0.86);
  padding: 1.25rem;
  box-shadow: 0 18px 45px rgba(16, 38, 63, 0.06);
}

.funeral-ai-timebox-title {
  color: #10263f;
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.55;
}

.funeral-ai-timebox p:not(.funeral-ai-timebox-title) {
  margin-top: 0.7rem;
  color: rgba(23, 32, 43, 0.72);
  font-size: 0.95rem;
  line-height: 1.9;
  overflow-wrap: anywhere;
}

.flow-layout {
  display: grid;
  gap: 1rem;
}

.process-grid {
  display: grid;
  gap: 1rem;
}

.process-grid article {
  border: 1px solid rgba(16, 38, 63, 0.1);
  background: #ffffff;
  padding: 1.55rem;
  box-shadow: 0 18px 45px rgba(16, 38, 63, 0.05);
}

.process-grid span {
  color: #227b80;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.process-grid h3 {
  margin-top: 0.65rem;
  color: #17202b;
  font-size: 1.2rem;
  font-weight: 900;
}

.process-grid p {
  margin-top: 0.75rem;
  color: rgba(23, 32, 43, 0.66);
  font-size: 0.93rem;
  line-height: 1.9;
}

.takeaway-item {
  border: 1px solid rgba(16, 38, 63, 0.1);
  border-left: 4px solid #b99a55;
  background: #fbfaf5;
  padding: 1.1rem 1.25rem;
  color: #10263f;
  font-weight: 900;
  box-shadow: 0 12px 32px rgba(16, 38, 63, 0.05);
}

.takeaway-panel {
  border: 1px solid rgba(16, 38, 63, 0.1);
  background: linear-gradient(145deg, #ffffff, #f4efe4 120%);
  padding: clamp(1.35rem, 3vw, 1.8rem);
  box-shadow: 0 18px 45px rgba(16, 38, 63, 0.06);
}

.takeaway-panel h3 {
  margin-top: 0.65rem;
  margin-bottom: 1rem;
  color: #10263f;
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1.35;
}

.speaker-card {
  border: 1px solid rgba(16, 38, 63, 0.1);
  background: #ffffff;
  padding: clamp(1.4rem, 3vw, 2rem);
  box-shadow: 0 18px 45px rgba(16, 38, 63, 0.06);
}

.speaker-card h3 {
  margin-top: 0.6rem;
  color: #10263f;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 900;
}

.speaker-card p {
  margin-top: 0.85rem;
  color: rgba(23, 32, 43, 0.68);
  font-size: 0.96rem;
  line-height: 1.9;
  overflow-wrap: anywhere;
}

.speaker-role {
  color: #227b80 !important;
  font-size: 0.82rem !important;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.speaker-title {
  color: #17202b !important;
  font-weight: 900;
}

.brand-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid rgba(16, 38, 63, 0.1);
  background: #fbfaf5;
  padding: 0.9rem 1rem;
}

.brand-strip img {
  width: 2.35rem;
  height: 2.35rem;
  object-fit: contain;
}

.brand-strip span {
  color: rgba(23, 32, 43, 0.72);
  font-size: 0.88rem;
  font-weight: 900;
}

.brand-separator {
  border-left: 1px solid rgba(16, 38, 63, 0.14);
  padding-left: 0.75rem;
}

.photo-panel {
  overflow: hidden;
  border: 1px solid rgba(16, 38, 63, 0.1);
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(16, 38, 63, 0.06);
}

.photo-panel img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.story-photo-panel {
  position: relative;
  background: #10263f;
}

.story-photo-panel img {
  width: 100%;
  min-height: 0;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center top;
}

.story-message {
  background: rgba(255, 255, 255, 0.88);
  padding: 0.9rem 1rem;
  color: rgba(23, 32, 43, 0.72);
  line-height: 1.65;
  backdrop-filter: blur(8px);
}

/* 添付イメージに合わせ、ラベルは表示しない */
.story-message > span {
  display: none;
}

.story-message strong {
  display: block;
  margin: 0;
  color: rgba(23, 32, 43, 0.78);
  font-size: 0.82rem;
  font-style: italic;
  font-weight: 500;
  line-height: 1.65;
}

.story-message-author {
  display: block;
  margin-top: 0.55rem;
  color: #d94b48;
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 700;
  line-height: 1.5;
  text-align: right;
}

.archive-grid {
  display: grid;
  gap: 1rem;
}

.archive-grid figure,
.archive-placeholder {
  overflow: hidden;
  border: 1px solid rgba(16, 38, 63, 0.1);
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(16, 38, 63, 0.05);
}

.archive-grid img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
}

.archive-grid figcaption {
  padding: 1rem;
  color: rgba(23, 32, 43, 0.68);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.7;
}

.archive-placeholder {
  display: grid;
  min-height: 16rem;
  place-items: center;
  padding: 1.5rem;
  text-align: center;
}

.archive-placeholder span {
  color: rgba(16, 38, 63, 0.28);
  font-size: 3rem;
}

.archive-placeholder p {
  margin-top: 0.6rem;
  color: rgba(23, 32, 43, 0.58);
  font-weight: 700;
}

.info-list > div {
  display: grid;
  gap: 0.75rem;
  border-bottom: 1px solid rgba(16, 38, 63, 0.11);
  padding: 1.25rem;
}

.info-list > div:last-child {
  border-bottom: 0;
}

.info-list dt {
  color: #10263f;
  font-size: 0.88rem;
  font-weight: 900;
}

.info-list dd {
  color: rgba(23, 32, 43, 0.76);
  font-weight: 700;
}

.faq-item {
  overflow: hidden;
  border: 1px solid rgba(16, 38, 63, 0.12);
  background: #ffffff;
}

.faq-item summary {
  display: flex;
  cursor: pointer;
  list-style: none;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.25rem;
  color: #17202b;
  font-weight: 900;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary span {
  flex: 0 0 auto;
  color: #227b80;
  transition: transform 0.2s ease;
}

.faq-item[open] summary span {
  transform: rotate(180deg);
}

.faq-item p {
  border-top: 1px solid rgba(16, 38, 63, 0.1);
  padding: 1.05rem 1.25rem 1.25rem;
  color: rgba(23, 32, 43, 0.68);
  font-size: 0.95rem;
  line-height: 1.95;
}

#floating-apply {
  left: auto;
  right: max(0.75rem, env(safe-area-inset-right));
  bottom: max(0.75rem, env(safe-area-inset-bottom));
  max-width: calc(100vw - 1.5rem);
}

#floating-apply a {
  max-width: min(calc(100vw - 1.5rem), 21rem);
  white-space: normal;
}

@media (min-width: 640px) {
  .funeral-ai-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

@media (min-width: 768px) {
  .funeral-ai-intro h2 {
    font-size: 2.6rem;
    line-height: 1.22;
  }

  .story-message {
    position: absolute;
    right: 1.5rem;
    bottom: 1.5rem;
    width: 52%;
    max-width: 20rem;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(16, 38, 63, 0.08);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 12px 30px rgba(16, 38, 63, 0.14);
    backdrop-filter: blur(8px);
  }

  .story-message strong {
    font-size: 0.82rem;
    line-height: 1.65;
  }

  .story-message-author {
    font-size: 0.7rem;
  }

  .info-list > div {
    grid-template-columns: 13rem minmax(0, 1fr);
    padding: 1.45rem 1.65rem;
  }
}

@media (min-width: 1024px) {
  .funeral-ai-layout {
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 24rem);
  }

  .funeral-ai-card-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .funeral-ai-intro h2 {
    font-size: 3.1rem;
  }

  .flow-layout {
    grid-template-columns: minmax(0, 1fr) minmax(20rem, 24rem);
    align-items: start;
  }

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

  .process-grid article:last-child {
    grid-column: span 2;
  }
}

@media (max-width: 767px) {
  .funeral-ai-intro h2 {
    font-size: 1.7rem;
  }

  .hero-title {
    max-width: none;
  }

  .hero-copy {
    width: 100%;
    max-width: 350px !important;
  }

  .hero-section {
    background:
      radial-gradient(circle at 82% 8%, rgba(76, 182, 177, 0.2), transparent 18rem),
      radial-gradient(circle at 10% 82%, rgba(185, 154, 85, 0.16), transparent 18rem),
      linear-gradient(135deg, #0b1b2d 0%, #10263f 58%, #26313f 100%);
  }

  .hero-program {
    letter-spacing: 0.04em;
  }

  .badge {
    max-width: 100%;
    white-space: normal;
  }

  .hero-badges {
    align-items: flex-start !important;
    flex-direction: column;
    gap: 0.45rem;
  }

  .hero-info-card {
    padding: 0.75rem;
  }

  .hero-info-grid {
    width: 100%;
    max-width: 350px !important;
  }

  .hero-section a[href="#apply"] {
    width: 100%;
    min-height: 56px;
    padding-inline: 1.25rem;
    text-align: center;
  }

  .hero-secondary-link {
    align-self: center;
    min-height: 44px;
  }

  .section-heading {
    text-align: left;
  }

  .event-card {
    margin-bottom: 1rem;
  }

  .brand-separator {
    width: 100%;
    border-left: 0;
    border-top: 1px solid rgba(16, 38, 63, 0.14);
    padding-left: 0;
    padding-top: 0.75rem;
  }

  .story-message {
    padding: 0.9rem 1rem;
  }

  .story-message strong {
    font-size: 0.84rem;
    line-height: 1.65;
  }

  .story-message-author {
    font-size: 0.7rem;
  }

  .info-list dd {
    font-size: 0.95rem;
  }

  #floating-apply a {
    justify-content: center;
    padding-inline: 1rem;
    font-size: 0.88rem;
  }
}

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

  .funeral-ai-message {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   過去開催実績：画像拡大
======================================== */

.archive-image-wrap {
  position: relative;
}

/* 画像右上の拡大ボタン */
.archive-zoom-button {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;

  min-height: 2.5rem;
  padding: 0.5rem 0.8rem;

  border: 1px solid rgba(16, 38, 63, 0.16);
  border-radius: 9999px;

  background: #ffffff;
  color: #10263f;

  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;

  box-shadow: 0 6px 20px rgba(16, 38, 63, 0.16);

  cursor: pointer;
  transition:
    transform 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

.archive-zoom-button:hover {
  background: #f4efe4;
  box-shadow: 0 8px 24px rgba(16, 38, 63, 0.22);
  transform: translateY(-1px);
}

.archive-zoom-button:focus-visible {
  outline: 3px solid rgba(185, 154, 85, 0.42);
  outline-offset: 3px;
}

.archive-zoom-button .material-symbols-outlined {
  font-size: 1.15rem;
}

/* 画面全体を覆う拡大表示領域 */
.archive-image-modal {
  position: fixed;
  inset: 0;
  z-index: 100;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 1rem;

  background: rgba(8, 18, 30, 0.88);
}

/* hidden属性が付いているときは非表示 */
.archive-image-modal[hidden] {
  display: none;
}

/* 白い拡大表示パネル */
.archive-image-modal-panel {
  display: flex;
  flex-direction: column;

  width: min(1200px, 100%);
  max-height: calc(100vh - 2rem);

  overflow: hidden;

  border-radius: 1.25rem;
  background: #ffffff;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.32);
}

/* 成果物名と閉じるボタン */
.archive-image-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;

  flex-shrink: 0;
  padding: 0.9rem 1rem;

  border-bottom: 1px solid rgba(16, 38, 63, 0.1);
}

.archive-image-modal-header p {
  margin: 0;

  color: #10263f;
  font-size: 0.95rem;
  font-weight: 700;
}

/* 閉じるボタン */
.archive-image-modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;

  flex-shrink: 0;
  min-height: 2.5rem;
  padding: 0.45rem 0.75rem;

  border: 1px solid rgba(16, 38, 63, 0.14);
  border-radius: 9999px;

  background: #ffffff;
  color: #10263f;

  font-size: 0.75rem;
  font-weight: 700;

  cursor: pointer;
}

.archive-image-modal-close:hover {
  background: #f4efe4;
}

.archive-image-modal-close:focus-visible {
  outline: 3px solid rgba(185, 154, 85, 0.42);
  outline-offset: 2px;
}

.archive-image-modal-close .material-symbols-outlined {
  font-size: 1.2rem;
}

/* 大きな画像を表示する領域 */
.archive-image-modal-stage {
  flex: 1;
  min-height: 0;

  overflow: auto;
  padding: 1rem;

  background: #eef1f4;
}

.archive-image-modal-stage img {
  display: block;

  width: 100%;
  height: auto;
  margin: 0 auto;

  border-radius: 0.75rem;
  background: #ffffff;
}

/* 拡大表示中は背面ページをスクロールさせない */
body.archive-modal-open {
  overflow: hidden;
}

/* スマートフォン調整 */
@media (max-width: 640px) {
  .archive-image-modal {
    padding: 0.5rem;
  }

  .archive-image-modal-panel {
    max-height: calc(100vh - 1rem);
    border-radius: 1rem;
  }

  .archive-image-modal-header {
    padding: 0.75rem;
  }

  .archive-image-modal-stage {
    padding: 0.5rem;
  }

  .archive-image-modal-stage img {
    width: 800px;
    max-width: none;
  }

  .archive-zoom-button {
    top: 0.6rem;
    right: 0.6rem;
  }
}

/* 追加：スマホでは「体験内容を見る」の枠を常時表示 */
@media (max-width: 639px) {
  .hero-secondary-link {
    border-color: rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.06);
  }
}

/* 追加：ブラウザ高倍率時の中間的な画面幅を調整 */
@media (min-width: 1024px) and (max-width: 1439px) {
  /* ② Heroを1列にして、メイン見出しの横幅を確保 */
  .hero-section .hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  /* ② 横幅が不足する範囲では右側の補足カードを非表示 */
  .hero-section .event-card {
    display: none;
  }

  /* ③ 「葬祭業とAI」を1列表示に戻す */
  .funeral-ai-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  /* ③ 中間幅では3.1remまで大きくしない */
  .funeral-ai-intro h2 {
    font-size: 2.6rem;
  }
}


@media (min-width: 768px) and (max-width: 1439px) {
  .story-photo-panel .story-message {
    position: static;
    width: 100%;
    max-width: none;
    padding: 0.95rem 1.25rem 1rem;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .story-photo-panel .story-message strong {
    max-width: 34rem;
    margin-inline: auto;
    font-size: 0.86rem;
    line-height: 1.65;
    text-align: center;
  }

  .story-photo-panel .story-message-author {
    max-width: 34rem;
    margin: 0.4rem auto 0;
    font-size: 0.74rem;
    font-weight: 900;
    text-align: center;
  }
}

/* 追加：高倍率などでメニューが画面に収まらない場合は内部スクロール */
@media (max-width: 1023px) {
  #mobile-menu {
    max-height: calc(100vh - 4rem);
    max-height: calc(100dvh - 4rem);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

@media (min-width: 1440px) {
  .about-layout {
    max-width: 84rem;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  }

  /* 修正：カードの横幅を小さくして人物との重なりを減らす */
  .story-message {
    right: 0.75rem;
    bottom: 1rem;
    width: 51%;
    max-width: 23rem;
    padding: 0.65rem 0.8rem;
  }

  /* 修正：3行を維持したまま、引用文を少し小さくする */
  .story-message strong {
    font-size: 0.74rem;
    line-height: 1.5;
    white-space: nowrap;
  }

  /* 修正：名前部分もカード幅に合わせて少し小さくする */
  .story-message-author {
    margin-top: 0.3rem;
    font-size: 0.72rem;
    font-weight: 900;
  }
}