/* ============================================================
   纯星空观赏页 /sky.html
   三种夜空（星座 / 流星 / 行星星系）共用三套引擎，本文件只负责
   页面级调色板、全屏面板布局与角落切换器。
   ============================================================ */

html[data-page="sky"] {
  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", Consolas, "Courier New", monospace;
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;

  --nx-ink: #10294b;
  --nx-ink-2: #1d3d64;
  --nx-rose-fill: #f09b9c;
  --nx-rose-text: #f09b9c;
  --nx-peach: #f8d5d5;
  --nx-pale: #dfe8f3;
  --nx-dim: #889cc5;
  --nx-line: rgba(223, 232, 243, 0.14);
  --nx-line-strong: rgba(223, 232, 243, 0.26);
}

html[data-page="sky"][data-theme="light"] {
  --nx-ink: #dfe8f3;
  --nx-ink-2: #c9d7ea;
  --nx-rose-fill: #c0575a;
  --nx-rose-text: #c0575a;
  --nx-peach: #a34548;
  --nx-pale: #46608f;
  --nx-dim: #7c93bd;
  --nx-line: rgba(23, 56, 95, 0.13);
  --nx-line-strong: rgba(23, 56, 95, 0.26);
}

html[data-page="sky"] body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: var(--nx-ink);
}

/* 三个全屏面板：同一时刻只显示一个，其余 display:none（引擎 IO 自动停止） */
.sky-pane {
  position: fixed;
  inset: 0;
  margin: 0;
  padding: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--nx-ink);
}
.sky-pane canvas {
  position: absolute;
  inset: 0;
}
/* 星座观赏模式没有左侧标题，不需要继承首页 Hero 的文字可读性渐变。 */
html[data-page="sky"] .sky-pane[data-mode="constellation"]::before {
  content: none;
  display: none;
  background: none;
}
/* tests 引擎自建画布插入 hero 首位；杀除渐变遮罩与默认光标装饰 */
.sky-pane.tests-home-hero::before {
  display: none;
}
.sky-pane.tests-home-hero {
  cursor: auto;
}

/* 左下角切换器：扁平无边框图标按钮，激活模式用玫瑰色 */
.sky-switcher {
  position: fixed;
  left: 20px;
  bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 12px;
}
.sky-switcher button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  color: var(--nx-dim);
  font-size: 1rem;
  cursor: pointer;
  transition: color 0.25s ease;
}
.sky-switcher button:hover {
  color: var(--nx-pale);
}
.sky-switcher button[aria-pressed="true"] {
  color: var(--nx-rose-fill);
}
.sky-switcher button:focus-visible {
  outline: 2px solid var(--nx-rose-text);
  outline-offset: 2px;
}
.sky-switcher .sky-divider {
  width: 1px;
  height: 24px;
  background: var(--nx-line-strong);
}

/* sky 页无侧栏无滚动：隐藏 tests-home.js 注入的站内移动端底部工具栏 */
html[data-page="sky"] .tests-mobile-toolbar {
  display: none;
}

/* 移动端：恢复 xyz.css（≤768px）隐藏的读数栏，缩小并贴安全区 */
@media (max-width: 768px) {
  html[data-page="sky"] .nx-readout {
    display: block;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 0.62rem;
    line-height: 1.7;
  }
}
