/* note-lightbox.css — notes: the stage for an enlarged photo.
   nest-design.net V5 · theme nest-design-v5

   探究ノートの写真を拡大したときの幕と枠。 */
/* 探究ノートの写真の拡大（ws-lightbox）。もとは最新10本の本文に埋め込んでいたもの（20285 の版） */
.ws-lightbox { position: fixed; inset: 0; z-index: 2147483647; visibility: hidden; isolation: isolate; }
.ws-lightbox.is-open { visibility: visible; }
.ws-lightbox__scrim { position:absolute; inset:0; opacity:0; transition: opacity .5s ease; }
.ws-lightbox.is-visible .ws-lightbox__scrim { opacity: 1; }
.ws-lightbox__img { position: fixed; object-fit:contain; display:block; opacity: 0; transition: top .3s cubic-bezier(.2,.8,.2,1), left .3s cubic-bezier(.2,.8,.2,1), width .3s cubic-bezier(.2,.8,.2,1), height .3s cubic-bezier(.2,.8,.2,1), opacity .3s ease; cursor: zoom-in; }
.ws-lightbox__img.ws-zoomed { cursor: zoom-out; }
.ws-lightbox__caption { position:fixed; left:0; right:0; bottom:24px; text-align:center; min-height: 1.6em; opacity:0; transition: opacity .3s ease; pointer-events:none; }
.ws-lightbox.is-visible .ws-lightbox__caption { opacity:1; }
.ws-lightbox__caption span { font-size:14px; line-height:1.6; color:#222; display:inline-block; max-width:80vw; }
.ws-lightbox__close { position:absolute; top:-19px; right:-29px; width:120px; height:120px; background:none; border:none; cursor:pointer; color:#222; z-index:2; display:flex; align-items:center; justify-content:center; padding:0; }
.ws-lightbox__arrow { position:absolute; top:50%; transform:translateY(-50%); background:none; border:none; border-radius:50%; width:120px; height:120px; display:flex; align-items:center; justify-content:center; font-size:14px; cursor:pointer; color:#eee; z-index:2; }
.ws-lightbox__arrow::before { content:''; position:absolute; width:34px; height:34px; border-radius:50%; background:rgba(0,0,0,.15); z-index:-1; pointer-events:none; }
.ws-lightbox__arrow--prev { left:-32px; }
.ws-lightbox__arrow--next { right:-32px; }
.ws-lightbox__arrow-icon { position:relative; z-index:1; color:#fff; }
@media (prefers-color-scheme: dark) {
  .ws-lightbox__caption span { color:#eee; }
  .ws-lightbox__close, .ws-lightbox__arrow { color:#eee; }
  .ws-lightbox__arrow::before { background: rgba(40,40,40,.15); }
  .ws-lightbox__img.ws-diagram-image { filter: invert(1) contrast(0.805); box-shadow: none; }
}

/* スマホでピンチ／ダブルタップした際に、写真ではなく
   ページ全体がブラウザ標準の拡大（ピンチズーム）で拡大されてしまい、
   戻すのがスムーズでない不具合の対策。ライトボックスを開いている間は
   このtouch-action: noneで、ブラウザ標準のピンチズーム・ダブルタップ
   ズームの対象からこの要素を外す。 */
.ws-lightbox.is-open, .ws-lightbox__img { touch-action: none; }
