:root { color-scheme: dark; }

* { box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #010207;
}

.a-enter-vr,
.a-enter-ar,
.a-orientation-modal {
  display: none !important;
}

.sky-label-overlay {
  position: fixed;
  z-index: 1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.sky-label {
  position: absolute;
  left: 0;
  top: 0;
  display: none;
  font-family: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  line-height: 1;
  white-space: nowrap;
  text-shadow:
    0 0 3px #010207,
    0 0 6px #010207,
    0 0 10px #010207;
  transform: translate(-50%, -50%);
  will-change: left, top, opacity;
}

.constellation-label {
  color: rgba(205, 216, 232, 0.76);
  font-size: clamp(14px, 1.08vw, 18px);
  font-weight: 400;
}

.cardinal-label {
  transform: translate(-50%, 0);
  margin-top: 2pt;
  color: rgba(242, 200, 121, 0.86);
  font-size: clamp(20px, 1.65vw, 27px);
  font-weight: 400;
}

.camera-local-datetime {
  position: fixed;
  z-index: 2;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  color: #e8f1ff;
  font: 500 15px/1.25 ui-monospace, "Cascadia Mono", "Segoe UI Mono", monospace;
  font-variant-numeric: tabular-nums;
  text-align: right;
  text-shadow: 0 1px 4px #010207, 0 0 8px #010207;
  pointer-events: none;
}

.camera-local-datetime span {
  display: block;
}

@media (max-width: 700px) {
  .camera-local-datetime {
    bottom: calc(max(18px, env(safe-area-inset-bottom)) + 64px);
  }
}

.switches {
  position: fixed;
  z-index: 2;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
}

.switches button {
  position: relative;
  width: 48px;
  height: 48px;
  padding: 8px;
  border: 1px solid rgba(205, 221, 255, 0.28);
  border-radius: 50%;
  color: #e8f1ff;
  background: rgba(7, 12, 24, 0.68);
  box-shadow: 0 0 18px rgba(107, 160, 255, 0.22);
  cursor: pointer;
  transition: color 160ms ease, opacity 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
  backdrop-filter: blur(6px);
}

.ground-control {
  position: relative;
  width: 48px;
  height: 48px;
}

.ground-control button {
  touch-action: manipulation;
  user-select: none;
  -webkit-touch-callout: none;
}

.ground-opacity-panel {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 16px);
  width: 164px;
  padding: 10px 12px;
  border: 1px solid rgba(205, 221, 255, 0.24);
  border-radius: 9px;
  background: rgba(7, 12, 24, 0.9);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
  transform: translateX(-50%);
  backdrop-filter: blur(6px);
}

.ground-opacity-panel[hidden] {
  display: none;
}

.ground-opacity-panel input {
  display: block;
  width: 140px;
  height: 18px;
  margin: 0;
  accent-color: #8fcf84;
  cursor: ew-resize;
}

.ground-control.is-adjusting button::after {
  display: none;
}

.switches button::after {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  padding: 6px 9px;
  border: 1px solid rgba(205, 221, 255, 0.2);
  border-radius: 6px;
  color: #dce7fa;
  background: rgba(7, 12, 24, 0.94);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  content: attr(data-tooltip);
  font: 400 13px/1.2 "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity 120ms ease, transform 120ms ease;
  visibility: hidden;
}

.switches button:hover::after,
.switches button:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
  visibility: visible;
}

.switches > button:first-child::after {
  left: 0;
  transform: translate(0, 4px);
}

.switches > button:first-child:hover::after,
.switches > button:first-child:focus-visible::after {
  transform: translate(0, 0);
}

.switches > button:last-child::after {
  right: 0;
  left: auto;
  transform: translate(0, 4px);
}

.switches > button:last-child:hover::after,
.switches > button:last-child:focus-visible::after {
  transform: translate(0, 0);
}

.switches button[aria-pressed="false"] {
  color: #677083;
  opacity: 0.48;
  border-color: rgba(116, 126, 145, 0.2);
  box-shadow: none;
}

.switches button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.switches svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.switches .solid {
  fill: currentColor;
  stroke: none;
}

.switches .grid-primary {
  stroke-width: 2.8;
}

@media (max-width: 700px) {
  .switches {
    gap: 8px;
  }

  .switches button {
    width: 44px;
    height: 44px;
    padding: 7px;
  }


  .ground-control {
    width: 44px;
    height: 44px;
  }
}
