:root {
  --bg: #02030a;
  --hud-bg: rgba(0, 0, 0, 0.64);
  --hud-border: rgba(255, 255, 255, 0.13);
  --accent: #ffd54f;
  --accent-soft: rgba(255, 213, 79, 0.25);
  --text-main: #f5f5f5;
  --text-muted: #9ea6c1;
  --radius-lg: 16px;
  --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.7);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: radial-gradient(circle at top, #141a33, #02030a 55%, #000 100%);
  color: var(--text-main);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#splash {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top, #1b2444, #000);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

#splash img {
  max-width: min(60vw, 480px);
  max-height: min(60vh, 480px);
  object-fit: contain;
}

#app.hidden {
  display: none;
}

#app {
  position: fixed;
  inset: 0;
  display: block;
}

#skyCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: transparent;
}

.hud {
  position: absolute;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.9rem;
  pointer-events: none;
}

.hud-top {
      position: relative;
  top: 0;
}

.hud-bottom {
  bottom: 0;
}

.hud-bottom-left {
  bottom: 3.6rem;
  left: 0.8rem;
  right: auto;
}

.hud-left,
.hud-center,
.hud-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  pointer-events: auto;
}

.hud-time {
  display: flex;
  gap: 0.5rem;
  pointer-events: auto;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  pointer-events: auto;
}

.brand-title {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.chip {
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.6);
  font-size: 0.78rem;
  backdrop-filter: blur(8px);
  white-space: nowrap;
}

.panel {
  width: 220px;
  flex-direction: column;
  align-items: stretch;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-lg);
  background: var(--hud-bg);
  border: 1px solid var(--hud-border);
  box-shadow: var(--shadow-soft);
  gap: 0.4rem;
  pointer-events: auto;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.8rem;
}

.field label {
  color: var(--text-muted);
}

.field input[type="number"] {
  padding: 0.25rem 0.35rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(3, 8, 24, 0.9);
  color: var(--text-main);
  font-size: 0.8rem;
}

.field input[type="number"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-soft);
}

.field.readonly div {
  padding: 0.25rem 0.35rem;
  min-height: 1.6rem;
  border-radius: 8px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  background: rgba(3, 8, 24, 0.8);
  display: flex;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-main);
}

.btn {
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 0;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  background: radial-gradient(circle at top, var(--accent), #ffb300);
  color: #000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  pointer-events: auto;
}

.btn-secondary {
  background: radial-gradient(circle at top, #80d8ff, #0081cb);
  color: #001224;
}

.btn:hover {
  filter: brightness(1.05);
}

.btn:active {
  transform: translateY(1px);
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  pointer-events: auto;
  padding: 0.2rem 0.4rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.checkbox input {
  accent-color: var(--accent);
}

.hint {
  position: absolute;
  left: 50%;
  bottom: 0.5rem;
  transform: translateX(-50%);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--hud-bg);
  border: 1px solid var(--hud-border);
  backdrop-filter: blur(12px);
  pointer-events: none;
}

@media (max-width: 700px) {
  .hud-bottom-left.panel {
    width: 190px;
  }
  .brand-title {
    font-size: 0.95rem;
  }
  .brand-subtitle {
    display: none;
  }
  .hud-bottom {
    font-size: 0.75rem;
  }
  .hint {
    max-width: 95vw;
    text-align: center;
  }
}

.hud-compass {
  position: absolute;
  left: 50%;
  top: 0.45rem;
  transform: translateX(-50%);
  pointer-events: none;
}

.compass {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  padding: 0.2rem 0.5rem 0.25rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  min-width: 110px;
}


.compass-scale-wrapper {
  position: relative;
  width: 200px;
  height: 20px;
  overflow: hidden;
}

.compass-scale {
  position: absolute;
  inset: 0;
}

.compass-scale::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.4);
}

.compass-tick {
  position: absolute;
  width: 1px;
  background: rgba(255, 255, 255, 0.85);
}

.compass-tick.major {
  height: 9px;
  top: 50%;
  transform: translateX(-50%) translateY(-50%);
}

.compass-tick.minor {
  height: 5px;
  top: 50%;
  transform: translateX(-50%) translateY(-50%);
}

.compass-label {
  position: absolute;
  top: 50%;
  transform: translateX(-50%) translateY(-150%);
  font-size: 0.7rem;
  color: var(--text-main);
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
}
.compass-arrow {
  position: relative;
  width: 24px;
  height: 10px;
}

.compass-arrow-head {
      transform-origin: 50% 100%;
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 9px solid var(--accent);
}

.compass-degree {
  font-size: 0.7rem;
  color: var(--text-main);
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
}