/* 副本：來源 shared/ui/lightbox/lightbox.css（可重用元件，改行為請改來源再複製過來）。 */
/* 前綴已改為 .amon-lb（Lightbox.init 傳 prefix:'amon-lb'）；AMON 配色在 amon.css 覆寫變數。 */
/* 點開看大圖（lightbox）樣式——可重用元件
   來源：shenxin-home/assets/home.css 的 .sx-lb* 段，2026-10-08 抽出。
   前綴是 .lb；換前綴就把整檔的 "lb" 換掉，並在 Lightbox.init 傳同一個 prefix。
   配色用 CSS 變數，各站可覆寫：--lb-bg、--lb-fg、--lb-cap、--lb-accent。 */
.amon-lb-lock, .amon-lb-lock body { overflow: hidden; }

.amon-lb {
  --lb-bg: rgba(8, 10, 12, .93);
  --lb-fg: #fff;
  --lb-cap: #c7ced6;
  --lb-accent: #fff;
  position: fixed; inset: 0; z-index: 99999;
  display: none; place-items: center;
  background: var(--lb-bg);
  padding: 40px 64px;
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.amon-lb.is-on { display: grid; grid-template-rows: 1fr auto; }

.amon-lb__stage { margin: 0; display: grid; place-items: center; gap: 14px; max-width: 100%; max-height: 100%; min-height: 0; }
/* contain 的效果：直式圖卡、橫式照片都完整顯示，不裁切 */
.amon-lb__stage img {
  max-width: min(1400px, 100%);
  max-height: calc(100vh - 200px);
  width: auto; height: auto; object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 30px 90px rgba(0,0,0,.5);
}
.amon-lb__stage figcaption {
  color: var(--lb-cap); font-size: 13.5px; text-align: center;
  max-width: 720px; line-height: 1.7;
}

.amon-lb__x, .amon-lb__nav {
  position: absolute; z-index: 1;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  color: var(--lb-fg); cursor: pointer;
  border-radius: 999px;
  display: grid; place-items: center;
  transition: background .2s ease;
}
.amon-lb__x:hover, .amon-lb__nav:hover { background: rgba(255,255,255,.2); }
.amon-lb__x:focus-visible, .amon-lb__nav:focus-visible, .amon-lb__thumb:focus-visible { outline: 2px solid var(--lb-accent); outline-offset: 2px; }
.amon-lb__x { top: 20px; right: 22px; width: 42px; height: 42px; font-size: 26px; line-height: 1; }
.amon-lb__nav { top: 50%; transform: translateY(-50%); width: 46px; height: 46px; font-size: 30px; line-height: 1; }
.amon-lb__nav--prev { left: 16px; }
.amon-lb__nav--next { right: 16px; }
.amon-lb__nav[hidden], .amon-lb__count[hidden], .amon-lb__strip[hidden] { display: none; }
.amon-lb__count { position: absolute; top: 28px; left: 24px; color: var(--lb-fg); font-size: 14px; font-variant-numeric: tabular-nums; letter-spacing: .04em; }

.amon-lb__strip { display: flex; gap: 8px; max-width: 100%; overflow-x: auto; padding: 14px 4px 2px; scrollbar-width: none; }
.amon-lb__strip::-webkit-scrollbar { display: none; }
.amon-lb__thumb { flex: none; width: 56px; height: 56px; padding: 0; border: 2px solid transparent; border-radius: 4px; overflow: hidden; background: #fff; opacity: .55; cursor: pointer; }
.amon-lb__thumb img { width: 100%; height: 100%; object-fit: contain; }
.amon-lb__thumb.is-on { opacity: 1; border-color: var(--lb-accent); }

@media (max-width: 720px) {
  .amon-lb { padding: 56px 12px 84px; }
  .amon-lb__stage img { max-height: calc(100vh - 260px); }
  /* 手機上左右鈕改放畫面底部並排。
     ⚠️ 原本貼在左右兩側，在 375px 寬的螢幕上會直接壓在照片上，
     而且剛好落在拇指最容易誤觸的位置。 */
  .amon-lb__nav {
    top: auto; bottom: 20px; transform: none;
    width: 46px; height: 46px; font-size: 26px;
  }
  .amon-lb__nav--prev { left: 50%; margin-left: -56px; }
  .amon-lb__nav--next { right: 50%; margin-right: -56px; }
  .amon-lb__x { top: 12px; right: 12px; }
  .amon-lb__count { top: 22px; left: 16px; }
  .amon-lb__thumb { width: 44px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .amon-lb__x, .amon-lb__nav { transition: none; }
}
