* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; color: #0d1a2b; background: #0d1a2b; }
body { display: flex; flex-direction: column; }

header {
  padding: 10px 16px;
  background: #0d1a2b;
  color: #f0f6ff;
  border-bottom: 1px solid #1a2d47;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
}
header h1 { font-size: 1.15rem; margin: 0; font-weight: 600; letter-spacing: 0.02em; }
.controls { display: flex; gap: 12px; align-items: center; margin-left: auto; flex-wrap: wrap; }
.controls label { font-size: 0.85rem; color: #8aa8d4; display: flex; gap: 6px; align-items: center; }
.controls select {
  background: #14253e; color: #f0f6ff; border: 1px solid #2a4166;
  padding: 3px 6px; border-radius: 4px; font-size: 0.85rem;
}
.status { font-size: 0.8rem; color: #6f8bb0; font-variant-numeric: tabular-nums; }

main { flex: 1; position: relative; display: flex; min-height: 0; }
#map { flex: 1; background: #0d1a2b; }

/* Marker */
.wind-marker {
  width: 56px; height: 56px;
  pointer-events: auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: inherit;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.4));
}
.wind-marker .arrow {
  width: 0; height: 0;
  border-left: 9px solid transparent; border-right: 9px solid transparent;
  border-bottom: 20px solid var(--arrow, #60a5fa);
  transform-origin: 50% 70%;
}
.wind-marker .label {
  margin-top: 2px;
  font-size: 11px; font-weight: 700;
  background: rgba(13, 26, 43, 0.85); color: #fff;
  padding: 1px 4px; border-radius: 3px; min-width: 22px; text-align: center;
}
.wind-marker .label small { font-weight: 400; opacity: 0.75; font-size: 9px; }
.wind-marker.stale .arrow { border-bottom-color: #6f8bb0; opacity: 0.55; }
.wind-marker.stale .label { opacity: 0.7; }

/* Panel */
.panel {
  width: 420px; max-width: 50vw;
  background: #101f36; color: #f0f6ff;
  border-left: 1px solid #1a2d47;
  padding: 16px; overflow-y: auto;
  position: relative;
}
.panel.hidden { display: none; }
.panel h2 { margin: 0 0 4px; font-size: 1.1rem; }
.panel .meta { font-size: 0.85rem; color: #8aa8d4; margin-bottom: 12px; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; }
.panel .meta b { color: #c9dbf3; font-weight: 500; }
.panel .chart-wrap { position: relative; height: 320px; }
#panel-close {
  position: absolute; top: 8px; right: 8px;
  background: transparent; border: 0; color: #8aa8d4; font-size: 1.4rem; cursor: pointer; line-height: 1;
}
#panel-close:hover { color: #fff; }

/* Mobile */
@media (max-width: 720px) {
  main { flex-direction: column; }
  .panel { width: 100%; max-width: 100%; max-height: 50%; border-left: 0; border-top: 1px solid #1a2d47; }
}
