/*
 * ロケ地ページの写真ギャラリー・動画・拡大表示（一覧の詳細ビューと locations/<slug>/ の静的ページで共通）。
 * 写真と動画は scripts/build_location_media.py が作例から選んで locations/media/<slug>/ に置く。
 * yu 原文（2026-10-08）「寄り引きのバランスや構図、ポージングのバランスなどをうまく配置しながら…よりおしゃれに洗練」
 */
.lm { --lm-gap: 8px; }

/* ---------- 1 枚目（引きの横位置）---------- */
.lm-hero {
  position: relative;
  max-width: 1080px;
  margin: 14px auto 0;
  padding: 0 16px;
}
.lm-hero button {
  display: block; width: 100%; padding: 0; border: 0; background: var(--bg-section, #F0ECE5);
  aspect-ratio: 3 / 2; overflow: hidden; border-radius: 4px; cursor: zoom-in;
}
@media (min-width: 760px) { .lm-hero button { aspect-ratio: 16 / 8; } }
.lm-hero img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.6s ease; }
/* 横位置の引きが無いロケ地は縦の引き 2 枚を並べる */
.lm-hero.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lm-hero.pair button { aspect-ratio: 4 / 5; }
@media (min-width: 760px) { .lm-hero.pair button { aspect-ratio: 4 / 4.2; } }
.lm-hero button:hover img { transform: scale(1.02); }

/* ---------- 見出し ---------- */
.lm-head { text-align: center; margin: 56px auto 22px; padding: 0 20px; }
.lm-eyebrow {
  font-family: 'Cormorant Garamond', serif; font-style: italic; font-weight: 300;
  font-size: 26px; letter-spacing: 2px; color: var(--primary, #8B7355); line-height: 1.2;
}
.lm-rule { width: 28px; height: 1px; background: var(--primary-light, #B8A88A); margin: 10px auto 10px; }
.lm-sub { font-family: 'Noto Serif JP', serif; font-size: 12px; letter-spacing: 2px; color: var(--text-light, #6B6B6B); }

/* ---------- 動画 ---------- */
.lm-movies {
  display: grid; gap: 14px; max-width: 1080px; margin: 0 auto; padding: 0 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 760px) { .lm-movies.two { grid-template-columns: 1fr 1fr; } .lm-movies.one { max-width: 860px; } }
.lm-movie {
  position: relative; display: block; width: 100%; padding: 0; border: 0; cursor: zoom-in;
  background: #1b1c1f; border-radius: 4px; overflow: hidden; aspect-ratio: 16 / 9;
}
.lm-movie video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.lm-movie::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 40%;
  background: linear-gradient(to top, rgba(20, 18, 15, .35), transparent); pointer-events: none;
}
.lm-movie .lm-mark {
  position: absolute; left: 14px; bottom: 11px; z-index: 1; color: rgba(255, 255, 255, .9);
  font-family: 'Cormorant Garamond', serif; font-size: 12px; letter-spacing: 3px;
  display: flex; align-items: center; gap: 8px;
}
.lm-movie .lm-mark::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .85); }

/* ---------- 写真（列ごとに積む石畳）---------- */
.lm-gallery { display: flex; gap: var(--lm-gap); max-width: 1080px; margin: 0 auto; padding: 0 16px; align-items: flex-start; }
.lm-col { flex: 1 1 0; display: flex; flex-direction: column; gap: var(--lm-gap); min-width: 0; }
.lm-tile {
  display: block; width: 100%; padding: 0; border: 0; cursor: zoom-in; overflow: hidden;
  background: var(--bg-section, #F0ECE5); border-radius: 3px;
  opacity: 0; transform: translateY(14px); transition: opacity .9s ease, transform .9s ease;
}
.lm-tile.in { opacity: 1; transform: none; }
.lm-tile img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s ease; }
.lm-tile:hover img { transform: scale(1.025); }
@media (prefers-reduced-motion: reduce) { .lm-tile { opacity: 1; transform: none; transition: none; } }

.lm-count { text-align: center; font-size: 11px; letter-spacing: 2px; color: var(--text-muted, #A0A0A0); margin: 14px 0 0; }

/* ---------- 拡大表示 ---------- */
.lm-lb {
  position: fixed; inset: 0; z-index: 100; background: rgba(18, 17, 15, .96);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .3s ease;
}
.lm-lb.show { opacity: 1; pointer-events: auto; }
.lm-lb-stage { width: 100vw; height: 100vh; height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 56px 12px; box-sizing: border-box; touch-action: pan-y; }
.lm-lb-stage img, .lm-lb-stage video { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.lm-lb button { position: absolute; background: none; border: 0; color: rgba(255, 255, 255, .85); cursor: pointer; font-family: 'Cormorant Garamond', serif; }
.lm-lb-x { top: 12px; right: 14px; font-size: 13px; letter-spacing: 3px; padding: 10px; }
.lm-lb-prev, .lm-lb-next { top: 50%; transform: translateY(-50%); font-size: 38px; padding: 18px 14px; line-height: 1; }
.lm-lb-prev { left: 2px; } .lm-lb-next { right: 2px; }
.lm-lb-n { bottom: 16px; left: 0; right: 0; text-align: center; position: absolute; color: rgba(255, 255, 255, .6); font-family: 'Cormorant Garamond', serif; font-size: 13px; letter-spacing: 3px; }
@media (max-width: 640px) { .lm-lb-prev, .lm-lb-next { display: none; } }

/* ---------- 一覧カードの「MOVIE」---------- */
.lm-badge {
  position: absolute; top: 10px; right: 10px; z-index: 1;
  font-family: 'Cormorant Garamond', serif; font-size: 10.5px; letter-spacing: 2.5px; color: #fff;
  background: rgba(30, 26, 20, .42); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  padding: 3px 9px 3px 8px; border-radius: 999px; display: flex; align-items: center; gap: 6px;
}
.lm-badge::before { content: ""; border-left: 6px solid #fff; border-top: 4px solid transparent; border-bottom: 4px solid transparent; }
.lm-card-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s ease; pointer-events: none; }
.lm-card-video.on { opacity: 1; }

/* ---------- 準備ガイドのカード（ポージング・小物）---------- */
.lm-set { background: var(--bg-section, #F0ECE5); display: flex; flex-direction: column; gap: 3px; }
.lm-set .lm-set-movie { border-radius: 0; }
.lm-set .lm-set-gallery { --lm-gap: 3px; padding: 0; max-width: none; margin: 0; }
.lm-set .lm-tile { border-radius: 0; }
