/* WordPress カスタムHTMLブロック用：複数作家・展示会場個別（H1はテーマ側で表示） */
.bl_post_main {
  max-width: 100%;
  margin-inline: 0;
}

.amp-spot {
  --amp-max: 1120px;
  --amp-info: 960px;
  --amp-text: #414044;
  --amp-muted: #777376;
  --amp-link: #008cfe;
  --amp-link-hover: #006edc;
  --amp-theme: #ed1c24;
  --amp-border: #dedede;
  --amp-space-section: clamp(4.5rem, 7vw, 6rem);
  --amp-space-heading: 1.35rem;
  --amp-sp-gutter: 24px;
  --amp-pager-max: 1440px;
  width: min(100%, var(--amp-max)); margin-inline: auto; color: var(--amp-text); font-family: inherit; font-size: 16px; line-height: 1.85;
}
.amp-spot *, .amp-spot *::before, .amp-spot *::after { box-sizing: border-box; }
.amp-spot img { display: block; max-width: 100%; height: auto; }
.amp-spot a { color: var(--amp-link-color, var(--amp-link)); text-underline-offset: .2em; }
.amp-spot a:hover { color: var(--amp-link-hover-color, var(--amp-link-hover)); }
.amp-spot a:focus-visible { outline: 3px solid var(--amp-link); outline-offset: 3px; }
.amp-spot__section-heading, .amp-spot__subsection-heading { color: var(--amp-text); line-height: 1.45; }
.amp-spot__section-heading { margin: 0 0 var(--amp-space-heading); font-size: clamp(1.55rem, 3vw, 2rem); }
.amp-spot__section-heading--venue, .amp-spot__section-heading--access { font-size: clamp(1.625rem, 2.6vw, 1.75rem); }
.amp-spot__subsection-heading { margin: 0 0 1.25rem; font-size: clamp(1.2rem, 2.4vw, 1.5rem); }
.amp-spot__section { margin-top: var(--amp-space-section); }
.amp-spot__info-zone { width: min(100%, var(--amp-info)); margin-inline: auto; }
.amp-spot__visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.amp-spot__title-band { position: relative; display: flex; min-height: 110px; align-items: center; overflow: hidden; padding: 1.25rem clamp(1.25rem, 5vw, 3.75rem); background-color: var(--amp-theme); background-image: url("https://settaya-miyauchi.jp/wp-content/uploads/2026/08/art-map-spot-title-bg-pc.webp"); background-position: center; background-size: cover; color: #fff; }
.amp-spot__title-band::after { position: absolute; right: -2rem; bottom: -5rem; width: 18rem; aspect-ratio: 1; border: 2rem solid rgba(255,255,255,.09); border-radius: 50%; content: ""; }
.amp-spot__title { position: relative; z-index: 1; display: flex; align-items: baseline; gap: clamp(.8rem, 2vw, 1.5rem); margin: 0; color: #fff; font-size: clamp(2rem, 3.6vw, 2.5rem); font-weight: 600; line-height: 1.35; }
.amp-spot__number { padding-right: clamp(.8rem, 2vw, 1.5rem); border-right: 1px solid rgba(255,255,255,.8); font-size: 1.1em; font-variant-numeric: tabular-nums; }
.amp-spot__lead { width: 100%; margin: 1.5rem 0 0; font-weight: 600; }

.amp-spot__gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; margin-top: 2rem; }
.amp-spot__gallery-sub { display: contents; }
.amp-spot__gallery .amp-spot__gallery-item { position: relative; overflow: hidden; margin: 0; background: #eee; }
.amp-spot__gallery-item--main { grid-column: 1 / -1; aspect-ratio: 16 / 8.5; }
.amp-spot__gallery-item:not(.amp-spot__gallery-item--main) { aspect-ratio: 4 / 3; }
/* WPテーマの .bl_post_main figure img { width:auto; } をギャラリー内だけで回避 */
.amp-spot .amp-spot__gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.amp-spot__gallery-item--main img { object-position: center; }

.amp-spot__venue-grid { display: grid; grid-template-columns: minmax(220px, .72fr) minmax(0, 1.28fr); gap: clamp(1.5rem, 5vw, 3.5rem); align-items: start; }
.amp-spot__venue-grid .amp-spot__venue-photo { margin: 0; overflow: hidden; border-radius: 20px; }
.amp-spot .amp-spot__venue-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.amp-spot__venue-description { margin: 0 0 1.25rem; color: var(--amp-muted); }
.amp-spot__facts { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1.25rem; margin: 0 0 1rem; }
.amp-spot__facts dt { font-weight: 700; }
.amp-spot__facts dd { margin: 0; }
.amp-spot__links { display: flex; flex-wrap: wrap; gap: .55rem 1.25rem; margin: 0; padding: 0; list-style: none; }
.amp-spot__external { display: inline-flex; align-items: center; gap: .35rem; }
.amp-spot__external::after { flex: 0 0 .9em; width: .9em; height: .9em; background: url("https://settaya-miyauchi.jp/wp-content/themes/settaya-miyauchi/assets/img/common/icon_externalink.svg") center / contain no-repeat; content: ""; }

.amp-spot__map-frame { width: 100%; aspect-ratio: 16 / 8; min-height: 360px; overflow: hidden; background: #e4e4e4; }
.amp-spot__map-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.amp-spot__map-action { margin: 1rem 0 0; }
.amp-spot__map-link { display: inline-block; }

.amp-spot__exhibition-card { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: clamp(1.5rem, 5vw, 3.5rem); align-items: center; width: min(100%, var(--amp-info)); margin-inline: auto; padding: 44px clamp(1.5rem, 4vw, 2.75rem); border-radius: 28px; background: #fff; box-shadow: 0 0 24px rgba(0,0,0,.065); line-height: 1.65; }
.amp-spot__exhibition-card .amp-spot__exhibition-flyer { margin: 0; }
.amp-spot .amp-spot__exhibition-flyer img { width: 100%; height: auto; object-fit: contain; }
.amp-spot__exhibition-kicker { margin: 0 0 .35rem; color: var(--amp-theme); font-size: .85rem; font-weight: 700; }
.amp-spot__exhibition-title { margin: 0; color: var(--amp-text); font-size: 1.5rem; line-height: 1.4; }
.amp-spot__exhibition-period { margin: .8rem 0 0; font-weight: 700; }
.amp-spot__exhibition-description { margin: .5rem 0 0; color: var(--amp-muted); }
.amp-spot__exhibition-actions { display: flex; flex-wrap: wrap; gap: .55rem 1.25rem; margin-top: 1rem; }

.amp-spot__artists-group { margin-top: var(--amp-space-section); }
.amp-spot__artists-list { display: grid; gap: 1.25rem; margin: 0; padding: 0; list-style: none; }
.amp-spot__artist { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: clamp(1.5rem, 5vw, 3.5rem); align-items: center; width: min(100%, var(--amp-info)); margin-inline: auto; padding: clamp(1.5rem, 4vw, 2.75rem); border-radius: 28px; background: #f8f6f6; }
.amp-spot__artist .amp-spot__artist-photo { margin: 0; overflow: hidden; border-radius: 50%; }
.amp-spot__artist-photo img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.amp-spot__artist-role { margin: 0; color: var(--amp-muted); font-size: .85rem; }
.amp-spot__artist-name { margin: 0; color: var(--amp-text); font-size: 1.5rem; font-weight: 700; }
.amp-spot__artist-profile { margin: .65rem 0 1rem; color: var(--amp-muted); }
.amp-spot__artist-actions { display: flex; flex-wrap: wrap; gap: .55rem 1.25rem; }
.amp-spot__artist-cta { display: inline-block; }

/* WP投稿内でも相対CSSに依存しない、ページ下部ナビの基礎指定 */
.amp-spot.art-map-spot .art-map-spot-back,
.amp-spot.art-map-spot .art-map-spot-pager {
  box-sizing: border-box;
  width: min(100%, var(--amp-max, 1120px));
  margin-inline: auto;
}
.amp-spot.art-map-spot .art-map-spot-back { margin-top: 110px; margin-bottom: 96px; text-align: center; }
.amp-spot.art-map-spot .art-map-spot-back__link {
  --amp-link-color: var(--amp-theme, #ed1c24);
  --amp-link-hover-color: #fff;
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: .65rem 1.5rem;
  border: 2px solid var(--amp-theme, #ed1c24);
  border-radius: 999px;
  background: #fff;
  color: var(--amp-theme, #ed1c24);
  font-weight: 700;
  line-height: 1.5;
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease;
}
.amp-spot.art-map-spot .art-map-spot-back__link:hover { background: var(--amp-theme, #ed1c24); color: #fff; }
.amp-spot.art-map-spot .art-map-spot-back__link:focus-visible { outline: 3px solid var(--amp-theme, #ed1c24); outline-offset: 4px; }
.amp-spot.art-map-spot .art-map-spot-pager {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--amp-border, #dedede);
}
.amp-spot.art-map-spot .art-map-spot-pager__link {
  --amp-link-color: var(--amp-text, #414044);
  --amp-link-hover-color: var(--amp-text, #414044);
  display: flex;
  min-width: 0;
  min-height: 48px;
  align-items: center;
  gap: .65rem;
  color: var(--amp-text, #414044);
  font-family: inherit;
  text-decoration: none;
  transition: opacity .2s ease;
}
.amp-spot.art-map-spot .art-map-spot-pager__link:hover { opacity: .6; }
.amp-spot.art-map-spot .art-map-spot-pager__prev { grid-column: 1; justify-self: start; }
.amp-spot.art-map-spot .art-map-spot-pager__next { grid-column: 2; justify-self: end; text-align: right; }
.amp-spot.art-map-spot .art-map-spot-pager__arrow {
  display: grid;
  flex: 0 0 1.7rem;
  width: 1.7rem;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background: #eee;
}
.amp-spot.art-map-spot .art-map-spot-pager__arrow svg { display: none; }
.amp-spot.art-map-spot .art-map-spot-pager__label {
  display: inline-flex;
  min-width: 0;
  align-items: baseline;
  gap: .55rem;
}
.amp-spot.art-map-spot .art-map-spot-pager__number { color: var(--amp-muted, #777376); font-size: .875rem; font-variant-numeric: tabular-nums; }
.amp-spot.art-map-spot .art-map-spot-pager__name { overflow-wrap: anywhere; }

/* 追従ページャー：JS非対応時は既存の末尾ナビを維持 */
.amp-spot.art-map-spot .amp-spot__pager-sentinel { display: none; }
.amp-spot.art-map-spot .art-map-spot-pager__top { display: none; }

@media (min-width: 768px) {
  .bl_post_main:has(.amp-spot.art-map-spot.amp-pager-enhanced) { padding-bottom: 0; }
  .amp-spot.art-map-spot.amp-pager-enhanced { padding-bottom: 80px; }
  .amp-spot.art-map-spot .amp-spot__pager-sentinel { display: block; height: 1px; margin-bottom: -1px; }
  .amp-spot.art-map-spot.amp-pager-enhanced .art-map-spot-back { display: none; }
  .amp-spot.art-map-spot.amp-pager-enhanced .art-map-spot-pager {
    position: fixed;
    z-index: 1000;
    right: 0;
    bottom: 0;
    left: 0;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 24px;
    align-items: stretch;
    width: 100%;
    height: 80px;
    margin: 0;
    padding: 0 max(24px, calc((100vw - var(--amp-pager-max)) / 2));
    border-top: 1px solid rgba(0, 0, 0, .055);
    background: rgba(255, 255, 255, .95);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, .035);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity .22s ease, transform .22s ease, visibility 0s linear .22s;
  }
  .amp-spot.art-map-spot.amp-pager-enhanced .art-map-spot-pager__link {
    min-height: 0;
    gap: 10px;
    padding: 0;
    font-size: 16px;
    line-height: 1.2;
  }
  .amp-spot.art-map-spot.amp-pager-enhanced .art-map-spot-pager__prev {
    grid-column: 1;
    justify-self: stretch;
    justify-content: flex-start;
  }
  .amp-spot.art-map-spot.amp-pager-enhanced .art-map-spot-pager__top {
    display: flex;
    grid-column: 2;
    align-self: center;
    justify-content: center;
    width: 168px;
    height: 38px;
    min-height: 0;
    padding-inline: 12px;
    border: 2px solid #ededed;
    border-radius: 999px;
    color: #929292;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
  }
  .amp-spot.art-map-spot.amp-pager-enhanced .art-map-spot-pager__next {
    grid-column: 3;
    justify-self: stretch;
    justify-content: flex-end;
  }
  .amp-spot.art-map-spot.amp-pager-enhanced .art-map-spot-pager__prev,
  .amp-spot.art-map-spot.amp-pager-enhanced .art-map-spot-pager__next { width: 100%; height: 100%; }
  .amp-spot.art-map-spot.amp-pager-enhanced .art-map-spot-pager__arrow {
    flex: 0 0 30px;
    width: 30px;
    height: 48px;
    align-self: center;
    aspect-ratio: auto;
    border-radius: 0;
    background: transparent;
    color: #d2d2d2;
    font-size: 0;
    line-height: 1;
  }
  .amp-spot.art-map-spot.amp-pager-enhanced .art-map-spot-pager__arrow svg { display: block; width: 30px; height: 48px; }
  .amp-spot.art-map-spot.amp-pager-enhanced .art-map-spot-pager__arrow path { fill: none; stroke: currentColor; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
  .amp-spot.art-map-spot.amp-pager-enhanced .art-map-spot-pager__label { align-items: center; gap: 8px; }
  .amp-spot.art-map-spot.amp-pager-enhanced .art-map-spot-pager__next .art-map-spot-pager__number { order: 2; }
  .amp-spot.art-map-spot.amp-pager-enhanced .art-map-spot-pager__next .art-map-spot-pager__name { order: 1; }
  .amp-spot.art-map-spot.amp-pager-enhanced .art-map-spot-pager__number { flex: 0 0 auto; font-size: 15px; font-weight: 600; line-height: 1; }
  .amp-spot.art-map-spot.amp-pager-enhanced .art-map-spot-pager__name { font-size: 16px; font-weight: 700; letter-spacing: .025em; line-height: 1.1; }
  .amp-spot.art-map-spot.amp-pager-enhanced.amp-pager-visible .art-map-spot-pager {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    transition-delay: 0s;
  }
}

@media (max-width: 767px) {
  .bl_post_inner {
    margin-inline: 0;
  }

  .bl_post_main:has(.amp-spot.art-map-spot) { padding-bottom: 0; }
  .amp-spot { --amp-space-section: 4rem; font-size: 15px; }
  /* CONTENT：通常の読む領域は共通ガターを使用 */
  .amp-spot__lead,
  .amp-spot__section { padding-inline: var(--amp-sp-gutter); }
  /* FULL：タイトル帯・ギャラリー・追従ページャーには共通ガターを適用しない */
  .amp-spot__title-band { min-height: 92px; padding-block: 1.15rem; background-image: url("https://settaya-miyauchi.jp/wp-content/uploads/2026/08/art-map-spot-title-bg-sp.webp"); }
  .amp-spot__title { align-items: center; font-size: 1.75rem; }
  .amp-spot__gallery { display: block; }
  .amp-spot__gallery-item--main { aspect-ratio: 1; }
  .amp-spot__gallery-sub { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity; }
  .amp-spot__gallery-sub .amp-spot__gallery-item { flex: 0 0 66.6667%; aspect-ratio: 7 / 5; scroll-snap-align: start; }
  .amp-spot__lead,
  .amp-spot__venue-description,
  .amp-spot__exhibition-description { font-size: 15px; }
  .amp-spot__facts,
  .amp-spot__exhibition-kicker,
  .amp-spot__exhibition-period,
  .amp-spot__artist-role,
  .amp-spot__artist-profile { font-size: 14px; }
  .amp-spot__note { font-size: 12px; }
  .amp-spot__venue-grid { grid-template-columns: 1fr; }
  .amp-spot__venue-photo { width: min(100%, 380px); }
  .amp-spot__venue .amp-spot__links { justify-content: center; text-align: center; }
  .amp-spot__map-frame { aspect-ratio: 4 / 5; min-height: 0; }
  .amp-spot__exhibition-card { grid-template-columns: 1fr; gap: 1.5rem; padding-block: 30px; border-radius: 20px; }
  .amp-spot__exhibition-card .amp-spot__exhibition-flyer { width: min(100%, 200px); margin-inline: auto; }
  .amp-spot__artist { grid-template-areas: "photo identity" "profile profile" "actions actions"; grid-template-columns: 88px minmax(0, 1fr); gap: 1rem; align-items: center; border-radius: 20px; }
  .amp-spot__artist .amp-spot__artist-photo { grid-area: photo; width: 88px; }
  .amp-spot__artist-content { display: contents; }
  .amp-spot__artist-identity { grid-area: identity; }
  .amp-spot__artist-profile { grid-area: profile; margin: 0; }
  .amp-spot__artist-actions { grid-area: actions; }
  .amp-spot__exhibition-actions,
  .amp-spot__artist-actions { width: 100%; justify-content: center; text-align: center; }
  .amp-spot__exhibition-actions a,
  .amp-spot__artist-actions a { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; padding: 8px 10px; font-size: 14px; line-height: 1.4; }

  .amp-spot.art-map-spot.amp-pager-enhanced { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  .amp-spot.art-map-spot .amp-spot__pager-sentinel { display: block; height: 1px; margin-bottom: -1px; }
  .amp-spot.art-map-spot .art-map-spot-back { display: none; }
  .amp-spot.art-map-spot .art-map-spot-pager {
    grid-template-columns: minmax(0, 1fr) 104px minmax(0, 1fr);
    gap: 10px;
    align-items: stretch;
    width: 100%;
    height: 88px;
    margin-top: 48px;
    padding: 16px 11px;
    border-top: 1px solid #ededed;
    background: #fff;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, .045);
  }
  .amp-spot.art-map-spot .art-map-spot-pager__link {
    width: 100%;
    min-height: 0;
    gap: 5px;
    padding: 0;
    font-size: 13px;
    line-height: 1.15;
  }
  .amp-spot.art-map-spot .art-map-spot-pager__prev { grid-column: 1; justify-self: stretch; justify-content: flex-start; }
  .amp-spot.art-map-spot .art-map-spot-pager__top {
    display: flex;
    grid-column: 2;
    align-self: center;
    flex-direction: row;
    justify-content: center;
    gap: 0;
    min-height: 46px;
    padding-inline: 8px;
    border: 2px solid #ededed;
    border-radius: 14px;
    color: #999;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
  }
  .amp-spot.art-map-spot .art-map-spot-pager__next { grid-column: 3; justify-self: stretch; justify-content: flex-end; }
  .amp-spot.art-map-spot .art-map-spot-pager__arrow {
    flex: 0 0 26px;
    width: 26px;
    height: 40px;
    align-self: center;
    aspect-ratio: auto;
    border-radius: 0;
    background: transparent;
    color: #d5d5d5;
    font-size: 0;
    line-height: 1;
  }
  .amp-spot.art-map-spot .art-map-spot-pager__arrow svg { display: block; width: 26px; height: 40px; }
  .amp-spot.art-map-spot .art-map-spot-pager__arrow path { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
  .amp-spot.art-map-spot .art-map-spot-pager__label { max-width: 100%; flex-direction: row; align-items: center; gap: 6px; }
  .amp-spot.art-map-spot .art-map-spot-pager__next .art-map-spot-pager__number { order: 2; }
  .amp-spot.art-map-spot .art-map-spot-pager__next .art-map-spot-pager__name { order: 1; align-items: flex-end; text-align: right; }
  .amp-spot.art-map-spot .art-map-spot-pager__number { flex: 0 0 auto; font-size: 13px; font-weight: 600; line-height: 1.1; }
  .amp-spot.art-map-spot .art-map-spot-pager__name { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; overflow-wrap: normal; font-size: 13px; font-weight: 700; letter-spacing: .01em; line-height: 1.08; word-break: normal; }
  .amp-spot.art-map-spot .art-map-spot-pager__name-part { display: block; white-space: nowrap; }

  .amp-spot.art-map-spot.amp-pager-enhanced .art-map-spot-pager {
    position: fixed;
    z-index: 1000;
    right: 0;
    bottom: 0;
    left: 0;
    height: calc(88px + env(safe-area-inset-bottom));
    margin: 0;
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity .22s ease, transform .22s ease, visibility 0s linear .22s;
  }
  .amp-spot.art-map-spot.amp-pager-enhanced.amp-pager-visible .art-map-spot-pager {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    transition-delay: 0s;
  }
}

@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
  .amp-spot.art-map-spot.amp-pager-enhanced .art-map-spot-pager {
    transform: none;
    transition: opacity .01s linear, visibility 0s;
  }
}

@media (min-width: 768px) and (prefers-reduced-motion: reduce) {
  .amp-spot.art-map-spot.amp-pager-enhanced .art-map-spot-pager {
    transform: none;
    transition: opacity .01s linear, visibility 0s;
  }
}
