@charset "UTF-8";

/* ==========================================================================
   入賞作品ページ（/award/prize_◯◯/）共通
   見出し・余白・幅は他の下層ページと同じ（l-section / l-container / c-title / c-subheading）。
   作品1件ごとに、左に画像・動画・音声、右に作品名と情報の表（c-table）を並べる。
   ========================================================================== */

/* ページタイトルが長いため、折り返さず画面幅に合わせて縮小する */
.l-page-header__title {
  font-size: 1.25rem;
  white-space: nowrap;
}

@media screen and (min-width: 768px) {
  .l-page-header__title {
    font-size: min(3.125rem, 4.2vw);
  }
}

/* Work（作品1件） -------------------------------------------------------- */
.p-prize__work {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #ececec;
}

.p-prize__work:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.p-prize__media {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.625rem;
  min-width: 0;
}

.p-prize__thumb {
  display: block;
  width: 100%;
  max-width: 21.5rem;
}

.p-prize__img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--color-border);
}

.p-prize__expand {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: var(--fs-12);
  letter-spacing: var(--ls-md);
  line-height: var(--lh-normal);
  color: #777;
}

.p-prize__expand::before {
  content: "";
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  background: url("../images/award/icon-expand.svg") no-repeat center / contain;
}

/* 動画は読み込めない場合も、枠（灰色の箱）が残るようにしている */
.p-prize__video {
  display: block;
  width: 100%;
  max-width: 21.5rem;
  height: auto;
  aspect-ratio: 344 / 193;
  background: var(--color-gray-light);
  border: 1px solid var(--color-border);
}

.p-prize__audio {
  display: block;
  width: 100%;
  max-width: 21.25rem;
  height: 2.5rem;
}

/* グランプリ：PC でも画像の下に情報を置く。動画・画像とも最大 40rem */
.p-prize__work--stack .p-prize__thumb {
  max-width: 40rem;
}

.p-prize__work--stack .p-prize__video {
  max-width: 40rem;
}

.p-prize__info {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  min-width: 0;
}

.p-prize__work-title {
  font-size: var(--fs-18);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-sm);
  line-height: 1.5;
  color: var(--color-text);
}

/* 情報の表は共通の c-table。文字は作品名より小さい16px、右の列が狭いため左見出しの幅だけ狭くしている */
.p-prize__table th,
.p-prize__table td {
  font-size: var(--fs-16);
}

@media screen and (min-width: 768px) {
  .p-prize__work-title {
    font-size: var(--fs-20);
  }

  .p-prize__table th {
    width: 8.75rem;
  }

  .p-prize__work {
    padding-bottom: 2.25rem;
  }
}

.p-prize__back {
  display: flex;
  justify-content: center;
  margin-top: 1.25rem;
}

/* 作品の画像・動画と情報を左右に並べるのは、幅に余裕のある 1040px 以上のみ（グランプリは除く） */
@media screen and (min-width: 1040px) {
  .p-prize__work:not(.p-prize__work--stack) {
    grid-template-columns: 21.5rem minmax(0, 1fr);
    gap: 2.5rem;
  }
}

/* Lightbox（画面上での拡大表示。js/prize.js が作る） ------------------- */
.p-prize-lightbox {
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
}

.p-prize-lightbox::backdrop {
  background: rgba(17, 17, 17, 0.85);
}

.p-prize-lightbox__stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 3.5rem 1rem;
}

.p-prize-lightbox__figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.625rem;
  margin: 0;
}

.p-prize-lightbox__frame {
  position: relative;
  display: flex;
}

.p-prize-lightbox__img {
  display: block;
  width: auto;
  max-width: min(90vw, 62.5rem);
  height: auto;
  max-height: 80vh;
  background: var(--color-white);
  touch-action: pan-y;
}

.p-prize-lightbox__status {
  font-size: var(--fs-14);
  color: var(--color-white);
}

/* スマホ：枚数表示の行を矢印と同じ高さにして、縦の中心をそろえる */
@media screen and (max-width: 1099.98px) {
  .p-prize-lightbox__status {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
  }
}

.p-prize-lightbox__btn {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--color-text);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 50%;
}

.p-prize-lightbox__btn--close {
  bottom: 100%;
  right: 0;
  margin-bottom: 0.625rem;
}

/* スマホ：矢印は画像の下の左右端に置く（画像との間は×印と同じ 0.625rem） */
.p-prize-lightbox__btn--prev {
  top: calc(100% + 0.625rem);
  left: 0;
}

.p-prize-lightbox__btn--next {
  top: calc(100% + 0.625rem);
  right: 0;
}

/* 画面に余裕がある幅（1100px 以上）では、矢印を画像のすぐ横（20px 離す）、×を画像の右上の角の外に置く */
@media screen and (min-width: 1100px) {
  .p-prize-lightbox__img {
    max-width: min(calc(100vw - 10rem), 62.5rem);
  }

  .p-prize-lightbox__btn--close {
    right: auto;
    bottom: calc(100% - 0.4375rem);
    left: calc(100% + 0.375rem);
    margin-bottom: 0;
  }

  .p-prize-lightbox__btn--prev {
    top: 50%;
    left: auto;
    right: calc(100% + 20px);
    transform: translateY(-50%);
  }

  .p-prize-lightbox__btn--next {
    top: 50%;
    right: auto;
    left: calc(100% + 20px);
    transform: translateY(-50%);
  }
}

.p-prize-lightbox__btn[hidden] {
  display: none;
}

/* 審査概要（応募数・審査員・講評）。第55回以降の元ページにある表 */
.p-prize__overview td p + p {
  margin-top: 1em;
}

.p-prize__sign {
  text-align: right;
}

/* サイト内の動画ファイル（<video>）は黒地にする */
video.p-prize__video {
  background: #000;
}

/* 情報の表の URL（インターネット部門など） */
.p-prize__link {
  text-decoration: underline;
  text-underline-offset: 0.2em;
  overflow-wrap: anywhere;
}

/* 講評の本文は、PHP 側の改行（元の段落の区切り）をそのまま改行として表示する */
.p-prize__overview td p:not(.p-prize__sign) {
  white-space: pre-line;
}
