@charset "UTF-8";
/*======================================================================
  File   : /css/single-common.css
  Title  : Single Common CSS（単一ページ共通：見出し余白／Photo地図／Facility系UI／サムネグリッド）
  Version: 1.6（イベント「このページへのお問い合わせ」リンク）
  Created: 2026-02-16 JST
  Updated: 2026-05-17 JST
  Author : R2Fish Project / ChatGPT

  Policy:
   - single系テンプレで使う共通スタイルを集約
   - 施設ページ固有の調整は .p-facility にスコープして副作用を防止
   - Photoのサムネグリッドは photo用クラスに限定
======================================================================*/


/* =========================================================
   Tokens（共通の見た目パラメータ：必要最低限）
   ========================================================= */
:root{
  --r2-card-bg: #fff;
  --r2-card-border: rgba(0,0,0,.08);
  --r2-card-radius: 16px;
  --r2-card-shadow: 0 6px 18px rgba(0,0,0,.06);
  --r2-card-pad: 18px;

  --r2-metrics-border: rgba(0,0,0,.10);
  --r2-metrics-radius: 14px;
  --r2-metrics-shadow: var(--r2-card-shadow);
}


/* =========================================================
   Single Common: Section title spacing
   - h2上：広め / h2下：狭め
   ========================================================= */

/* 単一テンプレ（SWELLの .l-article を前提）での見出し余白 */
.l-article .c-secTitle{
  margin-top: 2.0rem;     /* h2の上：しっかり */
  margin-bottom: 0.6rem;  /* h2の下：詰める */
}

/* 本文（the_content）直下に続く最初のセクションだけ、上余白を少し控えめ */
.l-article .post_content + section .c-secTitle{
  margin-top: 1.4rem;
}

/* section同士の基本リズム（必要最低限） */
.l-article section{
  margin-bottom: 1.2rem;
}


/* =========================================================
   Event Reference Links
   - イベント詳細の外部参照だけ、region ページ風の枠グループ表示に寄せる
   ========================================================= */
.p-referenceLinks--event .p-referenceLinks__list{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.p-referenceLinks--event .p-referenceLinks__item + .p-referenceLinks__item{
  margin-top: 1.1em;
}

.p-referenceLinks--event .p-referenceLinks__item{
  width: 100%;
  padding: .55em .8em;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 8px;
  box-sizing: border-box;
}

.p-referenceLinks--event .p-referenceLinks__itemTitle{
  display: block;
  margin: 0;
}

.p-referenceLinks--event .p-referenceLinks__itemLink{
  margin: .12em 0 0 1.15em;
}

.p-referenceLinks--event .p-referenceLinks__author{
  display: inline;
  margin-left: .5em;
  font-size: .85em;
  color: var(--color_text_thin, rgba(0,0,0,.62));
  white-space: nowrap;
}


/* ==========================================================
   Facility（旧 single-facility.css 統合）
   ========================================================== */

/* 施設ページ：H1を落ち着いたタイトルに調整 */
.p-facility .c-pageTitle{
  font-size: clamp(1.6rem, 3.2vw, 2.1rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-bottom: 0.7em;
}

/* セクション全体の余白を回復（施設ページだけに限定） */
.p-facility__info,
.p-facility__opening,
.p-facility__content,
.p-facility__events,
.p-facility__related{
  margin-bottom: 3em;
}

/* 見出し：上は広め、下は控えめ（施設ページだけに限定） */
.p-facility .c-secTitle{
  margin-top: 2.5em;
  margin-bottom: 1em;
}

/* 共通：ULリセット */
.p-facility__eventList,
.p-facility__relatedList{
  margin: 0;
  padding-left: 0;
  list-style: none;
}

/* イベント一覧 */
.p-facility__eventList li{
  line-height: 1.3;
  margin-bottom: 0.35em;
}

/* 日付部分 */
.p-facility__eventList li span{
  line-height: 1.2;
}

/* 同じ地域の施設 */
.p-facility__relatedList li{
  line-height: 1.3;
  margin-bottom: 0.35em;
}
.p-facility__relatedList li a{
  display: inline-block;
  line-height: 1.3;
}

/* 見出しとの距離（施設ページだけ） */
.p-facility__events .c-secTitle,
.p-facility__related .c-secTitle{
  margin-bottom: 0.8em;
}


/* ==========================================================
   Facility: 情報注記ブロック
   ========================================================== */
.p-facility__note{
  margin-top: 3em;
  padding: 1.2em 1.4em;
  background: #f7f7f7;
  border: 1px dashed #ccc;
  font-size: 0.9em;
  color: #555;
}

.p-facility__noteTitle{
  font-weight: 600;
  font-size: 0.9em;
  color: #444;
}

.p-facility__noteBody p{
  margin: 0 0 0.6em;
}

.p-facility__noteBody ul{
  margin: 0.6em 0 0.6em 1.2em;
  padding: 0;
}

.p-facility__noteBody li{
  margin-bottom: 0.3em;
}

.p-facility__noteLink{
  margin-top: 0.8em;
}


/* ==========================================================
   Photo single map（共通）
   ========================================================== */
.p-photoMap__embed{
  margin-top: .75em;
  border-radius: 12px;
  overflow: hidden;
}
.p-photoMap__embed iframe{
  display: block;
  width: 100%;
  border: 0;
}
.p-photoPlace__map{
  margin-top: 1em;
}
.p-photoMap__link{
  margin: .5em 0 0;
}
.p-photoMap__note{
  margin: .25em 0 .25em;
  opacity: .85;
}


/* ==========================================================
   Facility Hero（施設ページ限定）
   ========================================================== */
.p-facilityHero{ margin: 0 0 1.5em; }
.p-facilityHero__a{ position: relative; display: block; overflow: hidden; border-radius: 14px; }
.p-facilityHero__a img{ width: 100%; height: auto; display: block; transform: scale(1.01); }
.p-facilityHero__overlay{
  display: none;
  pointer-events: none;
  background: transparent;
}
.p-facilityHero__title{
  position: absolute; left: 14px; top: 12px;
  color: #fff; font-weight: 700; font-size: 22px; line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0,0,0,.65), 0 1px 2px rgba(0,0,0,.55);
  background: rgba(0,0,0,.18);
  padding: 8px 12px;
  border-radius: 10px;
  display: inline-block;
}
.p-facilityHero__credit{
  position: absolute; right: 12px; bottom: 10px;
  color: rgba(255,255,255,.92);
  font-size: 12px; line-height: 1.2;
  padding: 6px 10px;
  background: rgba(0,0,0,.35);
  border-radius: 999px;
  backdrop-filter: blur(6px);
}

/* Fix: 戻りリンクとHeroが被る（強め） */
.p-facility__backRegion{
  margin: 0.9em 0 1.1em; /* 下を増やす */
}
.p-facilityHero{
  margin-top: 1.6em;     /* もう少し離す */
}
/* 保険：テーマ側でHeroが前面に来る時の対策（レイアウトは崩さない） */
.p-facility__backRegion,
.p-facility__backRegionLink{
  position: relative;
  z-index: 2;
}
.p-facilityHero{
  position: relative;
  z-index: 1;
}


/* ==========================================================
   Visually hidden（共通ユーティリティ）
   ========================================================== */
.u-srOnly{
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}


/* ==========================================================
   Facility Photo Gallery（facility-photo-gallery.php）
   ========================================================== */
.p-facilityPhotos{
  margin: 1.8em 0 0;
}

.p-facilityPhotos__emptyLead{
  margin: .2em 0 1em;
  color: rgba(0,0,0,.7);
}

.p-facilityPhotos__cta{
  margin-top: 1em;
}

/* 投稿ボタン */
.p-facilityPhotos__btn{
  display: inline-block;
  padding: .75em 1.05em;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.15);
  text-decoration: none;
}

/* ギャラリーGrid */
.p-facilityPhotoGrid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: .8em;
  margin-top: .8em;
}

/* 1枚カード */
.p-facilityPhotoGrid__item{
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px;
  overflow: hidden;
}

.p-facilityPhotoGrid__a{
  display: block;
  text-decoration: none;
  color: inherit;
}

.p-facilityPhotoGrid__body{
  padding: .6em .75em;
}

.p-facilityPhotoGrid__title{
  margin: 0;
  font-size: .92em;
  line-height: 1.4;
}

/* 画像 */
.p-facilityPhotoGrid__img{
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}


/* =========================================================
   Photo: 「同じイベントの写真」サムネ一覧（文字なし）
   ========================================================= */
.l-article .p-photoRelatedEventPhotos__list{
  list-style: none;
  margin: 0.6rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)); /* SP: 3列 */
  gap: 10px;
}

@media (min-width: 768px){
  .l-article .p-photoRelatedEventPhotos__list{
    grid-template-columns: repeat(6, minmax(0, 1fr)); /* PC: 6列 */
    gap: 12px;
  }
}

.l-article .p-photoRelatedEventPhotos__item{
  margin: 0;
}

.l-article .p-photoRelatedEventPhotos__link{
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1; /* 正方形サムネ */
  overflow: hidden;
  border-radius: 10px;
}

/* WPサムネ（img）を枠いっぱいに */
.l-article .p-photoRelatedEventPhotos__link img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* サムネ無し時のプレースホルダー（PHP側で出しているspan用） */
.l-article .p-photoRelatedEventPhotos__noThumb{
  display: block;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.06);
}

/* 「写真に紐づいたイベント」最小整形（邪魔しない範囲） */
.l-article .p-photoRelatedEvent__title{
  margin: 0.2rem 0 0;
  font-weight: 700;
}
.l-article .p-photoRelatedEvent__meta{
  margin: 0.3rem 0 0;
  font-size: 0.95em;
  opacity: 0.9;
}


/* ==========================================================
   Card UI: Facility / Photo（ブロック化）
   ========================================================== */

/* Facility: 1ブロック（カード）化 */
.p-facility .p-facilityBlock{
  background: var(--r2-card-bg);
  border: 1px solid var(--r2-card-border);
  border-radius: var(--r2-card-radius);
  overflow: hidden;
  box-shadow: var(--r2-card-shadow);
  padding: var(--r2-card-pad);
}

/* ヒーローはカードの端まで“1枚”で見せる（padding打ち消し） */
.p-facility .p-facilityBlock .p-facilityHero{
  margin: calc(var(--r2-card-pad) * -1) calc(var(--r2-card-pad) * -1) 16px;
}

/* ブロック内では section の余白を「カード内リズム」に寄せる */
.p-facility .p-facilityBlock .p-facility__info,
.p-facility .p-facilityBlock .p-facility__opening,
.p-facility .p-facilityBlock .p-facility__content,
.p-facility .p-facilityBlock .p-facility__events,
.p-facility .p-facilityBlock .p-facility__related,
.p-facility .p-facilityBlock .p-facility__reviews,
.p-facility .p-facilityBlock .p-facility__note{
  margin-bottom: 1.6em;
}

/* 見出しの上余白もカード内用に抑える（既存 .p-facility .c-secTitle を上書き） */
.p-facility .p-facilityBlock .c-secTitle{
  margin-top: 1.6em;
  margin-bottom: .8em;
}

/* 情報注記はカードの“最終ブロック”感 */
.p-facility .p-facilityBlock .p-facility__note{
  margin-top: 1.6em;
  margin-bottom: 0;
}

/* Photo: 1ブロック（カード）化 */
.p-photoBlock{
  background: var(--r2-card-bg);
  border: 1px solid var(--r2-card-border);
  border-radius: var(--r2-card-radius);
  overflow: hidden;
  box-shadow: var(--r2-card-shadow);
  padding: var(--r2-card-pad);
}

/* Photoカード内リズム */
.p-photoBlock section{
  margin-bottom: 1.6em;
}

/* 見出しの上余白をカード内用に抑える（.l-article .c-secTitle より優先） */
.p-photoBlock .c-secTitle{
  margin-top: 1.6em;
  margin-bottom: .8em;
}

/* 本文（SWELL .post_content）もカードのリズムに馴染ませる */
.p-photoBlock .post_content{
  margin-bottom: 1.6em;
}

/* Photo: 本文内 related section を本文本体から視覚分離 */
.p-photoBlock .post_content > .p-photoRelatedSection{
  margin-top: 2.2em;
  padding-top: 1.2em;
  border-top: 1px solid rgba(0,0,0,.10);
}

.p-photoBlock .post_content > .p-photoRelatedSection .p-related-photo-gallery{
  margin-bottom: 0;
}

.p-photoBlock .post_content > .p-photoRelatedSection .p-photoRelatedSection__body > * + *{
  margin-top: 1.2em;
}

.p-photoBlock .post_content > .p-photoRelatedSection .p-photoRelatedSection__actions{
  margin-top: 1.4em;
  padding-top: 1.0em;
  border-top: 1px solid rgba(0,0,0,.08);
}

.p-photoBlock .post_content > .p-photoRelatedSection .p-photoRelatedSection__actions .c-wikiButtonWrap{
  margin-top: 0 !important;
}


/* Event: 本文末尾の責務群を静かに分離 */
.p-event__content .post_content > .p-eventContentGroup--actions,
.p-event__content .post_content > .p-eventContentGroup--venue{
  margin-top: 1.8em;
  padding-top: 1.0em;
  border-top: 1px solid rgba(0,0,0,.08);
}


/* ==========================================================
   Post Metrics（PV / Like）共通UI
   ========================================================== */
.p-postMetrics{
  margin: 1.2em 0 2.2em;
  padding: 0.9em 1.0em;
  border: 1px solid var(--r2-metrics-border);
  border-radius: var(--r2-metrics-radius);
  background: var(--r2-card-bg);
  box-shadow: var(--r2-metrics-shadow);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.p-postMetrics__item{
  display: flex;
  align-items: center;
  gap: 8px;
}

.p-postMetrics__label{
  font-size: 12px;
  opacity: .75;
}

.p-postMetrics__value{
  font-weight: 700;
  font-size: 14px;
}

.p-postMetrics__likeBtn{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.12);
  background: transparent;
  cursor: pointer;
}

.p-postMetrics__likeBtn.is-liked{
  border-color: rgba(0,0,0,.22);
}

@media (hover:hover){
  .p-postMetrics__likeBtn:hover{
    border-color: rgba(0,0,0,.22);
  }
}

/* カード直下のメトリクス：同幅で自然に */
.l-article .p-photoBlock + .p-postMetrics,
.p-facility .p-facilityBlock + .p-postMetrics{
  margin-top: 14px;
}

/* イベント「あとで見る」（いいね・PV とは別ブロック） */
#body_wrap.single-event .p-eventWatchLater{
  margin: 14px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--r2-metrics-border, rgba(0,0,0,.1));
  border-radius: var(--r2-metrics-radius, 8px);
  background: var(--r2-card-bg, #fff);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 0.62rem;
  row-gap: 0.35rem;
}

#body_wrap.single-event .p-eventWatchLater__btn{
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid #334155;
  background: #fff;
  color: #1e293b;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  line-height: 1.4;
}

#body_wrap.single-event .p-eventWatchLater__btn.is-saved{
  border-color: #047857;
  background: #ecfdf5;
  color: #047857;
}

#body_wrap.single-event .p-eventWatchLater__note{
  margin: 0;
  flex: 1 1 10rem;
  min-width: min(100%, 8rem);
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.5;
}

#body_wrap.single-event .p-postMetrics + .p-eventWatchLater{
  margin-top: 12px;
}

#body_wrap.single-event .p-event .p-eventWatchLater__contact{
  flex: 1 1 100%;
  margin: 0.35rem 0 0;
  padding-top: 0.5rem;
  border-top: 1px solid var(--r2-metrics-border, rgba(0, 0, 0, 0.1));
}

#body_wrap.single-event .p-event .p-eventWatchLater__contactLink{
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color_main, #0b5ed7);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

#body_wrap.single-event .p-event .p-eventWatchLater__contactLink:hover{
  opacity: 0.85;
}


/* =========================================================
   Event single: 見出し（h2 / h3 / c-secTitle）統一
   - #body_wrap.single-event .p-event に限定（他ページへ波及しない）
   - SWELL は body_class() を <body> ではなく #body_wrap に付与する（実DOMに一致）
   - SWELL 本文 h2/h3 のベタ塗り・c-secTitle の左帯を無効化
   ========================================================= */
#body_wrap.single-event .p-event{
  --r2-event-h2-color: #1e293b;
  --r2-event-h3-color: #334155;
  --r2-event-heading-accent: var(--color_main, #0b5ed7);
  --r2-event-heading-rule: rgba(15, 23, 42, 0.1);
}

/* --- レベル2（本文 h2・関連ブロック c-secTitle・会場情報など） --- */
#body_wrap.single-event .p-event :is(
  .post_content > h2,
  .post_content h2.c-secTitle,
  .post_content .c-secTitle,
  .p-eventBlock .c-secTitle,
  .c-facility-block > h2,
  .c-facility-block > .c-facility-title
){
  background: none !important;
  color: var(--r2-event-h2-color) !important;
  font-weight: 700;
  font-size: clamp(1.12rem, 2.6vw, 1.32rem);
  line-height: 1.45;
  letter-spacing: 0.02em;
  margin-top: 2.1rem;
  margin-bottom: 0.65rem;
  padding: 0 0 0.5rem !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  position: relative;
  border-bottom: 1px solid var(--r2-event-heading-rule) !important;
}

#body_wrap.single-event .p-event :is(
  .post_content > h2,
  .post_content h2.c-secTitle,
  .post_content .c-secTitle,
  .p-eventBlock .c-secTitle,
  .c-facility-block > h2,
  .c-facility-block > .c-facility-title
)::before{
  content: none !important;
  display: none !important;
}

#body_wrap.single-event .p-event :is(
  .post_content > h2,
  .post_content h2.c-secTitle,
  .post_content .c-secTitle,
  .p-eventBlock .c-secTitle,
  .c-facility-block > h2,
  .c-facility-block > .c-facility-title
)::after{
  content: "" !important;
  display: block !important;
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 2.75em;
  max-width: 42%;
  height: 2px;
  background: var(--r2-event-heading-accent);
  pointer-events: none;
  z-index: 1;
}

/* 本文先頭・関連グループ直後は上余白をやや抑える */
#body_wrap.single-event .p-event .post_content > :first-child:is(h2, h3),
#body_wrap.single-event .p-event .post_content > .p-eventContentGroup:first-child :is(h2.c-secTitle, .c-secTitle){
  margin-top: 1.35rem;
}

/* --- レベル3（build-event 本文内 h3 など） --- */
#body_wrap.single-event .p-event .post_content > h3,
#body_wrap.single-event .p-event .c-facility-block h3.c-facility-item__title{
  background: none !important;
  color: var(--r2-event-h3-color) !important;
  font-weight: 600;
  font-size: clamp(1.02rem, 2.2vw, 1.14rem);
  line-height: 1.5;
  margin-top: 1.55rem;
  margin-bottom: 0.4rem;
  padding: 0.12em 0 0.12em 0.7em !important;
  border: none !important;
  border-radius: 0 !important;
  border-left: 3px solid color-mix(in srgb, var(--r2-event-heading-accent) 38%, transparent) !important;
  box-shadow: none !important;
}

#body_wrap.single-event .p-event .post_content > h3::before,
#body_wrap.single-event .p-event .c-facility-block h3.c-facility-item__title::before{
  content: none !important;
  display: none !important;
}

#body_wrap.single-event .p-event .post_content > h3::after,
#body_wrap.single-event .p-event .c-facility-block h3.c-facility-item__title::after{
  content: none !important;
  display: none !important;
}

/* 関連ブロック・会場ブロック：区切りは余白＋薄線（帯見出しに頼らない） */
#body_wrap.single-event .p-event .post_content > .p-eventContentGroup,
#body_wrap.single-event .p-event .post_content > .p-eventContentGroup--related,
#body_wrap.single-event .p-event .post_content .p-related-photo-gallery,
#body_wrap.single-event .p-event .post_content .c-facility-block{
  margin-top: 1.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--r2-event-heading-rule);
}

#body_wrap.single-event .p-event .post_content .p-related-photo-gallery,
#body_wrap.single-event .p-event .post_content .c-facility-block{
  border-top-width: 1px;
  border-top-style: solid;
  border-top-color: var(--r2-event-heading-rule);
}

#body_wrap.single-event .p-event .c-facility-block{
  padding-top: 1.2em;
  border-top: 1px solid var(--r2-event-heading-rule) !important;
}

#body_wrap.single-event .p-event .c-facility-block > .c-facility-title{
  margin-top: 0;
}

/* 既存 single-common の c-secTitle 余白（.l-article）よりイベント内を優先 */
#body_wrap.single-event .p-event .post_content .c-secTitle,
#body_wrap.single-event .p-event .p-eventBlock .c-secTitle{
  margin-top: 0;
  margin-bottom: 0.65rem;
}

