/* =========================================================
   ギャラリー固有（作品一覧・関連ページへの導線）
   ヘッダー・フッターは site.css、ヒーロー＋パンくずは page-hero.css（下層4ページ共通）
   作品一覧と導線の見た目は従来の gallery-concepts.css から移植（デザイン未改修）
   ========================================================= */

.gallery-page {
  --g-paper: #fff;
  --g-ink: var(--ink);
  --g-line: var(--ink);
  display: block;
  max-width: none;          /* site.css の main の最大幅を解除（下層3ページと同じ） */
  margin-inline: 0;
  color: var(--g-ink);
  background: var(--g-paper);
}

.gallery-page img { display: block; width: 100%; }

/* Works */
.editorial-list { padding: 0; }
.editorial-work { scroll-margin-top: var(--header-h); position: relative; min-height: clamp(620px,78svh,860px); padding: clamp(5rem,9vw,9rem) var(--wrap); display: grid; grid-template-columns: minmax(12rem,.55fr) minmax(0,1.45fr); gap: clamp(2rem,7vw,8rem); align-items: center; overflow: hidden; color: var(--g-paper); background: var(--g-ink); }
.editorial-work:nth-child(even) { grid-template-columns: minmax(0,1.45fr) minmax(12rem,.55fr); color: var(--g-ink); background: var(--g-paper); }
.editorial-work:nth-child(even) .editorial-carousel { grid-column: 1; grid-row: 1; }
.editorial-work:nth-child(even) .editorial-copy { grid-column: 2; }
.editorial-copy, .editorial-carousel { position: relative; z-index: 1; }
.editorial-copy p { margin: 0 0 1.2rem; font-size: .63rem; font-weight: 700; letter-spacing: .15em; opacity: .72; }
.editorial-copy h2 { margin: 0; font: 400 clamp(2rem,4vw,4.4rem)/1.08 Georgia,"Yu Mincho",serif; letter-spacing: -.045em; }
.editorial-copy small { max-width: 23rem; margin-top: 1.5rem; display: block; font-size: .68rem; line-height: 1.8; }
.editorial-carousel { width: 100%; min-width: 0; }
/* 写真は 16:9。比率の違う写真は中央を基準に切り取る */
.editorial-carousel__stage { position: relative; width: 100%; aspect-ratio: 16/9; overflow: hidden; background: var(--g-paper); }
.carousel-slide { position: absolute; inset: 0; margin: 0; opacity: 0; visibility: hidden; transition: opacity .55s ease, visibility .55s ease; }
.carousel-slide.is-active { opacity: 1; visibility: visible; }
.editorial-carousel img { width: 100%; height: 100%; object-fit: cover; }
.editorial-carousel__arrow { position: absolute; z-index: 3; top: 50%; width: 2.75rem; height: 2.75rem; padding: 0 0 .15rem; border: 1px solid var(--g-ink); border-radius: 50%; color: var(--g-ink); background: var(--g-paper); font: 400 1.8rem/1 Arial,sans-serif; cursor: pointer; transform: translateY(-50%); transition: color .2s ease, background .2s ease; }
.editorial-carousel__arrow--prev { left: 1rem; }
.editorial-carousel__arrow--next { right: 1rem; }
.editorial-carousel__arrow:hover, .editorial-carousel__arrow:focus-visible { color: var(--g-paper); background: var(--g-ink); }
.editorial-carousel__dots { padding-top: .5rem; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0; }
/* 見た目は小さな点のまま、当たり判定を指で押せるサイズに広げる */
.editorial-carousel__dots button { width: 1.75rem; height: 1.75rem; padding: 0; display: grid; place-items: center; border: 0; background: transparent; cursor: pointer; }
.editorial-carousel__dots button::before { content: ""; width: .5rem; height: .5rem; border: 1px solid var(--g-paper); border-radius: 50%; background: var(--g-ink); transition: background .2s ease; }
.editorial-carousel__dots button[aria-current="true"]::before { background: var(--g-paper); }
.editorial-work:nth-child(even) .editorial-carousel__dots button::before { border-color: var(--g-ink); background: var(--g-paper); }
.editorial-work:nth-child(even) .editorial-carousel__dots button[aria-current="true"]::before { background: var(--g-ink); }

/* Contextual links from works to services */
.gallery-next { padding: clamp(5rem,9vw,9rem) var(--wrap); display: grid; grid-template-columns: minmax(0,1.1fr) minmax(20rem,.9fr); gap: clamp(3rem,9vw,10rem); align-items: end; border-top: 1px solid var(--g-line); background: var(--g-paper); }
.gallery-next__label { margin: 0 0 1.5rem; font-size: .63rem; font-weight: 700; letter-spacing: .17em; }
.gallery-next h2 { margin: 0; font: 400 clamp(2.6rem,5vw,5.8rem)/1.12 Georgia,"Yu Mincho",serif; letter-spacing: -.055em; }
.gallery-next__action > p { max-width: 36rem; margin: 0 0 2.25rem; font-size: .8rem; line-height: 1.9; }
.gallery-next__action nav { border-top: 1px solid var(--g-line); }
.gallery-next__action a { padding: 1rem 0; display: flex; justify-content: space-between; gap: 2rem; border-bottom: 1px solid var(--g-line); font-size: .76rem; line-height: 1.6; text-decoration: none; }
.gallery-next__action a:hover, .gallery-next__action a:focus-visible { opacity: .55; }

@media (max-width: 900px) {
  .editorial-work, .editorial-work:nth-child(even) { min-height: 0; grid-template-columns: 1fr; gap: 2rem; }
  .editorial-work:nth-child(even) .editorial-copy, .editorial-work:nth-child(even) .editorial-carousel { grid-column: auto; grid-row: auto; }
  .editorial-work:nth-child(even) .editorial-carousel { order: 2; }
  .gallery-next { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .editorial-work { min-height: 0; padding: 5rem var(--wrap); }
  .editorial-carousel__arrow { width: 2.5rem; height: 2.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .carousel-slide, .editorial-carousel__arrow, .editorial-carousel__dots button::before { transition: none; }
}
