/* 本物の写真（photos-r21, 2026-11-21）— 天体の説明パネルの写真の列と、3Dの中で開く写真ビューアー（r4：地球、r5：月、r6：火星、r7：木星、r8：土星、r9：天王星と海王星、r10：冥王星とカロン、r11：ガリレオ衛星、r12：タイタン・エンケラドゥス・ミランダ・トリトン、r13：ミマス・テティス・ディオネ・レア・イアペトゥス、r14：アリエル・ウンブリエル・ティタニア・オベロン、r15：ケレス、r16：ハレー彗星、r17：遠くの準惑星7つ、r18：カイパーベルト（アロコス）、r19：フォボス・ダイモス、r20：月から見た地球、r21：小惑星帯の大きな天体（ベスタ・パラス・ヒギエア）を追加） */

/* ---- 説明パネルの「本物の写真」の列 ---- */
#panel .uyph-strip { margin: 0 0 14px; }
#panel .uyph-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
#panel .uyph-head b { font-size: 12.5px; font-weight: 700; color: #dce8ff; letter-spacing: .02em; }
#panel .uyph-head button { all: unset; cursor: pointer; font-size: 11px; color: #9fc4ff; padding: 2px 0; }
#panel .uyph-head button:hover { color: #fff; text-decoration: underline; }
#panel .uyph-head button:focus-visible { outline: 2px solid #8fc0ff; outline-offset: 2px; border-radius: 4px; }
#panel .uyph-row { display: flex; gap: 6px; }
#panel .uyph-th { position: relative; flex: 1 1 0; min-width: 0; aspect-ratio: 1; padding: 0; cursor: pointer;
  border-radius: 9px; overflow: hidden; border: 1px solid rgba(160,190,255,.28); background: #05070d;
  transition: transform .15s, border-color .15s; }
#panel .uyph-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
#panel .uyph-th:hover { transform: translateY(-2px); border-color: rgba(190,215,255,.8); }
#panel .uyph-th:focus-visible { outline: 2px solid #8fc0ff; outline-offset: 2px; }
#panel .uyph-live { position: absolute; left: 4px; top: 4px; display: inline-flex; align-items: center; gap: 3px;
  padding: 1px 5px 1px 4px; border-radius: 99px; background: rgba(0,0,0,.62); color: #fff; font-size: 9.5px; font-weight: 700; line-height: 1.5; }
#panel .uyph-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #ff4b4b; box-shadow: 0 0 6px #ff4b4b; }

/* ---- 場面の「解説」の中の写真の列（r18：カイパーベルト） ---- */
#kuiperInfo .uyph-strip { margin: 0 0 14px; }
#kuiperInfo .uyph-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
#kuiperInfo .uyph-head b { font-size: 12.5px; font-weight: 700; color: #dce8ff; letter-spacing: .02em; }
#kuiperInfo .uyph-head button { all: unset; cursor: pointer; font-size: 11px; color: #9fc4ff; padding: 2px 0; }
#kuiperInfo .uyph-head button:hover { color: #fff; text-decoration: underline; }
#kuiperInfo .uyph-head button:focus-visible { outline: 2px solid #8fc0ff; outline-offset: 2px; border-radius: 4px; }
#kuiperInfo .uyph-row { display: flex; gap: 6px; }
#kuiperInfo .uyph-th { position: relative; flex: 1 1 0; min-width: 0; aspect-ratio: 1; padding: 0; cursor: pointer;
  border-radius: 9px; overflow: hidden; border: 1px solid rgba(160,190,255,.28); background: #05070d;
  transition: transform .15s, border-color .15s; }
#kuiperInfo .uyph-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
#kuiperInfo .uyph-th:hover { transform: translateY(-2px); border-color: rgba(190,215,255,.8); }
#kuiperInfo .uyph-th:focus-visible { outline: 2px solid #8fc0ff; outline-offset: 2px; }
#kuiperInfo .uyph-live { position: absolute; left: 4px; top: 4px; display: inline-flex; align-items: center; gap: 3px;
  padding: 1px 5px 1px 4px; border-radius: 99px; background: rgba(0,0,0,.62); color: #fff; font-size: 9.5px; font-weight: 700; line-height: 1.5; }
#kuiperInfo .uyph-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #ff4b4b; box-shadow: 0 0 6px #ff4b4b; }
#kuiperInfo .uyph-strip { margin: 0 0 8px; }

/* ---- 写真ビューアー（3Dの中で開いて、すぐ閉じられる） ---- */
#uyPv { position: fixed; inset: 0; z-index: 60; display: grid; grid-template-rows: auto minmax(0,1fr) auto;
  grid-template-areas: "top" "stage" "side"; background: #000; color: #e6eeff;
  font-family: -apple-system, "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  opacity: 0; transition: opacity .22s; }
#uyPv[hidden] { display: none; }
#uyPv.is-on { opacity: 1; }
#uyPv button { font-family: inherit; }
.uypv-top { grid-area: top; display: flex; align-items: center; gap: 12px; padding: 10px 12px 8px 16px; }
.uypv-title { font-size: 15px; font-weight: 700; letter-spacing: .02em; }
.uypv-count { font-size: 12px; color: rgba(220,230,255,.6); font-variant-numeric: tabular-nums; }
.uypv-close { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px;
  border-radius: 99px; border: 1px solid rgba(160,190,255,.35); background: rgba(255,255,255,.06); color: #fff;
  font-size: 13.5px; font-weight: 700; cursor: pointer; }
.uypv-close:hover { background: rgba(255,255,255,.14); }
.uypv-close span { font-size: 18px; line-height: 1; }
.uypv-close small { font-size: 10.5px; font-weight: 500; color: rgba(220,230,255,.55); }

.uypv-stage { grid-area: stage; position: relative; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.uypv-frame { position: absolute; left: 50%; top: 50%; transform-origin: 50% 50%; will-change: transform;
  transition: transform .28s cubic-bezier(.2,.7,.3,1); cursor: zoom-in; }
.uypv-frame.is-zoomed { cursor: grab; }
.uypv-frame.is-dragging { transition: none; cursor: grabbing; }
.uypv-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block;
  opacity: 0; transition: opacity .45s ease; -webkit-user-drag: none; pointer-events: none; }
.uypv-frame img.is-on { opacity: 1; }
.uypv-frame img.is-fade { -webkit-mask-image: radial-gradient(closest-side, #000 80%, transparent 100%); mask-image: radial-gradient(closest-side, #000 80%, transparent 100%); }
.uypv-frame img.is-fade-edge { -webkit-mask-image: radial-gradient(closest-side, #000 88%, transparent 100%); mask-image: radial-gradient(closest-side, #000 88%, transparent 100%); }
.uypv-mark { position: absolute; transform: translate(-50%, -100%); margin-top: -14px; white-space: nowrap; pointer-events: none;
  font-size: 12px; font-weight: 700; color: #fff; padding: 2px 8px; border-radius: 99px; background: rgba(20,60,140,.78);
  border: 1px solid rgba(160,200,255,.6); transition: opacity .2s; }
.uypv-mark::after { content: ""; position: absolute; left: 50%; bottom: -7px; width: 1px; height: 6px; background: rgba(160,200,255,.8); }
.uypv-frame.is-zoomed .uypv-mark { opacity: 0; }
.uypv-load { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); font-size: 13px; color: rgba(220,230,255,.7);
  pointer-events: none; }
.uypv-load[hidden] { display: none; }
.uypv-nav { position: absolute; top: 50%; width: 48px; height: 48px; margin-top: -24px; border-radius: 50%;
  border: 1px solid rgba(160,190,255,.35); background: rgba(6,10,20,.6); color: #fff; font-size: 24px; line-height: 1;
  display: grid; place-items: center; cursor: pointer; z-index: 2; }
.uypv-nav:hover { background: rgba(40,60,110,.8); }
.uypv-nav[disabled] { opacity: .25; cursor: default; }
.uypv-prev { left: 12px; } .uypv-next { right: 12px; }
.uypv-zoomhint { position: absolute; right: 12px; bottom: 10px; font-size: 11px; color: rgba(220,230,255,.55); pointer-events: none; z-index: 2; }

.uypv-side { grid-area: side; padding: 10px 16px 12px; max-height: 46vh; overflow-y: auto; background: #070a13; border-top: 1px solid rgba(120,160,220,.18); }
.uypv-layers { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.uypv-layers[hidden] { display: none; }
.uypv-chip { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 6px 11px 6px 26px; position: relative;
  border-radius: 10px; border: 1px solid rgba(160,190,255,.28); background: rgba(255,255,255,.04); color: #dce6ff; cursor: pointer; text-align: left; }
.uypv-chip::before { content: ""; position: absolute; left: 10px; top: 50%; width: 9px; height: 9px; margin-top: -5px; border-radius: 50%; background: var(--c, #fff); box-shadow: 0 0 8px var(--c, #fff); }
.uypv-chip b { font-size: 12.5px; font-weight: 700; }
.uypv-chip small { font-size: 10.5px; color: rgba(220,230,255,.6); }
.uypv-chip:hover { border-color: rgba(190,215,255,.7); }
.uypv-chip[aria-pressed="true"] { background: rgba(111,168,255,.24); border-color: #8fc0ff; box-shadow: inset 0 0 0 1px rgba(143,192,255,.5); }
.uypv-tag { display: inline-block; font-size: 11px; font-weight: 700; color: #ffd27a; background: rgba(255,190,80,.12);
  border: 1px solid rgba(255,190,80,.35); padding: 1px 9px; border-radius: 99px; margin-bottom: 6px; }
.uypv-h { font-size: 17px; font-weight: 800; line-height: 1.45; margin: 0 0 4px; text-wrap: balance; word-break: auto-phrase; } /* auto-phrase：日本語を文節で折り返す（対応ブラウザだけ） */
.uypv-text { font-size: 13.5px; line-height: 1.75; color: rgba(230,238,255,.9); margin: 0; }
.uypv-ltext { font-size: 13.5px; line-height: 1.75; color: #fff; margin: 6px 0 0; padding: 7px 10px; border-left: 3px solid var(--c, #8fc0ff); background: rgba(255,255,255,.04); border-radius: 0 8px 8px 0; }
.uypv-ltext[hidden] { display: none; }
.uypv-status { font-size: 11.5px; line-height: 1.6; color: rgba(220,230,255,.72); margin: 8px 0 0; }
.uypv-status[hidden] { display: none; }
.uypv-status .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #ff4b4b; box-shadow: 0 0 6px #ff4b4b; margin-right: 5px; vertical-align: 1px; }
.uypv-status.is-saved .dot { background: #9aa6bd; box-shadow: none; }
.uypv-credit { font-size: 10.5px; line-height: 1.5; color: rgba(200,215,255,.5); margin: 8px 0 0; }
.uypv-film { display: flex; gap: 6px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
.uypv-film::-webkit-scrollbar { display: none; }
.uypv-film button { flex: 1 1 0; min-width: 34px; max-width: 52px; aspect-ratio: 1; height: auto; padding: 0; border-radius: 8px; overflow: hidden; cursor: pointer;
  border: 1px solid rgba(160,190,255,.25); background: #05070d; opacity: .6; transition: opacity .15s, border-color .15s; }
.uypv-film button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.uypv-film button:hover { opacity: .9; }
.uypv-film button[aria-current="true"] { opacity: 1; border-color: #8fc0ff; box-shadow: 0 0 0 1px #8fc0ff; }
#uyPv :focus-visible { outline: 2px solid #8fc0ff; outline-offset: 2px; }

/* 横長の大きい画面（PC・プロジェクター）：写真を左に大きく、説明を右に */
@media (min-width: 900px) and (min-aspect-ratio: 5/4) {
  #uyPv { grid-template-columns: minmax(0,1fr) 340px; grid-template-rows: auto minmax(0,1fr);
    grid-template-areas: "top top" "stage side"; }
  .uypv-side { max-height: none; padding: 16px 18px 16px 18px; display: flex; flex-direction: column; border-top: 0; border-left: 1px solid rgba(120,160,220,.18); }
  .uypv-layers { display: grid; grid-template-columns: 1fr 1fr; }
  .uypv-film { margin-top: auto; padding-top: 12px; }
}
/* 小さい画面 */
@media (max-width: 600px) {
  .uypv-top { padding: 8px 8px 6px 12px; }
  .uypv-title { font-size: 14px; }
  .uypv-close { min-height: 38px; padding: 0 12px; }
  .uypv-close small { display: none; }
  .uypv-nav { width: 40px; height: 40px; margin-top: -20px; font-size: 20px; }
  .uypv-prev { left: 6px; } .uypv-next { right: 6px; }
  .uypv-side { padding: 8px 12px 10px; }
  .uypv-chip { padding: 5px 9px 5px 22px; }
  .uypv-chip::before { left: 8px; }
  .uypv-chip small { display: none; }
  .uypv-h { font-size: 15.5px; }
  .uypv-text, .uypv-ltext { font-size: 13px; }
  .uypv-film button { max-width: 44px; }
  .uypv-zoomhint { display: none; }
}
/* 横向きスマホ（高さが低い）：説明を右に寄せて写真を残す */
@media (max-height: 500px) and (orientation: landscape) {
  #uyPv { grid-template-columns: minmax(0,1fr) min(300px, 42vw); grid-template-rows: auto minmax(0,1fr);
    grid-template-areas: "top top" "stage side"; }
  .uypv-side { max-height: none; border-top: 0; border-left: 1px solid rgba(120,160,220,.18); }
  .uypv-chip small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  #uyPv, .uypv-frame, .uypv-frame img { transition: none; }
}
