@charset "UTF-8";

/* =========================
   キャプション
========================= */

.caption {
  margin-top: 12px;
  font-size: 0.75rem;
  line-height: 1.6;
  color: #444;
}

.work-title-ja {
  letter-spacing: 0.1em;
}

.work-title-en {
  letter-spacing: 0.06em;
}
/* =========================
   モーダル
========================= */

.modal {
  position: fixed;
  inset: 0;

  display: flex;
  justify-content: center;
  align-items: flex-start;

  padding: 120px 0 40px;

  background: rgba(0,0,0,0.85);

  overflow-y: auto;

  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;

  z-index: 2000;
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  position: relative;
  width: 95%;
  max-width: 900px;
  background: #fff;
  padding: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.modal-images {
  display: flex;
  flex-direction: row;
  gap: 12px;
  margin-top: 16px;
  align-items: center;
}

.modal-images img {
  width: 50%;
  height: auto;
  max-height: 60dvh;
  object-fit: contain;
  display: block;
}

.modal-images.single {
  justify-content: center;
}

.modal-images.single img {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

#caption {
  margin-top: 10px;
  font-size: 0.75rem;
  line-height: 1.5;
  color: #333;
}

.translation {
  opacity: 0.8;
}

.close {
  position: absolute;
  top: 8px;
  right: 10px;

  font-size: 1.375rem;
  border: none;
  background: none;
  cursor: pointer;
  color: #333;
}

/* =========================
   スマホ
========================= */

@media (max-width: 768px) {

  body {
    padding-top: 90px;
  }

  .modal {
    align-items: flex-start;
    padding: 100px 10px 48px;
    z-index: 2000;
  }

  .modal-box {
  width: 92%;
  max-width: none;
  padding: 16px;
  max-height: 90dvh;
  overflow-y: auto;
  }

  .modal-images {
    flex-direction: column;
  }

  .modal-images img {
    width: 100%;
    height: auto;
    max-height: 42dvh;
    object-fit: contain;
  }

}