/* 全画面（viewer.js）の見た目。自分の作品の画面（style.css にも同じ物がある）と、公開ページ（lib/pages.js）で使う。11/24 公開ページでも全画面で開くために分けた */
.pswp .bar { display: block; height: 10px; background: #0b1020; border-radius: 999px; overflow: hidden; }
.pswp .bar > i { display: block; height: 100%; background: #4d7cff; width: 0; }
.pswp .bar.busy > i { background: repeating-linear-gradient(-45deg, #4d7cff 0 12px, #7ea0ff 12px 24px); background-size: 34px 34px; animation: pswpbusy 1s linear infinite; }
@keyframes pswpbusy { from { background-position: 0 0; } to { background-position: 34px 0; } }
@media (prefers-reduced-motion: reduce) { .pswp .bar.busy > i { animation: none; } }
.pswp .pswp-load { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2; min-width: min(280px, calc(100vw - 32px)); max-width: calc(100vw - 32px); padding: 12px 16px; border-radius: 12px; background: rgba(15,21,38,.88); color: #fff; font-size: 16px; text-align: center; pointer-events: none; opacity: 1 !important; }
.pswp .pswp-load .bar { display: block; margin-top: 8px; }
.pswp { --pswp-bg: #000; }
/* 題名の欄（11/25 前田さん「真っ白文字なので白い画像の時は見えない」）: 字の後ろを暗く塗り、字にも影を付ける＝白い絵の上でも読める */
.pswp-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px 16px calc(12px + env(safe-area-inset-bottom)); text-align: center; color: #fff; font-size: 16px; background: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,.8) 20px); text-shadow: 0 1px 3px #000, 0 0 2px #000; pointer-events: none; overflow-wrap: anywhere; }
.pswp__button--sound { font-size: 22px; width: 50px; color: #fff; }
.pswp-video { background: #000; }
/* 再生の操作（止める・1コマ送り・速さ＝アプリ版 1.6 と同じ並び）。題名の上の真ん中 */
.pswp__playbar { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(52px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 6px; width: min(560px, calc(100% - 16px)); transition: opacity .3s; }
.pswp__playbar .pb-row { display: flex; gap: 6px; justify-content: center; }
/* 再生の位置のバー（11/25 前田さん）: 指で動かして途中へ飛ぶ。右に今の位置と1周の長さ */
.pswp__playbar .pb-seekrow { display: flex; align-items: center; gap: 10px; padding: 2px 14px; min-height: 40px; border-radius: 999px; border: 1px solid rgba(255,255,255,.3); background: rgba(15,21,38,.8); }
.pswp__playbar .pb-seek { flex: 1; min-width: 0; height: 32px; margin: 0; accent-color: #4d7cff; cursor: pointer; }
.pswp__playbar .pb-seek:disabled { opacity: .4; cursor: default; }
.pswp__playbar .pb-time { flex: none; color: #fff; font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pswp__playbar .pb-seek:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.pswp:not(.pswp--ui-visible) .pswp__playbar { opacity: 0; pointer-events: none; }
.pswp__playbar .pb-btn { min-height: 44px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.4); background: rgba(15,21,38,.8); color: #fff; font-size: 15px; font-weight: 700; white-space: nowrap; cursor: pointer; }
/* 白い字が読めるよう、いつもの青より少し濃く（白との差 5.0）＝11/24 verifier の指摘 */
.pswp__playbar .pb-main { min-width: 96px; background: #3366e6; border-color: #3366e6; }
/* 題名は指を受けない（PhotoSwipe の .pswp--ui-visible .pswp__hide-on-close が pointer-events を auto に戻すので、それより強く書く）。題名は切らない */
.pswp.pswp--ui-visible .pswp-caption, .pswp .pswp-caption { pointer-events: none; }
.pswp__playbar .pb-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (max-width: 380px) { .pswp__playbar { gap: 4px; } .pswp__playbar .pb-btn { padding: 0 9px; font-size: 14px; } .pswp__playbar .pb-main { min-width: 84px; } }
/* 公開ページの全画面: 題名の下に説明と「作品のページ」「通報」のリンク（11/24）。題名の欄は指を受けないが、リンクだけは押せる */
/* 説明（11/25 前田さん「ある程度の長さ（画面の半分くらい？）でスクロールできる様に」）: 高さは画面の 4 割まで・その先は中をスクロール。
   長い文は左寄せの方が読みやすいので左寄せ。暗い地の上に置く。スクロールさせるため、説明の所だけ指を受ける（題名の欄のほかの所は、今までどおり絵へ通す） */
.pswp-cap-desc { margin: 6px auto 0; max-width: 720px; max-height: 40vh; max-height: 40dvh; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 8px 12px; border-radius: 8px; background: rgba(15,21,38,.88); text-align: left; font-size: 15px; color: #eef2fa; white-space: pre-wrap; }
.pswp .pswp-caption .pswp-cap-desc { pointer-events: auto; touch-action: pan-y; }
.pswp:not(.pswp--ui-visible) .pswp-caption .pswp-cap-desc { pointer-events: none; }
.pswp-cap-links { margin-top: 6px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.pswp .pswp-caption .pswp-cap-links a { pointer-events: auto; color: #d4e2ff; font-size: 15px; padding: 6px 2px; min-height: 32px; }
.pswp:not(.pswp--ui-visible) .pswp-caption .pswp-cap-links a { pointer-events: none; }
/* 絵を押すと、絵の他の物を全部消す／出す（11/27 前田さん・viewer.js の toggle-controls）。上のボタン・矢印・番号・題名・下の欄は PhotoSwipe の .pswp__hide-on-close で一緒に消える。
   消えている間は、説明とリンクも指を受けない（上の規則） */
.pswp .pswp__counter { white-space: nowrap; }
/* 拡大のゲージと「回転」（11/27 前田さん「右上とかにして、あとゲージもこんなに長くなくて良い」）: 右上の × の下に小さく。絵を押すと一緒に消える（.pswp__hide-on-close） */
.pswp__zoombar { position: absolute; z-index: 10; top: calc(60px + env(safe-area-inset-top)); right: 10px; display: flex; align-items: center; gap: 8px; padding: 2px 4px 2px 12px; min-height: 44px; border-radius: 999px; border: 1px solid rgba(255,255,255,.3); background: rgba(15,21,38,.8); transition: opacity .3s; }
.pswp:not(.pswp--ui-visible) .pswp__zoombar { opacity: 0; pointer-events: none; }
.pswp__zoombar .pb-zi { flex: none; color: #fff; font-size: 15px; }
.pswp__zoombar .pb-zoom { flex: none; width: 120px; height: 32px; margin: 0; accent-color: #4d7cff; cursor: pointer; }
.pswp__zoombar .pb-zoom:disabled { opacity: .4; cursor: default; }
.pswp__zoombar .pb-zoom:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.pswp__zoombar .pb-zl { flex: none; min-width: 2.6em; color: #fff; font-size: 13px; font-variant-numeric: tabular-nums; text-align: right; }
.pswp__zoombar .pb-rot { flex: none; min-height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.4); background: rgba(15,21,38,.8); color: #fff; font-size: 14px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.pswp__zoombar .pb-rot:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (max-width: 380px) { .pswp__zoombar .pb-zoom { width: 90px; } }
/* 絵の上のカーソル（11/27 前田さん「マイナスの虫眼鏡のマークになってるよ」）: 押すと消える／出るだけなので普通の「押せる」手。拡大している時はつかんで動かせるので「つかむ手」
   （PhotoSwipe は押して拡大する作りの時の虫眼鏡を出す＝ここでは使っていない） */
.pswp .pswp__img, .pswp .pswp__zoom-wrap, .pswp .pswp__zoom-wrap * { cursor: pointer !important; }
.pswp.wv-zoomed .pswp__img, .pswp.wv-zoomed .pswp__zoom-wrap, .pswp.wv-zoomed .pswp__zoom-wrap * { cursor: grab !important; }
.pswp.wv-zoomed .pswp__zoom-wrap:active, .pswp.wv-zoomed .pswp__zoom-wrap:active * { cursor: grabbing !important; }
/* 消えていた物が出た直後 0.4 秒は、出た部品に指を通さない（viewer.js paintInert・11/27 verifier の指摘＝タップで出すと、隠れていたボタン・ゲージまで動いた） */
.pswp.pswp--just-shown .pswp__top-bar, .pswp.pswp--just-shown .pswp__top-bar *, .pswp.pswp--just-shown .pswp__button--arrow,
.pswp.pswp--just-shown .pswp__playbar, .pswp.pswp--just-shown .pswp__playbar *, .pswp.pswp--just-shown .pswp__zoombar, .pswp.pswp--just-shown .pswp__zoombar *, .pswp.pswp--just-shown .pswp-caption * { pointer-events: none !important; }
