:root {
  color-scheme: dark;
  --bg: #020305;
  --ink: #e9edf2;
  --muted: #85909f;
  --accent: #a4dcd3;
  --line: rgba(172, 191, 211, 0.13);
  font-family: "Noto Sans CJK SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden; /* GATE */
  background: var(--bg);
}
button,
input,
a {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}
button {
  color: inherit;
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 5px;
}
button:disabled,
input:disabled {
  opacity: 0.35;
  cursor: default;
}
.observatory {
  position: fixed;
  inset: 0;
  isolation: isolate;
}
#universe {
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  touch-action: none;
  cursor: grab;
  outline: none;
}
#universe:active {
  cursor: grabbing;
}
.fallback {
  position: absolute;
  inset: 0;
  background: #020305 url("/home-assets/fallback-desktop.jpg") center / cover
    no-repeat;
}
@media (max-aspect-ratio: 1/1) {
  .fallback {
    background-image: url("/home-assets/fallback-mobile.jpg");
  }
}
.ready .fallback {
  display: none; /* GATE */
}
.settings-toggle {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #0d121b70;
  backdrop-filter: blur(16px);
  opacity: 0;
  pointer-events: none; /* GATE */
  transition:
    opacity 0.45s,
    border-color 0.2s,
    background 0.2s;
}
.interacted .settings-toggle,
.settings-toggle:focus-visible {
  opacity: 0.65;
  pointer-events: auto;
}
.settings-toggle:hover,
.settings-toggle:focus-visible {
  opacity: 1;
  border-color: #a4dcd350;
  background: #151e2ed9;
}
svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.settings-toggle circle {
  fill: #101722;
}
dialog {
  position: fixed;
  inset: auto 24px 82px auto;
  width: 326px;
  max-width: calc(100vw - 32px); /* GATE */
  max-height: calc(100dvh - 110px); /* GATE */
  margin: 0;
  padding: 24px;
  background: linear-gradient(145deg, #121a27f2, #0b101bf7);
  border: 1px solid #a3b5cc21;
  border-radius: 16px;
  color: var(--ink);
  box-shadow: 0 18px 80px #0008;
  backdrop-filter: blur(28px);
  overflow-y: auto;
  font-size: 12px;
  letter-spacing: 0.02em;
}
dialog::backdrop {
  background: #0003;
}
dialog[open] {
  animation: panel-in 0.22s ease-out;
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}
h1 {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.09em;
  margin: 0;
}
.icon-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: none;
  border: 0;
  color: var(--muted);
  padding: 4px;
}
.icon-button:hover {
  color: var(--ink);
}
.control {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  margin-bottom: 25px;
}
.control label {
  color: #b8c2d1;
  font-size: 11px;
}
.control output {
  color: #899bad;
  font-family: ui-monospace, monospace;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.control input {
  grid-column: 1/-1;
  width: 100%;
  margin: 0;
  height: 28px;
  appearance: none;
  background: none;
  cursor: pointer;
}
.control input::-webkit-slider-runnable-track {
  height: 2px;
  background: #56667870;
  border-radius: 2px;
}
.control input::-webkit-slider-thumb {
  appearance: none;
  width: 8px;
  height: 8px;
  margin-top: -3px;
  border-radius: 50%;
  background: #c4dedb;
  box-shadow: 0 0 0 4px #a4dcd30a;
}
.control input::-moz-range-track {
  height: 2px;
  background: #56667870;
}
.control input::-moz-range-thumb {
  width: 8px;
  height: 8px;
  border: 0;
  border-radius: 50%;
  background: #c4dedb;
}
.action-row {
  display: flex;
  gap: 10px;
  margin-top: 28px;
  margin-bottom: 22px;
}
.action-row button {
  flex: 1;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #a4b4ce06;
  font-size: 10px;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.action-row button:hover {
  background: #a4b4ce10;
  border-color: #a4b4ce40;
}
.pause-symbol {
  font-size: 11px;
  color: #a6bebf;
}
.sound-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 0;
  border-top: 1px solid var(--line);
  width: 100%;
  background: none;
  padding: 19px 0;
  color: #b8c2d1;
  font-size: 11px;
}
.switch {
  width: 27px;
  height: 15px;
  background: #62738a35;
  border: 1px solid #a3b5cc20;
  border-radius: 20px;
  padding: 3px;
  transition: background 0.2s;
}
.switch i {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7e8e9e;
  transition:
    transform 0.2s,
    background 0.2s;
}
#sound[aria-pressed="true"] .switch {
  background: #74b5aa30;
}
#sound[aria-pressed="true"] i {
  transform: translateX(11px);
  background: #b1e0d7;
}
details {
  border-top: 1px solid var(--line);
}
summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 19px 0;
  color: #9aabba;
  font-size: 11px;
}
summary::-webkit-details-marker {
  display: none; /* GATE */
}
summary svg {
  width: 14px;
  height: 14px;
}
details[open] summary svg {
  transform: rotate(180deg);
}
.work-info {
  padding: 2px 0 20px;
}
.work-index {
  font-family: ui-monospace, monospace;
  font-size: 8px;
  letter-spacing: 0.13em;
  color: #70879a;
}
.work-info h2 {
  font-size: 16px;
  letter-spacing: 0.16em;
  font-weight: 400;
  margin: 15px 0 12px;
}
.work-info p {
  font-size: 10px;
  line-height: 1.9;
  color: #9aa9b8;
  margin: 0 0 14px;
}
.work-info p.instructions {
  font-size: 9px;
  color: #748798;
  margin: 0;
}
.panel-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 19px;
  border-top: 1px solid var(--line);
  font-size: 9px;
  color: #6e8498;
}
.panel-footer a {
  display: flex;
  align-items: center;
  gap: 10px;
}
.panel-footer a:hover {
  color: var(--accent);
}
.panel-footer svg {
  width: 12px;
  height: 12px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden; /* GATE */
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (max-width: 600px) {
  /* GATE */
  .settings-toggle {
    right: 18px;
    bottom: 20px;
    width: 44px;
    height: 44px;
    padding: 10px;
  }
  dialog {
    right: 16px;
    bottom: 72px;
    padding: 22px;
    width: 310px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important; /* GATE */
    transition: none !important; /* GATE */
  }
}

.view-options {
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
}
.view-options legend {
  color: #b8c2d1;
  font-size: 11px;
  margin-bottom: 12px;
}
.view-options button,
.cruise-row {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #a4b4ce06;
  font-size: 11px;
}
.view-options button {
  flex: 1;
}
.view-options button:hover,
.cruise-row:hover {
  border-color: #a4b4ce40;
}
.cruise-row {
  width: 100%;
  margin-top: 10px;
}
.cruise-row[aria-pressed="true"] {
  background: #a4dcd318;
  color: #c2dfd3;
}
.source-links a {
  color: #c2d4ce;
  text-decoration: underline;
  text-underline-offset: 3px;
}
#scene-status:not(.sr-only) {
  color: #b3c5bd;
  font-size: 11px;
  line-height: 1.8;
}
.static-entry {
  position: fixed;
  right: 20px;
  bottom: 20px;
}
.static-entry a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #101722;
}

body:not(.ready) #universe,
.settings-toggle[hidden] {
  display: none; /* GATE: static navigation remains available without JavaScript. */
}
