/* 共通写真ギャラリー：ページ固有CSSより後に読み込みます。 */
.ohtaya-gallery { margin: 0 0 32px; }
.ohtaya-gallery__hint { margin: 0 0 12px; color: var(--gallery-muted, #66615c); font-size: 13px; }
.ohtaya-gallery__grid { display: grid; grid-template-columns: repeat(var(--gallery-columns, 3), minmax(0, 1fr)); gap: 20px 16px; }
.ohtaya-gallery__item { min-width: 0; margin: 0; }
.ohtaya-gallery__link { position: relative; display: block; overflow: hidden; border-radius: var(--gallery-radius, 10px); background: #f0ede7; }
.ohtaya-gallery__link img { display: block; width: 100%; height: auto; aspect-ratio: var(--gallery-ratio, 4 / 3); object-fit: cover; }
.ohtaya-gallery__zoom { position: absolute; right: 7px; bottom: 7px; padding: 2px 8px; border-radius: 4px; color: #fff; background: rgba(0,0,0,.65); font-size: 11px; }
.ohtaya-gallery__item figcaption { margin-top: 7px; color: var(--gallery-muted, #66615c); font-size: 13px; line-height: 1.65; }
.ohtaya-gallery__link:focus-visible { outline: 3px solid #bd8b3c; outline-offset: 3px; }
.ohtaya-gallery-dialog { width: min(1120px, calc(100% - 24px)); max-width: none; max-height: calc(100% - 24px); padding: 0; border: 0; border-radius: 12px; color: #fff; background: #202622; }
.ohtaya-gallery-dialog::backdrop { background: rgba(0,0,0,.82); }
.ohtaya-gallery-dialog__bar { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; }
.ohtaya-gallery-dialog__counter { margin: 0; font-size: 14px; }
.ohtaya-gallery-dialog button { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; padding: 8px 14px; border: 1px solid #727a74; border-radius: 6px; color: #fff; background: #303a33; font: inherit; cursor: pointer; }
.ohtaya-gallery-dialog button:focus-visible { outline: 3px solid #e8c378; outline-offset: 2px; }
.ohtaya-gallery-dialog__image { display: block; width: 100%; height: min(65vh, 720px); object-fit: contain; }
.ohtaya-gallery-dialog__caption { margin: 12px 20px; font-size: 15px; line-height: 1.7; overflow-wrap: anywhere; }
.ohtaya-gallery-dialog__controls { display: flex; justify-content: center; gap: 20px; padding: 0 12px 16px; }
@media (max-width: 700px) {
  .ohtaya-gallery__grid { grid-template-columns: repeat(var(--gallery-columns-sp, 2), minmax(0, 1fr)); gap: 16px 12px; }
  .ohtaya-gallery__item figcaption { font-size: 12px; }
  .ohtaya-gallery-dialog__image { height: 55vh; height: 55dvh; }
}
@media print {
  .ohtaya-gallery-dialog, .ohtaya-gallery__hint, .ohtaya-gallery__zoom { display: none !important; }
}



/* 共通CSSのimg・figure・a指定から必要なレイアウトを保護 */
.ohtaya-gallery, .ohtaya-gallery *, .ohtaya-gallery-dialog, .ohtaya-gallery-dialog * { box-sizing: border-box; }
.ohtaya-gallery .ohtaya-gallery__link { padding: 0; border: 0; color: inherit; text-decoration: none; }
.ohtaya-gallery .ohtaya-gallery__item { padding: 0; border: 0; }
.ohtaya-gallery__link img { max-width: 100%; margin: 0; }
.ohtaya-gallery-dialog { margin: auto; font-family: inherit; line-height: 1.6; }
.ohtaya-gallery-dialog .ohtaya-gallery-dialog__image { max-width: 100%; max-height: none; margin: 0; padding: 0; border: 0; }
.ohtaya-gallery-dialog [hidden] { display: none !important; }

/*強制的に2列*/
.ohtaya-gallery--two-columns > .ohtaya-gallery__grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}