/* Figma 270:330 と32点の列構成を、既存の原本ロゴ・書体で表示する。 */
.page-gallery > main { background: #f1f1f1; }
.gallery-page { background: #f1f1f1; }
.gallery-header { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 50px 10px 32px; text-align: center; }
.gallery-brand { display: block; width: 88px; line-height: 0; }
.gallery-brand .brand-mark { width: 88px; height: auto; }
.gallery-header h1 { margin: 0; font-family: var(--font-en); font-size: 24px; font-weight: 700; line-height: 1.5; letter-spacing: 2px; }
.gallery-header p { margin: 0; font-size: 12px; line-height: 1.5; }
.gallery-grid { display: grid; grid-template-columns: 468fr 216fr 448fr 258fr; align-items: start; gap: 10px; padding: 0 10px; }
.gallery-column { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.gallery-tile { position: relative; display: block; width: 100%; line-height: 0; text-decoration: none; }
.gallery-tile img { width: 100%; height: auto; object-fit: contain; }
.gallery-tile:focus-visible { z-index: 1; outline-offset: 2px; }
.gallery-video-cue { position: absolute; top: 8px; left: 8px; display: flex; align-items: center; justify-content: center; width: 108px; height: 28px; background: rgba(255,255,255,.94); color: var(--ink); font: 700 12px/1.5 var(--font-en); }

.gallery-dialog { position: fixed; inset: 0; z-index: 100; width: 100%; max-width: none; height: 100%; height: 100dvh; max-height: none; margin: 0; padding: 24px; border: 0; background: rgba(255,255,255,.94); color: var(--ink); overflow: auto; }
.gallery-dialog::backdrop { background: transparent; }
.gallery-dialog[open] { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
.gallery-dialog-bar { display: flex; flex: 0 0 48px; align-items: center; gap: 12px; min-height: 48px; }
.gallery-dialog-brand { flex: 0 0 auto; width: 56px; height: auto; }
.gallery-dialog-label { flex: 1 1 auto; margin: 0; font-size: 12px; line-height: 1.5; text-align: center; }
.gallery-counter { font: 400 12px/1.5 var(--font-ja); text-align: center; }
.gallery-dialog button { display: grid; flex: 0 0 auto; place-items: center; width: 48px; height: 48px; padding: 0; border: 0; background: transparent; color: inherit; font: 400 24px/1.5 var(--font-ja); cursor: pointer; }
.gallery-dialog-figure { display: flex; flex: 1 1 auto; flex-direction: column; align-items: center; gap: 12px; width: 100%; min-height: 0; margin: 0; }
.gallery-dialog-stage { display: flex; flex: 1 1 auto; align-items: center; justify-content: center; width: 100%; min-height: 0; }
.gallery-dialog-stage > img, .gallery-dialog-stage > video { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.gallery-dialog-caption { display: flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 100%; min-height: 30px; font-size: 14px; line-height: 1.5; text-align: center; overflow-wrap: anywhere; }
.gallery-dialog-error { margin: 0; font-size: 14px; }
.gallery-dialog-controls { display: flex; flex: 0 0 48px; align-items: center; justify-content: space-between; min-height: 48px; }
@media (max-width: 899px) {
  .gallery-header { gap: 6px; padding-top: 24px; padding-bottom: 20px; }
  .gallery-brand, .gallery-brand .brand-mark { width: 68px; }
  .gallery-header h1 { font-size: 18px; }
  .gallery-grid { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .gallery-video-cue { top: 6px; left: 6px; width: 100px; height: 25px; }
  .gallery-dialog { padding: 16px; }
  .gallery-dialog-brand { width: 40px; }
  .gallery-dialog-caption { font-size: 12px; }
}
