/* 体験談の写真ギャラリー(従来デザインのページ用)。
   部品の HTML と class 名は体験談デザイン案(story-preview / story-gallery / gallery-dialog)と同じ。
   ここでは色と書体だけ従来テーマの変数に読み替え、本文幅 760px に合わせて寸法を詰めている。
   新しいデザインのページでは voice.css 側に同じ部品のスタイルがあり、このファイルは読み込まない。 */

/* 冒頭の写真 3 枚 */
.single-taikendan .cb-tk-photos { margin: 0 0 20px; }
.single-taikendan .story-preview { display: grid; grid-template-columns: 1.55fr 1fr 1fr; gap: 12px; }
.single-taikendan .story-preview > a { display: block; overflow: hidden; border-radius: 14px; height: 230px; background: #e0eaf8; }
.single-taikendan .story-preview img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.2s; }
.single-taikendan .story-preview > a:hover img { transform: scale(1.035); }
.single-taikendan .story-preview-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 16px 0 0; }
.single-taikendan .story-preview-footer p { margin: 0; }
.single-taikendan .story-preview-footer .script { display: block; font-family: var(--cb-font-script); font-size: 26px; line-height: 1.15; color: var(--cb-blue); }
.single-taikendan .story-preview-footer small { display: block; margin-top: 6px; font-size: 11px; color: var(--cb-sub); }
.single-taikendan .gallery-jump { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 13px; font-weight: 700; color: var(--cb-deep); padding: 6px 0; border-bottom: 1px solid #9bb6da; }
.single-taikendan .gallery-jump > span { font-size: 11px; margin-left: 6px; }
.single-taikendan .gallery-jump svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.single-taikendan .gallery-jump:hover { color: var(--cb-blue); border-color: var(--cb-blue); }

/* 末尾の全件 */
.single-taikendan .story-gallery { margin-top: 36px; scroll-margin-top: 80px; }
.single-taikendan .story-gallery .section-top { margin-bottom: 22px; }
.single-taikendan .story-gallery .section-top .script { margin: 0; font-family: var(--cb-font-script); font-size: 28px; line-height: 1.15; color: var(--cb-blue); }
.single-taikendan .story-gallery .section-top h2 { margin: 6px 0 0; font-size: clamp(20px, 4vw, 26px); font-weight: 700; line-height: 1.6; color: var(--cb-deep); }
.single-taikendan .story-gallery .section-description { margin: 12px 0 0; font-size: 12.5px; line-height: 1.9; color: var(--cb-sub); }
.single-taikendan .gallery-grid { columns: 2; column-gap: 20px; }
.single-taikendan .gallery-grid figure { min-width: 0; break-inside: avoid; margin: 0 0 24px; }
.single-taikendan .gallery-grid figure > a { display: block; position: relative; background: #e0eaf8; border-radius: 12px; overflow: hidden; }
.single-taikendan .gallery-grid img { display: block; width: 100%; height: auto; max-height: 580px; object-fit: contain; }
.single-taikendan .gallery-enlarge { position: absolute; bottom: 10px; right: 10px; border-radius: 6px; background: #fff; color: var(--cb-deep); font-size: 11px; font-weight: 700; padding: 6px 10px; }
.single-taikendan .gallery-grid figcaption { font-size: 12px; margin-top: 10px; display: flex; align-items: baseline; gap: 10px; color: var(--cb-ink); }
.single-taikendan .gallery-grid figcaption > span { font-family: var(--cb-font-script); font-size: 22px; line-height: 1; color: var(--cb-blue); }
.single-taikendan .gallery-bottom { display: flex; justify-content: space-between; gap: 20px; margin-top: 24px; font-size: 12px; font-weight: 700; }
.single-taikendan .gallery-bottom a { color: var(--cb-deep); text-decoration: underline; text-underline-offset: 6px; }

/* 拡大表示 */
.gallery-dialog { margin: auto; border: 0; border-radius: 12px; padding: 20px 24px; background: #fff; color: var(--cb-deep); width: min(1100px, calc(100% - 48px)); max-width: none; max-height: calc(100dvh - 40px); overflow: auto; }
.gallery-dialog::backdrop { background: rgba(20, 41, 66, 0.86); }
.gallery-dialog-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; font-size: 13px; font-weight: 700; margin-bottom: 12px; }
.gallery-dialog-top p { margin: 0; }
.gallery-dialog-top button { border: 0; background: var(--cb-sky); color: var(--cb-deep); border-radius: 6px; font-size: 25px; line-height: 1; min-width: 44px; height: 44px; cursor: pointer; }
.gallery-dialog figure { margin: 0; }
.gallery-dialog figure > img { display: block; width: 100%; height: calc(100dvh - 235px); object-fit: contain; background: #f5f7fa; min-height: 160px; }
.gallery-dialog figcaption { text-align: center; font-size: 13px; margin: 11px 0; }
.gallery-controls { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.gallery-controls p { margin: 0; font-size: 13px; }
.gallery-controls button { background: var(--cb-sky); color: var(--cb-deep); border: 0; border-radius: 6px; padding: 11px 18px; min-height: 44px; font-size: 12px; cursor: pointer; }
.gallery-controls button:disabled { opacity: 0.4; cursor: default; }

@media (max-width: 700px) {
  .single-taikendan .story-preview { grid-template-columns: 1fr 1fr; gap: 10px; }
  .single-taikendan .story-preview > a { height: 148px; }
  .single-taikendan .story-preview > a:first-child { grid-column: span 2; height: auto; aspect-ratio: 1.55; }
  .single-taikendan .story-preview-footer { display: block; }
  .single-taikendan .gallery-jump { margin-top: 14px; width: 100%; }
  .single-taikendan .gallery-jump > span { margin-left: auto; }
  .single-taikendan .gallery-grid { columns: 1; }
  .single-taikendan .gallery-grid img { max-height: none; }
  .gallery-dialog { width: calc(100% - 24px); max-height: calc(100dvh - 24px); padding: 14px; border-radius: 9px; }
  .gallery-dialog-top { font-size: 11px; }
  .gallery-dialog figure > img { height: calc(100dvh - 220px); }
  .gallery-controls button { font-size: 11px; padding: 10px 12px; }
}
@media (max-width: 400px) {
  .single-taikendan .story-preview > a { height: 130px; }
}
/* 写真が 1〜2 枚のときは列を詰める(右側に空きを残さない。クラスは render_preview が付ける) */
.single-taikendan .story-preview--1 { grid-template-columns: 1fr; }
.single-taikendan .story-preview--1 > a { height: auto; aspect-ratio: 1.9; }
.single-taikendan .story-preview--2 { grid-template-columns: 1.55fr 1fr; }
@media (max-width: 700px) {
  .single-taikendan .story-preview--1 > a:first-child { grid-column: auto; }
  .single-taikendan .story-preview--1 > a { aspect-ratio: 1.55; }
  .single-taikendan .story-preview--2 > a:last-child { grid-column: span 2; height: auto; aspect-ratio: 1.55; }
}
@media (prefers-reduced-motion: reduce) {
  .single-taikendan .story-preview img { transition: none; }
}
