/* ============================================================
   /photos — 写真と動画（ゲストがアップロード／全員が閲覧）
   subpage.css の上に重ねる
   ============================================================ */

/* ---- 投稿者名（LINEログインが無いときの手入力） ---- */
.who {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.who__icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  background: var(--line);
}

.who__name {
  font-size: 14px;
  letter-spacing: 0.06em;
}

.who__input {
  flex: 1;
  min-width: 0;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--ink);
  padding: 11px 13px;
}

.who__input:focus {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

/* ---- アップロードボタン ---- */
.upload {
  display: block;
  width: 100%;
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: center;
  color: #fff;
  background: var(--ink);
  border: 1px solid var(--ink);
  padding: 18px 20px;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}

.upload:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.upload:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.upload__note {
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.9;
  color: var(--ink-soft);
}

/* ---- アップロード中の進捗 ---- */
.queue {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
}

.queue:empty {
  margin: 0;
}

.queue li {
  padding: 10px 0;
  border-top: 1px dotted var(--line);
  font-size: 12px;
  color: var(--ink-soft);
}

.queue__name {
  display: block;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue__bar {
  display: block;
  height: 2px;
  margin-top: 7px;
  background: var(--line);
}

.queue__bar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 0.2s linear;
}

.queue li.is-error {
  color: #b23c2a;
}

/* ---- ギャラリー ---- */
.gallery {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(102px, 1fr));
  gap: 6px;
}

.shot {
  position: relative;
  margin: 0;
  aspect-ratio: 1 / 1;
  background: #f2efec;
  overflow: hidden;
  cursor: zoom-in;
}

.shot img,
.shot video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 動画であることを示す小さな印 */
.shot__play {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  background: rgba(20, 20, 20, 0.72);
  color: #fff;
  font-size: 9px;
  line-height: 1;
  padding-left: 2px;
}

/* 投稿者と時刻（サムネの下辺に薄く重ねる） */
.shot__by {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 6px 5px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.18) 60%, transparent);
  color: #fff;
  /* 明るい写真の上でも名前が読めるように一段落とす */
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  font-size: 10px;
  line-height: 1.35;
  letter-spacing: 0.02em;
}

.shot__who {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shot__at {
  display: block;
  opacity: 0.8;
  font-family: var(--font-en);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.gallery__empty {
  border: 1px dotted var(--line);
  padding: 40px 20px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-soft);
}

.gallery__count {
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--ink-soft);
  margin-bottom: 14px;
}

/* ---- 拡大表示 ---- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10, 10, 10, 0.94);
  display: grid;
  grid-template-rows: 1fr auto;
  padding: 16px;
  cursor: zoom-out;
}

.lightbox[hidden] {
  display: none;
}

.lightbox__stage {
  display: grid; /* 子のトラックを行いっぱいに伸ばす */
  min-height: 0;
  min-width: 0;
}

/* 横スワイプ用のトラック。1枚=画面幅でスナップする */
.lightbox__track {
  display: flex;
  min-height: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.lightbox__track::-webkit-scrollbar {
  display: none;
}

.lightbox__slide {
  flex: 0 0 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  display: grid;
  place-items: center;
}

.lightbox__slide img,
.lightbox__slide video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* 前後ボタン。タッチ端末はスワイプで足りるので、ホバーできる環境だけ出す */
.lightbox__nav {
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  background: rgba(10, 10, 10, 0.5);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.lightbox__nav--prev { left: 14px; }
.lightbox__nav--next { right: 14px; }

.lightbox__nav[disabled] {
  opacity: 0.25;
  cursor: default;
}

@media (hover: hover) and (pointer: fine) {
  .lightbox__nav {
    display: block;
  }
}

.lightbox__count {
  font-family: var(--font-en);
  font-size: 11px;
  letter-spacing: 0.16em;
  opacity: 0.7;
}

.lightbox__meta {
  color: #fff;
  text-align: center;
  font-size: 12px;
  line-height: 1.8;
  padding-top: 14px;
}

.lightbox__meta a {
  color: #fff;
  font-size: 11px;
  letter-spacing: 0.12em;
}

.lightbox__close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: #fff;
  font-family: var(--font-en);
  font-size: 11px;
  letter-spacing: 0.16em;
  padding: 8px 14px;
  cursor: pointer;
}
