*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0f172a;
  color: #e2e8f0;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
}

#app {
  width: 100%;
  max-width: 480px;
  padding: 1.5rem 1rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

header {
  text-align: center;
}

h1 {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #f8fafc;
}

#weather-display {
  margin-top: 0.4rem;
  font-size: 0.95rem;
  color: #94a3b8;
}

#controls {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.heading-btn {
  width: 100%;
  height: 80px;
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}

.heading-btn:active {
  transform: scale(0.97);
}

.heading-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.heading-btn.north {
  background: #3b82f6;
  color: #fff;
}

.heading-btn.south {
  background: #f97316;
  color: #fff;
}

#status {
  min-height: 1.4em;
  font-size: 0.9rem;
  text-align: center;
  color: #94a3b8;
}

#status.error {
  color: #f87171;
}

#viz {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

#compass {
  width: 100%;
  max-width: 340px;
  aspect-ratio: 1;
  display: block;
}

#legend {
  font-size: 0.85rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-dot.north { background: #3b82f6; }
.legend-dot.south { background: #f97316; }
