@charset "utf-8";

/* ====== ベース ====== */
:root{
  --page-w: 980px;
  --gap: 18px;
  --border: 1px solid #bdbdbd;
  --text: #111;
  --muted: #666;
}

*{ box-sizing: border-box; }
html,body{ margin:0; padding:0; }

body{
  font-family: system-ui, -apple-system, "Segoe UI", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  color: var(--text);
  background: #fff;
}

.lp{
  width: min(var(--page-w), calc(100% - 32px));
  margin: 18px auto 40px;
  display: grid;
  gap: 18px;
}

/* ====== Hero（16:9） ====== */
.hero{
  border: var(--border);
}

.hero__media{
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #5a5a5a;
}

.hero__img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

/* ====== 2段目：左画像 + 右情報 ====== */
.top-grid{
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: var(--gap);
  align-items: stretch; /* 左右の高さを揃える */
}

.left-visual{
  border: var(--border);
  height: 100%;
}

.left-visual__media{
  height: 100%;
  width: 100%;
  aspect-ratio: 1475 / 2435;
  overflow: hidden;
}

.left-visual__img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.info-card{
  border: var(--border);
  padding: 16px 18px;
}

.tiny{
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
}

.title{
  margin: 0 0 18px;
  font-size: 34px;
  line-height: 1.15;
  font-weight: 800;
}

.title__sub{
  font-size: 32px;
  font-weight: 800;
}

.meta{ margin: 0 0 18px; }

.meta__row{
  display: grid;
  grid-template-columns: 7.2em 1fr;
  gap: 8px;
  padding: 6px 0;
}

.meta__text{
  margin: 0;
  font-size: 24px;
  line-height: 1.7;
}

.section-title{
  margin: 10px 0 10px;
  font-size: 22px;
  font-weight: 900;
}

.times{
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.times li{
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  font-size: 22px;
}

.times .date{ white-space: nowrap; }
.times .time{ white-space: nowrap; }

/* ====== 作品内容 ====== */
.description{
  border: var(--border);
  padding: 14px 18px;
}

.description__title{
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 900;
}

.description__text{
  margin: 0;
  font-size: 18px;
  line-height: 1.7;
}

/* ====== ギャラリー（最大4列） ====== */
.gallery__grid{
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, 1fr);
}

.thumb{
  display: block;
  border: var(--border);
  padding: 8px;
  text-decoration: none;
  transition: transform .12s ease;
}

.thumb:hover{
  transform: translateY(-1px);
}

.thumb__img{
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
  object-position: center;
  border-radius: 2px;
}

/* ====== レスポンシブ ====== */
@media (max-width: 900px){
  .gallery__grid{
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 820px){
  .top-grid{
    grid-template-columns: 1fr;
  }

  .left-visual__media{
    height: auto;
    aspect-ratio: 3 / 5;
    max-height: 520px;
    background: #fff;
  }

  .left-visual__img{
    object-fit: contain;
    object-position: center;
  }
}

@media (max-width: 640px){
  .gallery__grid{
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 420px){
  .gallery__grid{
    grid-template-columns: 1fr;
  }
}

/* ====== モーダル ====== */
.modal{
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;

  /* ★中央寄せのためにflex化 */
  align-items: center;
  justify-content: center;
  padding: 24px; /* 外側に余白（矢印の逃げ場） */
}

.modal.is-open{
  display: flex; /* ★ block → flex */
}

.modal__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.72);
}

.modal__panel{
  position: relative;
  width: min(900px, 90vw);
  max-height: 85vh;
  margin: 40px auto;
  background: #111;
  border-radius: 10px;
  overflow: visible;
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
  display: grid;
  grid-template-rows: 1fr auto;
  touch-action: pan-y;
}

.modal__close{
  position: absolute;
  top: 10px;
  right: 12px;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 999px;
  background: rgba(255,255,255,.15);
  color: #fff;
  font-size: 24px;
  line-height: 38px;
  cursor: pointer;
}

.modal__close:hover{
  background: rgba(255,255,255,.25);
}

.modal__figure{
  margin: 0;
  height: 100%;
  overflow: hidden;     /* ★画像だけを角丸で切る */
  border-radius: 10px;  /* ★パネルと同じ角丸 */
  background: #111;
  touch-action: pan-y;
}

.modal__img{
  width: 100%;
  height: 100%;
  display: block;

  /* ★ 枠内に収めて背景を見せる */
  object-fit: contain;

  background: #000;
}

.modal__caption{
  padding: 10px 14px 12px;
  color: rgba(255,255,255,.85);
  font-size: 14px;
}

/* モーダル表示中はスクロール禁止 */
body.is-locked{
  overflow: hidden;
}

@media (max-width: 520px){
  .modal__panel{
    margin: 18px auto;
  }
}

/* ====== モーダル ナビ（画像の外側） ====== */
.modal__nav{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 999px;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 32px;
  line-height: 46px;
  cursor: pointer;
  z-index: 3;
}

.modal__nav:hover{
  background: rgba(0,0,0,.75);
}

/* ★ 画像の外側に配置 */
.modal__nav--prev{ 
   left: calc(-1 * clamp(20px, 4vw, 56px));
   }

.modal__nav--next{ 
   right: calc(-1 * clamp(20px, 4vw, 56px));
   }

/* スマホでは外に出しすぎない */
@media (max-width: 640px){
  .modal__nav--prev{
    left: 8px;
  }

  .modal__nav--next{
    right: 8px;
  }
}

@media (max-width: 520px){
  .modal__nav{
    width: 38px;
    height: 38px;
    font-size: 26px;
    line-height: 38px;
  }
}

/* ====== 画像切り替え：フェード ====== */
.modal__img{
  opacity: 1;
  transition: opacity .28s ease;
}

.modal__img.is-fading{
  opacity: 0;
}

.jacket-trigger{
  display: block;
  color: inherit;
  text-decoration: none;
  cursor: zoom-in;
}

/* 1枚だけ開く時はナビ不要 */
.modal.is-single .modal__nav{
  display: none;
}

/* ====== フッターバナー ====== */
.footer-banners{
  margin-top: 12px;
  padding: 18px 0 0;
  border-top: var(--border);
}

.footer-banners__list{
  list-style: none;
  padding: 0;
  margin: 0;

  display: grid;
  gap: 16px;
  justify-content: center;

  /* PCでは横並び */
  grid-template-columns: repeat(3, auto);
}

.footer-banners__list a{
  display: inline-block;
}

.footer-banners__list img{
  width: 200px;
  height: 60px;
  display: block;
  object-fit: contain;
}

/* ホバー（任意・控えめ） */
.footer-banners__list a:hover{
  opacity: .85;
}

/* ====== レスポンシブ ====== */
@media (max-width: 700px){
  .footer-banners__list{
    grid-template-columns: repeat(2, auto);
  }
}

@media (max-width: 420px){
  .footer-banners__list{
    grid-template-columns: 1fr;
  }

  .footer-banners__list img{
    margin: 0 auto;
  }
}
