.leaflet-top.leaflet-right .nk-stations-control {
  margin-top: 6px;
}

/* Keep the runway marker above the map controls on narrow, short screens. */
@media (max-width: 380px) and (max-height: 720px) {
  #map {
    min-height: 490px;
  }
}

.nk-stations-toggle,
.nk-stations-all {
  min-height: 44px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--foam);
  color: var(--ink);
  font: 700 13px/1.25 var(--font);
  cursor: pointer;
}

.nk-stations-toggle {
  box-shadow: 0 1px 5px rgba(0, 0, 0, .3);
}

.nk-stations-control {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.nk-map-online {
  box-sizing: border-box;
  max-width: min(154px, 44vw);
  max-height: 132px;
  margin: 5px 0 0;
  padding: 0 2px;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  background: transparent;
  list-style: none;
  text-align: right;
  font: 400 calc(var(--nk-map-knot-font-size, 11px) - 1px)/1.3 var(--font);
}

.nk-map-online[hidden] {
  display: none;
}

.nk-map-online-name {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-height: 32px;
  padding: 6px 4px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--mist, var(--foam));
  text-align: right;
  text-shadow: 0 1px 2px var(--ink), 0 0 4px var(--ink);
  font: inherit;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.nk-map-online-name:hover,
.nk-map-online-name:focus-visible {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.nk-stations-all {
  align-self: start;
  margin-bottom: 7px;
  color: var(--sea);
}

.nk-station-marker-art {
  position: relative;
  display: grid;
  align-items: end;
  justify-items: center;
  width: 100%;
  height: 100%;
}

.nk-station-marker-badge {
  position: absolute;
  right: calc(100% + 3px);
  bottom: 50%;
  display: grid;
  justify-items: center;
  box-sizing: border-box;
  min-width: 34px;
  padding: 2px 3px;
  transform: translateY(50%);
  border: 1px solid #0a5268;
  border-radius: 6px;
  background: var(--foam);
  color: var(--ink);
  font: 700 11px/1.05 var(--font);
  white-space: nowrap;
}

.nk-station-marker.is-ondokuzmayis .nk-station-marker-badge {
  inset: auto auto 50% calc(100% + 3px);
  transform: translateY(50%);
}

.nk-lighthouse-wind-badge {
  inset: auto auto calc(100% - 6px) 50%;
  transform: translateX(-50%);
}

.nk-station-marker.is-bafra .nk-lighthouse-wind-badge {
  left: -4px;
  transform: none;
}

.nk-station-wind-value {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nk-station-wind-arrow {
  display: inline-block;
  font-size: 12px;
  line-height: .75;
}

.nk-station-lighthouse,
.nk-station-air-tower {
  position: relative;
  display: grid;
  justify-items: center;
  transform: scale(.8);
  transform-origin: center bottom;
  filter: drop-shadow(0 1px 2px rgba(10, 29, 34, .8));
}

.nk-station-lighthouse {
  width: 30px;
  height: 34px;
}

.nk-station-air-tower {
  width: 22px;
  height: 24px;
}

.nk-station-marker.is-airport .nk-station-air-tower {
  transform-origin: center;
}

.nk-station-tower-head,
.nk-station-tower-base {
  position: absolute;
}

.nk-station-lighthouse .nk-station-tower-head {
  top: 7px;
  z-index: 1;
  width: 12px;
  height: 7px;
  border: 1px solid #783330;
  background: #ffe8a4;
}

.nk-station-lighthouse .nk-station-tower-head::before {
  position: absolute;
  left: -3px;
  bottom: 100%;
  width: 0;
  height: 0;
  border-right: 8px solid transparent;
  border-bottom: 6px solid #c03734;
  border-left: 8px solid transparent;
  content: '';
}

.nk-station-lighthouse .nk-station-tower-base {
  bottom: 0;
  width: 17px;
  height: 22px;
  clip-path: polygon(24% 0, 76% 0, 100% 100%, 0 100%);
  background: linear-gradient(#fcfaf3 0 35%, #bf3e3b 35% 66%, #fcfaf3 66% 89%, #93413d 89%);
}

.nk-station-air-tower .nk-station-tower-head {
  top: 3px;
  z-index: 1;
  width: 20px;
  height: 8px;
  clip-path: polygon(0 0, 100% 0, 83% 100%, 17% 100%);
  border-top: 2px solid #f3f9f9;
  border-bottom: 2px solid #9caeb6;
  background: repeating-linear-gradient(90deg, #255a82 0 5px, #a6d0e4 5px 6px);
}

.nk-station-air-tower .nk-station-tower-base {
  bottom: 0;
  width: 12px;
  height: 13px;
  clip-path: polygon(21% 0, 79% 0, 100% 100%, 0 100%);
  border-bottom: 2px solid #849fa9;
  background: linear-gradient(90deg, #e3eced 20%, #fcfdfd 20% 62%, #bacdd2 62%);
}

.nk-station-sea-label {
  display: grid;
  justify-items: center;
  align-content: center;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(167, 236, 244, .8);
  border-radius: 8px;
  background: #123d4d;
  color: #f0fcff;
  font: 600 10px/1.15 var(--font);
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(10, 29, 34, .45);
}

.nk-station-sea-name {
  color: #bceef5;
}

.nk-station-sea-value {
  font-size: 12px;
  font-weight: 750;
}

.nk-stations-backdrop {
  position: fixed;
  z-index: 2500;
  inset: 0;
  display: grid;
  place-items: center;
  padding: max(12px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
  background: rgba(10, 27, 32, .6);
}

.nk-stations-backdrop[hidden], .nk-stations-dialog [hidden], .nk-station-marker-badge[hidden] {
  display: none;
}

.nk-stations-dialog {
  box-sizing: border-box;
  width: min(100%, 540px);
  max-height: 100%;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 10px 12px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--mist);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
}

.nk-stations-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 3px;
}

.nk-stations-header h2,
.nk-station-card h3,
.nk-station-report h4 {
  margin: 0;
  font: 800 14px/1.3 var(--font);
  text-transform: none;
}

.nk-stations-header h2 {
  font-size: 18px;
}

.nk-stations-close {
  flex: 0 0 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--ink-2);
  font: 400 23px/1 var(--font);
  cursor: pointer;
}

.nk-stations-cards {
  display: grid;
  gap: 7px;
}

.nk-station-card {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--foam);
  overflow-wrap: anywhere;
}

.nk-station-report {
  margin-top: 7px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}

.nk-station-card p {
  margin: 3px 0 0;
}

.nk-stations-status,
.nk-station-source {
  color: var(--ink-2);
  font-size: 12px;
}

.nk-station-wind {
  font-weight: 700;
}

.nk-station-warning {
  color: #82501b;
  font-weight: 700;
}

.nk-station-card pre {
  margin: 4px 0 0;
  padding: 6px;
  border-radius: 5px;
  background: var(--mist);
  font: 12px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.nk-stations-control :focus-visible,
.nk-station-marker:focus-visible,
.nk-stations-dialog :focus-visible {
  outline: 2px solid var(--sea);
  outline-offset: 2px;
}

.spot-map-comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
  gap: 5px;
  margin: 5px 0;
}

.spot-map-comparison-column {
  min-width: 0;
  padding: 5px 6px;
  background: var(--foam);
  border-radius: 6px;
  overflow-wrap: anywhere;
}

.spot-map-comparison-column.is-observation {
  background: var(--mist);
}

#map .spot-map-popup .pop .spot-map-comparison-column h4 {
  margin: 0;
  font-size: 12px;
}

#map .spot-map-popup .pop .spot-map-comparison-column p {
  margin: 2px 0;
}

#map .spot-map-popup .pop .spot-map-comparison-column .spot-map-meta {
  font-size: 11px;
  line-height: 1.35;
}

#map .spot-map-popup .pop .spot-map-comparison-column .spot-map-wind {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px 4px;
  line-height: 1.25;
}

.spot-map-comparison-column .spot-map-wind span {
  flex-basis: 100%;
  font-size: 11px;
}
