/* Common UI */
:root {
  --ui-text: #bdefff;
  --ui-border: rgba(120, 220, 255, 0.35);
  --ui-bg: rgba(6, 24, 32, 0.5);
  --header-offset: 70px;
}
body { position: relative; }
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
  transform: translate3d(0, 0, 0);
  transition: opacity 0.34s ease, transform 0.34s ease, visibility 0s linear 0s;
  will-change: opacity, transform;
}
html.cosmos-anchor-entry .site-header,
.site-header.is-hidden-by-scroll {
  opacity: 0;
  visibility: hidden;
  transform: translate3d(0, -9px, 0);
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s ease, visibility 0s linear 0.28s;
}
.site-header-spacer {
  height: 70px;
}

/* Offset common top UI blocks so they do not sit under header */
#pageTitle {
  top: calc(12px + var(--header-offset));
}
#title {
  top: calc(12px + var(--header-offset));
}
#dataHud {
  top: calc(118px + var(--header-offset));
}
#detailWrap {
  top: calc(44px + var(--header-offset));
}
#infoStack {
  top: calc(40px + var(--header-offset));
}
#earthViewWrap {
  top: calc(62% + 100px + var(--header-offset));
}
.site-home {
  display: inline-block;
  padding: 2px 6px;
  text-decoration: none;
  border: none;
  background: transparent;
  box-shadow: none;
}
.site-home:hover {
  background: transparent;
}
.site-home-logo {
  display: block;
  height: 28px;
  width: auto;
}
@media (prefers-reduced-motion: reduce) {
  .site-header,
  html.cosmos-anchor-entry .site-header,
  .site-header.is-hidden-by-scroll {
    transition-duration: 0.01ms;
  }
}
.site-header-spacer {
  height: 70px;
}
.site-header-spacer {
  height: 70px;
  width: 100%;
  pointer-events: none;
}
.site-footer {
  position: fixed;
  right: 0;
  left: 0;
  bottom: 6px;
  z-index: 10000;
  text-align: center;
  padding: 2px 6px;
  font-size: 8px;
  letter-spacing: 0.6px;
  color: rgba(189, 239, 255, 0.7);
  pointer-events: none;
}
.footer-center {
  right: 0;
  left: 0;
  bottom: 6px;
  text-align: center;
}

/* ── YouTube ライブへのボタン（共通フッター）──────────────
   置き場所は includes/footer.php。行き先は conf/live_url.php。
   このサイトのページは画面いっぱいで、下端の近くに
   各ページ自身のボタン（「月のデータを見る」など）がある。
   その上に重ねないよう、下端から少し上げてある。
   高さを変えたいときは --ll-live-bottom だけ直す。 */
:root { --ll-live-bottom: 72px; }
.ll-live-btn {
  position: fixed;
  left: 50%;
  bottom: var(--ll-live-bottom);
  transform: translateX(-50%);
  z-index: 10001;              /* .site-footer(10000) より上 */
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 999px;
  border: 1px solid rgba(255, 214, 150, 0.55);
  background: linear-gradient(180deg, #ff9a2e 0%, #f4750d 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  white-space: nowrap;
  /* 暗い背景から浮かせる。影は控えめにして、下の絵を潰さない */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45), 0 0 18px rgba(255, 140, 30, 0.28);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.ll-live-btn:hover, .ll-live-btn:focus-visible {
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), 0 0 24px rgba(255, 150, 40, 0.42);
}
/* 配信中を示す赤い点。ゆっくり明滅させる（速いと気が散る） */
.ll-live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.9);
  animation: ll-live-blink 1.8s ease-in-out infinite;
}
@keyframes ll-live-blink { 0%, 100% { opacity: 1 } 50% { opacity: 0.35 } }
@media (prefers-reduced-motion: reduce) {
  .ll-live-dot { animation: none }
  .ll-live-btn { transition: none }
}
/* 画面が狭いときは少し詰める */
@media (max-width: 380px) {
  .ll-live-btn { font-size: 12px; padding: 10px 16px }
}
