/* ===== Unified Modern Interactive Photo Archive & Native <dialog> Lightbox (_bss_core) ===== */
.bsph-page{
  --ph-bg:#f6f4ee;
  --ph-surface:#ffffff;
  --ph-surface2:#ecebe4;
  --ph-text:#1c1b1a;
  --ph-muted:#5f6570;
  --ph-line:rgba(28,27,26,.1);
  --ph-accent:#2f6bff;
  --ph-accent-ink:#ffffff;
  --ph-accent-soft:rgba(47,107,255,.12);
  --ph-gold:#ffedaf;
  --ph-shadow:0 6px 20px rgba(24,20,14,.07);
  --ph-shadow-hi:0 16px 36px rgba(24,20,14,.16);
  background:var(--ph-bg);
  color:var(--ph-text);
  min-block-size:70dvh;
  padding:28px 0 64px;
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}
@media (prefers-color-scheme:dark){
  html:not([data-rd-theme="light"]) .bsph-page{
    --ph-bg:#111215;
    --ph-surface:#1a1c22;
    --ph-surface2:#242731;
    --ph-text:#eef0f4;
    --ph-muted:#9aa2b0;
    --ph-line:rgba(255,255,255,.11);
    --ph-accent:#6ea8ff;
    --ph-accent-ink:#071122;
    --ph-accent-soft:rgba(110,168,255,.16);
    --ph-shadow:0 8px 24px rgba(0,0,0,.35);
    --ph-shadow-hi:0 18px 40px rgba(0,0,0,.55);
  }
}
html[data-rd-theme="dark"] .bsph-page{
  --ph-bg:#111215;
  --ph-surface:#1a1c22;
  --ph-surface2:#242731;
  --ph-text:#eef0f4;
  --ph-muted:#9aa2b0;
  --ph-line:rgba(255,255,255,.11);
  --ph-accent:#6ea8ff;
  --ph-accent-ink:#071122;
  --ph-accent-soft:rgba(110,168,255,.16);
  --ph-shadow:0 8px 24px rgba(0,0,0,.35);
  --ph-shadow-hi:0 18px 40px rgba(0,0,0,.55);
}
.bsph-page,.bsph-page *{box-sizing:border-box}
.bsph-page [hidden]{display:none!important}
.bsph-page svg{fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none}

.bsph-wrap{
  max-inline-size:1200px;
  margin-inline:auto;
  padding-inline:18px;
}

/* Header */
.bsph-head{
  display:flex;
  flex-wrap:wrap;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px 20px;
  margin-block-end:22px;
}
.bsph-head-main{
  min-inline-size:0;
}
.bsph-h1{
  margin:0 0 10px;
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display","Segoe UI",Roboto,sans-serif;
  font-size:clamp(1.6rem,1.1rem + 1.8vw,2.25rem);
  font-weight:780;
  letter-spacing:-.025em;
  line-height:1.16;
  color:var(--ph-text);
  text-wrap:balance;
}
.bsph-stats{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.bsph-stat{
  display:inline-flex;
  align-items:center;
  gap:5px;
  padding:4px 11px;
  border-radius:999px;
  background:var(--ph-surface);
  border:1px solid var(--ph-line);
  font-size:.8125rem;
  color:var(--ph-muted);
  font-variant-numeric:tabular-nums;
}
.bsph-stat strong{
  color:var(--ph-text);
  font-weight:700;
}

.bsph-head-tools{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
}
.bsph-seg{
  display:inline-flex;
  align-items:center;
  padding:3px;
  border-radius:11px;
  background:var(--ph-surface);
  border:1px solid var(--ph-line);
  gap:2px;
}
.bsph-seg-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  min-block-size:32px;
  padding:4px 10px;
  border:0;
  border-radius:8px;
  background:transparent;
  color:var(--ph-muted);
  font-size:.8125rem;
  font-weight:600;
  line-height:1.2;
  cursor:pointer;
  transition:background-color .15s,color .15s;
}
.bsph-seg-btn svg{width:14px;height:14px}
.bsph-seg-btn:hover{color:var(--ph-text);background:var(--ph-surface2)}
.bsph-seg-btn.is-on{
  background:var(--ph-text);
  color:var(--ph-bg);
}
.bsph-seg-btn:focus-visible{outline:2px solid var(--ph-accent);outline-offset:2px}

.bsph-show-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-block-size:38px;
  padding:6px 16px;
  border:0;
  border-radius:11px;
  background:var(--ph-accent);
  color:var(--ph-accent-ink);
  font-size:.875rem;
  font-weight:650;
  line-height:1.2;
  cursor:pointer;
  box-shadow:0 4px 14px var(--ph-accent-soft);
  transition:transform .14s,filter .15s;
}
.bsph-show-btn svg{width:13px;height:13px;fill:currentColor;stroke:none}
.bsph-show-btn:hover{filter:brightness(1.06);transform:translateY(-1px)}
.bsph-show-btn:active{transform:scale(.96)}
.bsph-show-btn:focus-visible{outline:2px solid var(--ph-accent);outline-offset:2px}

/* Interactive Album Strip */
.bsph-albums{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-block-end:22px;
}
.bsph-alb{
  display:inline-flex;
  align-items:center;
  gap:9px;
  min-block-size:48px;
  padding:5px 14px 5px 6px;
  border-radius:14px;
  background:var(--ph-surface);
  border:1px solid var(--ph-line);
  color:var(--ph-text)!important;
  text-decoration:none!important;
  box-shadow:0 2px 8px rgba(0,0,0,.04);
  transition:transform .16s ease,border-color .16s ease,background-color .16s ease,box-shadow .16s ease;
}
.bsph-alb:hover{
  transform:translateY(-2px);
  border-color:color-mix(in srgb,var(--ph-accent) 45%,var(--ph-line));
  box-shadow:var(--ph-shadow);
}
.bsph-alb.is-active{
  background:var(--ph-accent);
  border-color:var(--ph-accent);
  color:var(--ph-accent-ink)!important;
  box-shadow:0 6px 18px var(--ph-accent-soft);
}
.bsph-alb:focus-visible{outline:2px solid var(--ph-accent);outline-offset:2px}
.bsph-alb-img{
  display:block;
  width:36px;
  height:36px;
  border-radius:9px;
  object-fit:cover;
  object-position:center top;
  flex:none;
  background:var(--ph-surface2);
}
.bsph-alb-name{
  font-size:.875rem;
  font-weight:650;
  line-height:1.25;
  white-space:nowrap;
}
.bsph-alb-cnt{
  padding:2px 7px;
  border-radius:999px;
  background:var(--ph-surface2);
  color:var(--ph-muted);
  font-size:.75rem;
  font-weight:700;
  font-variant-numeric:tabular-nums;
}
.bsph-alb.is-active .bsph-alb-cnt{
  background:rgba(255,255,255,.22);
  color:inherit;
}

/* Subbar */
.bsph-subbar{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:12px;
  margin-block-end:14px;
  padding-block-end:10px;
  border-bottom:1px solid var(--ph-line);
}
.bsph-cur-name{
  margin:0;
  font-size:1.15rem;
  font-weight:700;
  line-height:1.25;
  color:var(--ph-text);
  text-wrap:balance;
}
.bsph-cur-cnt{
  font-size:.84rem;
  font-weight:600;
  color:var(--ph-muted);
  white-space:nowrap;
  font-variant-numeric:tabular-nums;
}

/* Responsive Archival Photo Grid */
.bsph-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(196px,1fr));
  gap:14px;
}
.bsph-page.is-compact .bsph-grid{
  grid-template-columns:repeat(auto-fill,minmax(136px,1fr));
  gap:9px;
}
.bsph-card{
  position:relative;
  display:block;
  width:100%;
  aspect-ratio:7 / 8;
  padding:0;
  margin:0;
  border:1px solid var(--ph-line);
  border-radius:14px;
  overflow:clip;
  background:var(--ph-surface2);
  box-shadow:var(--ph-shadow);
  cursor:pointer;
  transition:transform .2s cubic-bezier(.22,1,.36,1),box-shadow .2s ease,border-color .2s ease;
}
.bsph-page.is-compact .bsph-card{
  border-radius:10px;
}
.bsph-card img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center top;
  transition:transform .38s cubic-bezier(.22,1,.36,1);
}
.bsph-card:hover{
  transform:translateY(-3px);
  border-color:color-mix(in srgb,var(--ph-accent) 45%,var(--ph-line));
  box-shadow:var(--ph-shadow-hi);
}
.bsph-card:hover img{
  transform:scale(1.055);
}
.bsph-card:focus-visible{
  outline:2px solid var(--ph-accent);
  outline-offset:3px;
}
.bsph-card-ov{
  position:absolute;
  inset:0;
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  padding:10px;
  background:linear-gradient(180deg,transparent 52%,rgba(12,12,14,.68) 100%);
  opacity:0;
  pointer-events:none;
  transition:opacity .2s ease;
}
.bsph-card:hover .bsph-card-ov,
.bsph-card:focus-visible .bsph-card-ov{
  opacity:1;
}
.bsph-card-num{
  padding:2px 8px;
  border-radius:999px;
  background:rgba(0,0,0,.55);
  color:rgba(255,255,255,.92);
  font-size:.75rem;
  font-weight:700;
  font-variant-numeric:tabular-nums;
  -webkit-backdrop-filter:blur(6px);
  backdrop-filter:blur(6px);
}
.bsph-card-zoom{
  width:30px;
  height:30px;
  border-radius:50%;
  background:rgba(255,255,255,.92);
  color:#1c1b1a;
  display:inline-grid;
  place-items:center;
  box-shadow:0 4px 12px rgba(0,0,0,.28);
}
.bsph-card-zoom svg{width:15px;height:15px}
.bsph-empty{
  grid-column:1 / -1;
  padding:40px 16px;
  text-align:center;
  color:var(--ph-muted);
  font-size:1rem;
}

/* Tablet & Mobile Responsive Layout */
@media (max-width:991.98px){
  .bsph-page{padding:20px 0 52px}
  .bsph-albums{
    flex-wrap:nowrap;
    overflow-x:auto;
    overscroll-behavior-x:contain;
    scroll-snap-type:x proximity;
    scrollbar-width:none;
    padding-block:2px 6px;
    margin-inline:-18px;
    padding-inline:18px;
  }
  .bsph-albums::-webkit-scrollbar{display:none}
  .bsph-alb{
    flex:none;
    scroll-snap-align:start;
  }
  .bsph-grid{
    grid-template-columns:repeat(auto-fill,minmax(160px,1fr));
    gap:12px;
  }
}
@media (max-width:575.98px){
  .bsph-wrap{padding-inline:12px}
  .bsph-albums{margin-inline:-12px;padding-inline:12px}
  .bsph-head{gap:12px;margin-block-end:16px}
  .bsph-seg-btn span{display:none}
  .bsph-theme .bsph-seg-btn span{display:inline}
  .bsph-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:9px;
  }
  .bsph-page.is-compact .bsph-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:6px;
  }
  .bsph-card{border-radius:11px}
}

/* ===== Full-Screen Cinema Native <dialog> Lightbox ===== */
dialog.bsph-lb{
  box-sizing:border-box;
  margin:0;
  padding:0;
  border:0;
  width:100dvw;
  max-width:100dvw;
  height:100dvh;
  max-height:100dvh;
  background:rgba(10,11,14,.96);
  color:#f5f6f8;
  overflow:hidden;
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",Roboto,sans-serif;
}
dialog.bsph-lb[open]{
  display:flex;
  flex-direction:column;
}
dialog.bsph-lb:modal{
  overscroll-behavior:contain;
}
dialog.bsph-lb::backdrop{
  overflow:hidden;
  overscroll-behavior:contain;
  background:rgba(6,7,10,.92);
  -webkit-backdrop-filter:blur(8px);
  backdrop-filter:blur(8px);
}
dialog.bsph-lb,dialog.bsph-lb *{box-sizing:border-box}
dialog.bsph-lb svg{fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none}

.bsph-lb-prog{
  position:absolute;
  top:0;
  left:0;
  right:0;
  height:3px;
  z-index:10;
  background:rgba(255,255,255,.08);
  pointer-events:none;
  opacity:0;
  transition:opacity .2s ease;
}
dialog.bsph-lb.is-slideshow .bsph-lb-prog{opacity:1}
.bsph-lb-prog-fill{
  height:100%;
  width:0%;
  background:#ffedaf;
}

.bsph-lb-top{
  position:relative;
  z-index:6;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:max(10px,env(safe-area-inset-top,0px)) 16px 10px;
  background:linear-gradient(180deg,rgba(10,11,14,.88) 0%,rgba(10,11,14,.42) 100%);
  border-bottom:1px solid rgba(255,255,255,.08);
  flex:none;
}
.bsph-lb-meta{
  display:flex;
  align-items:baseline;
  gap:10px;
  min-inline-size:0;
}
.bsph-lb-title{
  margin:0;
  font-size:1rem;
  font-weight:700;
  line-height:1.25;
  color:#ffffff;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.bsph-lb-cnt{
  padding:2px 9px;
  border-radius:999px;
  background:rgba(255,255,255,.12);
  color:#ffedaf;
  font-size:.8125rem;
  font-weight:700;
  white-space:nowrap;
  font-variant-numeric:tabular-nums;
  flex:none;
}
.bsph-lb-act{
  display:inline-flex;
  align-items:center;
  gap:6px;
  flex:none;
}
.bsph-lb-closeform{margin:0;display:inline-flex}
.bsph-lb-btn{
  width:38px;
  height:38px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.08);
  color:#ffffff!important;
  display:inline-grid;
  place-items:center;
  cursor:pointer;
  text-decoration:none!important;
  padding:0;
  transition:background-color .15s,border-color .15s,color .15s,transform .12s;
}
.bsph-lb-btn svg{width:18px;height:18px}
.bsph-lb-btn:hover{background:rgba(255,255,255,.18);border-color:rgba(255,255,255,.32)}
.bsph-lb-btn:active{transform:scale(.94)}
.bsph-lb-btn:focus-visible{outline:2px solid #ffedaf;outline-offset:2px}
.bsph-lb-close{font-size:24px;line-height:1;font-weight:400}
.bsph-lb-btn .ico-play{fill:currentColor;stroke:none;width:15px;height:15px}
.bsph-lb-btn .ico-pause{fill:currentColor;stroke:none;width:15px;height:15px}

dialog.bsph-lb:not(.is-zoomed) #bsPhotoLbZoom .ico-zout{display:none}
dialog.bsph-lb.is-zoomed #bsPhotoLbZoom .ico-zin{display:none}
dialog.bsph-lb.is-zoomed #bsPhotoLbZoom{background:rgba(255,237,175,.2);border-color:#ffedaf;color:#ffedaf!important}

dialog.bsph-lb:not(.is-slideshow) #bsPhotoLbPlay .ico-pause{display:none}
dialog.bsph-lb.is-slideshow #bsPhotoLbPlay .ico-play{display:none}
dialog.bsph-lb.is-slideshow #bsPhotoLbPlay{background:rgba(255,237,175,.2);border-color:#ffedaf;color:#ffedaf!important}

/* Stage */
.bsph-lb-stage{
  position:relative;
  flex:1 1 auto;
  min-block-size:0;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  touch-action:none;
  user-select:none;
}
.bsph-lb-canvas{
  position:relative;
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:14px 68px;
}
#bsPhotoLbImg{
  display:block;
  max-width:100%;
  max-height:100%;
  width:auto;
  height:auto;
  object-fit:contain;
  border-radius:10px;
  box-shadow:0 18px 56px rgba(0,0,0,.6);
  cursor:zoom-in;
  transition:transform .24s cubic-bezier(.22,1,.36,1),opacity .18s ease;
  will-change:transform;
}
dialog.bsph-lb.is-zoomed #bsPhotoLbImg{
  cursor:grab;
}
dialog.bsph-lb.is-dragging #bsPhotoLbImg{
  transition:none!important;
  cursor:grabbing;
}
dialog.bsph-lb.is-loading #bsPhotoLbImg{
  opacity:.35;
}
.bsph-lb-spin{
  position:absolute;
  width:38px;
  height:38px;
  border-radius:50%;
  border:3px solid rgba(255,255,255,.18);
  border-top-color:#ffedaf;
  animation:bsphSpin .75s linear infinite;
  z-index:3;
  pointer-events:none;
}
@keyframes bsphSpin{to{transform:rotate(360deg)}}

.bsph-lb-nav{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  z-index:5;
  width:48px;
  height:48px;
  border-radius:50%;
  border:1px solid rgba(255,255,255,.18);
  background:rgba(16,17,22,.68);
  color:#ffffff;
  display:inline-grid;
  place-items:center;
  cursor:pointer;
  -webkit-backdrop-filter:blur(10px);
  backdrop-filter:blur(10px);
  transition:background-color .16s,border-color .16s,color .16s,transform .16s;
}
.bsph-lb-nav svg{width:24px;height:24px}
.bsph-lb-prev{left:16px}
.bsph-lb-next{right:16px}
.bsph-lb-nav:hover{
  background:#ffedaf;
  border-color:#ffedaf;
  color:#1c1b1a;
  transform:translateY(-50%) scale(1.06);
}
.bsph-lb-nav:focus-visible{outline:2px solid #ffedaf;outline-offset:2px}

/* Bottom Thumbnail Filmstrip */
.bsph-lb-strip-wrap{
  flex:none;
  position:relative;
  z-index:6;
  padding:8px 14px max(10px,env(safe-area-inset-bottom,0px));
  background:rgba(10,11,14,.86);
  border-top:1px solid rgba(255,255,255,.08);
}
.bsph-lb-strip{
  display:flex;
  align-items:center;
  gap:6px;
  overflow-x:auto;
  overscroll-behavior-x:contain;
  scrollbar-width:none;
  padding:2px 0;
}
.bsph-lb-strip::-webkit-scrollbar{display:none}
.bsph-st-item{
  flex:none;
  width:48px;
  height:54px;
  padding:0;
  border:2px solid transparent;
  border-radius:8px;
  overflow:clip;
  background:#20222a;
  opacity:.52;
  cursor:pointer;
  transition:opacity .15s,border-color .15s,transform .15s;
}
.bsph-st-item:hover{opacity:.85}
.bsph-st-item.is-cur{
  opacity:1;
  border-color:#ffedaf;
  transform:scale(1.05);
}
.bsph-st-item img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center top;
}

.bsph-lb-toast{
  position:absolute;
  bottom:86px;
  left:50%;
  transform:translateX(-50%);
  z-index:12;
  padding:8px 16px;
  border-radius:999px;
  background:#ffedaf;
  color:#1c1b1a;
  font-size:.875rem;
  font-weight:700;
  box-shadow:0 8px 24px rgba(0,0,0,.45);
  pointer-events:none;
}

@media (max-width:767.98px){
  .bsph-lb-top{padding-inline:10px;gap:8px}
  .bsph-lb-title{font-size:.9rem}
  .bsph-lb-btn{width:35px;height:35px;border-radius:9px}
  .bsph-lb-btn svg{width:16px;height:16px}
  .bsph-lb-canvas{padding:10px 8px}
  .bsph-lb-nav{width:38px;height:38px;background:rgba(16,17,22,.46)}
  .bsph-lb-prev{left:6px}
  .bsph-lb-next{right:6px}
  .bsph-st-item{width:42px;height:48px}
}
@media (max-height:500px){
  .bsph-lb-strip-wrap{display:none}
}
@media (prefers-reduced-motion:reduce){
  .bsph-page *,dialog.bsph-lb *{transition:none!important;animation:none!important}
}
