:root {
  --panel: rgba(8, 25, 43, .86);
  --panel-strong: rgba(6, 18, 31, .94);
  --line: rgba(174, 219, 255, .24);
  --line-soft: rgba(174, 219, 255, .14);
  --text: #f4fbff;
  --muted: #a9c2d4;
  --accent: #36bffa;
  --accent-2: #8be7ff;
  --shadow: 0 22px 70px rgba(0, 16, 38, .32)
}

* {
  box-sizing: border-box
}

html,
body {
  height: 100%;
  margin: 0
}

body {
  overflow: hidden;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: #071526
}

a {
  color: inherit
}

button {
  font: inherit
}

#map {
  position: fixed;
  inset: 0;
  z-index: 1;
  width: 100vw;
  height: 100vh;
  background: #b9d7e6
}

.top-card {
  position: fixed;
  left: max(14px, env(safe-area-inset-left));
  top: max(14px, env(safe-area-inset-top));
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(440px, calc(100vw - 96px));
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .055)), var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px)
}

.mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 12px;
  color: var(--accent-2);
  background: rgba(54, 191, 250, .16);
  border: 1px solid rgba(139, 231, 255, .22)
}

.top-card strong {
  display: block;
  font-size: .98rem;
  line-height: 1.1;
  letter-spacing: -.025em
}

.top-card span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.25
}

.zoom-controls {
  position: fixed;
  right: max(14px, env(safe-area-inset-right));
  top: max(14px, env(safe-area-inset-top));
  z-index: 22;
  display: grid;
  gap: 8px
}

.zoom-btn,
.locate-btn,
.copy-link-btn,
.snap-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: var(--panel);
  box-shadow: 0 14px 36px rgba(0, 16, 38, .26);
  backdrop-filter: blur(18px);
  font-size: 22px;
  font-weight: 780;
  line-height: 1;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease
}

.locate-btn,
.copy-link-btn,
.snap-btn {
  font-size: 16px
}

.zoom-btn:hover,
.locate-btn:hover,
.copy-link-btn:hover,
.snap-btn:hover {
  border-color: rgba(54, 191, 250, .48);
  background: rgba(8, 25, 43, .90)
}

.windrose-overlay {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 10;
  width: min(62vmin, 690px);
  height: min(62vmin, 690px);
  transform: translate(-50%, -50%);
  pointer-events: none;
  filter: drop-shadow(0 18px 48px rgba(0, 30, 60, .16))
}

.windrose-overlay svg {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 2
}

.spot-pin {
  width: 18px !important;
  height: 18px !important;
  margin-left: -9px !important;
  margin-top: -9px !important;
  border: 3px solid #fff;
  border-radius: 999px;
  background: #e50083;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .35), 0 0 0 5px rgba(229, 0, 131, .16)
}

.tile-error {
  display: none;
  position: fixed;
  left: 50%;
  top: 76px;
  z-index: 30;
  transform: translateX(-50%);
  width: min(520px, calc(100vw - 28px));
  padding: 11px 14px;
  border: 1px solid rgba(255, 227, 138, .35);
  border-radius: 16px;
  color: #fff7d2;
  background: rgba(53, 37, 6, .75);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  font-size: .86rem;
  line-height: 1.35
}

.tile-error.show {
  display: block
}

.bottom-tab-bar {
  position: fixed;
  left: 50%;
  bottom: max(0px, env(safe-area-inset-bottom));
  z-index: 25;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  transform: translateX(-50%);
  pointer-events: none
}

.bottom-tab {
  pointer-events: auto;
  min-width: 124px;
  height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
  color: var(--text);
  background: linear-gradient(135deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .045)), var(--panel-strong);
  box-shadow: 0 -10px 34px rgba(0, 16, 38, .22);
  backdrop-filter: blur(18px);
  font-weight: 820;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease
}

.bottom-tab:hover {
  border-color: rgba(54, 191, 250, .48);
  background: rgba(8, 25, 43, .94)
}

.bottom-tab:disabled {
  opacity: .42;
  cursor: not-allowed
}

.bottom-tab.is-hidden {
  visibility: hidden;
  pointer-events: none
}

.drawer {
  position: fixed;
  left: 50%;
  bottom: max(0px, env(safe-area-inset-bottom));
  z-index: 26;
  width: min(430px, calc(100vw - 28px));
  max-height: min(70vh, 650px);
  display: grid;
  grid-template-rows: 44px 1fr;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .045)), var(--panel-strong);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
  overflow: hidden;
  transform: translate(-50%, 0);
  transition: transform .22s ease, opacity .18s ease
}

.drawer.is-collapsed {
  transform: translate(-50%, calc(100% + 4px));
  opacity: 0;
  pointer-events: none
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  color: var(--text);
  background: rgba(255, 255, 255, .055);
  font-weight: 850;
  cursor: pointer
}

.drawer-arrow {
  font-weight: 950;
  color: var(--accent-2)
}

.drawer-panel {
  display: none;
  min-height: 0;
  overflow: hidden
}

.drawer-panel.is-open {
  display: grid;
  grid-template-rows: auto 1fr
}

.drawer-subtitle {
  display: grid;
  gap: 2px;
  padding: 10px 14px;
  color: var(--muted);
  border-bottom: 1px solid rgba(174, 219, 255, .10);
  font-size: .82rem
}

.drawer-subtitle strong {
  color: var(--text);
  font-size: .98rem
}

.panel-content {
  overflow: auto;
  padding: 10px 12px 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 231, 255, .35) transparent
}

.spot-group+.spot-group {
  margin-top: 12px
}

.spot-group h2 {
  margin: 0 0 5px;
  padding: 0 4px;
  color: rgba(215, 237, 251, .82);
  font-size: .76rem;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: .08em
}

.spot-list,
.link-list {
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 15px;
  background: rgba(255, 255, 255, .045)
}

.spot-row,
.link-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 43px;
  padding: 9px 9px 9px 12px;
  color: var(--text);
  border: 0;
  border-bottom: 1px solid rgba(174, 219, 255, .10);
  background: transparent;
  text-align: left;
  text-decoration: none;
  cursor: pointer
}

.spot-row:last-child,
.link-row:last-child {
  border-bottom: 0
}

.spot-row:hover,
.spot-row.is-active,
.link-row:hover {
  background: rgba(54, 191, 250, .11)
}

.name {
  min-width: 0;
  font-size: .91rem;
  font-weight: 700;
  line-height: 1.25
}

.meta {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis
}

.spot-link {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(174, 219, 255, .14);
  border-radius: 10px;
  color: var(--accent-2);
  background: rgba(255, 255, 255, .055);
  text-decoration: none;
  font-weight: 800
}

.spot-info-tabs {
  display: flex;
  gap: 8px;
  padding: 10px 12px 0
}

.spot-info-tab {
  flex: 1;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, .055);
  color: var(--text);
  padding: 9px 12px;
  font-weight: 820;
  cursor: pointer
}

.spot-info-tab.is-active {
  border-color: rgba(54, 191, 250, .55);
  background: rgba(54, 191, 250, .16);
  color: #e8faff
}

.spot-info-page {
  display: none;
  min-height: 0;
  overflow: hidden
}

.spot-info-page.is-active {
  display: block
}

.spot-description {
  padding: 14px 14px 16px;
  color: #d7edfb;
  line-height: 1.55;
  font-size: .92rem
}

.muted,
.empty {
  color: var(--muted)
}

.empty {
  padding: 4px 2px;
  margin: 0
}

.link-tools {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 10px
}

.link-tools button {
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, .055);
  color: var(--text);
  padding: 7px 10px;
  font-size: .78rem;
  font-weight: 800;
  cursor: pointer
}

.link-type+.link-type {
  margin-top: 12px
}

.link-type-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 5px;
  padding: 0 4px
}

.link-type-head h2 {
  margin: 0;
  color: rgba(215, 237, 251, .86);
  font-size: .76rem;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: .08em
}

.move-group-up {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, .055);
  color: var(--accent-2);
  font-weight: 950;
  cursor: pointer
}

.move-group-up:disabled {
  opacity: .28;
  cursor: default
}

.link-row {
  min-height: 46px
}

.link-row .name {
  font-size: .9rem
}

@media(max-width:720px) {
  .top-card {
    max-width: calc(100vw - 84px);
    padding: 10px 12px;
    border-radius: 16px
  }

  .mark {
    width: 30px;
    height: 30px;
    border-radius: 10px
  }

  .top-card strong {
    font-size: .91rem
  }

  .top-card span {
    display: none
  }

  .zoom-btn,
  .locate-btn,
  .copy-link-btn,
  .snap-btn {
    width: 40px;
    height: 40px;
    border-radius: 13px
  }

  .windrose-overlay {
    width: min(86vmin, 560px);
    height: min(86vmin, 560px)
  }

  .drawer {
    width: calc(100vw - 20px);
    max-height: 72vh;
    border-radius: 18px 18px 0 0
  }

  .bottom-tab {
    min-width: 0;
    width: calc((100vw - 28px)/2);
    height: 42px;
    padding: 0 10px
  }

  .spot-row {
    min-height: 42px;
    padding: 8px 8px 8px 11px
  }

  .name {
    font-size: .95rem
  }

  .spot-row .meta {
    display: none
  }
}

@media(min-width:960px) {
  .drawer {
    left: 24px;
    bottom: 0;
    transform: translate(0, 0);
    width: 430px
  }

  .drawer.is-collapsed {
    transform: translate(0, calc(100% + 4px))
  }

  .bottom-tab-bar {
    left: 24px;
    transform: none
  }

  .bottom-tab {
    min-width: 132px
  }

  .windrose-overlay {
    width: min(56vmin, 640px);
    height: min(56vmin, 640px)
  }
}

/* Update: vaste Spot-info hoogte + lokale linkvolgorde per groep */
#linksPanel {
  --spot-info-page-height: 80px;
}

#linksPanel.drawer-panel.is-open {
  grid-template-rows: auto auto 1fr;
}

#linksPanel .spot-info-page {
  height: min(var(--spot-info-page-height), calc(70vh - 150px));
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 231, 255, .35) transparent;
}

#linksPanel .spot-info-page.is-active {
  display: block;
}

#spotLinksPage .panel-content {
  overflow: visible;
  padding: 10px 12px 16px;
}

.link-row-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  border-bottom: 1px solid rgba(174, 219, 255, .10);
}

.link-row-shell:last-child {
  border-bottom: 0;
}

.link-row-shell .link-row {
  border-bottom: 0;
  border-radius: 0;
}

.move-link-up {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 46px;
  border: 0;
  border-left: 1px solid rgba(174, 219, 255, .10);
  background: transparent;
  color: var(--accent-2);
  font-weight: 950;
  cursor: pointer;
}

.move-link-up:hover {
  background: rgba(54, 191, 250, .11);
}

.move-link-up:disabled {
  opacity: .28;
  cursor: default;
  background: transparent;
}

.link-group-tools {
  display: flex;
  justify-content: flex-end;
  margin: 6px 2px 0;
}

.link-group-tools button {
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, .045);
  color: var(--muted);
  padding: 5px 8px;
  font-size: .72rem;
  font-weight: 800;
  cursor: pointer;
}

.link-group-tools button:hover {
  color: var(--text);
  border-color: rgba(54, 191, 250, .38);
}

@media(max-width:720px) {
  #linksPanel .spot-info-page {
    height: min(var(--spot-info-page-height), calc(72vh - 150px));
  }

  .move-link-up {
    min-height: 44px;
  }
}

.drawer-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 18%;
  background: rgba(255, 255, 255, .15);
  border: 1px solid rgba(255, 255, 255, .25);
  padding: 0px 0px 2px 0px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  transition: all .15s ease;
}

.drawer-head:hover .drawer-close-btn {
  background: rgba(255, 255, 255, .25);
}

.drawer-head:active .drawer-close-btn {
  transform: scale(.95);
}

.site-logo{
    width:38px;
    height:38px;
    display:block;

}


/* Snap to spots */
.snap-btn.is-active {
  border-color: rgba(54, 191, 250, .72);
  background: rgba(54, 191, 250, .22);
  color: #e8faff;
  box-shadow: 0 14px 36px rgba(0, 16, 38, .26), 0 0 0 3px rgba(54, 191, 250, .16);
}

.spot-row.is-nearest:not(.is-active) {
  background: rgba(54, 191, 250, .07);
}

/* V6: compacte Spot-header en geen nearest-highlight buiten threshold */
.spot-row.is-nearest:not(.is-active) {
  background: transparent;
}

.spot-info-compact-head {
  display: grid;
  gap: 4px;
  padding: 8px 12px;
}

.spot-info-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.spot-info-title-row strong {
  white-space: nowrap;
}

.spot-info-title-row .spot-info-tabs {
  display: flex;
  gap: 6px;
  padding: 0;
  flex: 0 0 auto;
}

.spot-info-title-row .spot-info-tab {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: .74rem;
  line-height: 1;
  font-weight: 820;
}

.spot-info-compact-head #linksSub {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-tools-bottom {
  justify-content: center;
  margin: 14px 0 2px;
}

#linksPanel.drawer-panel.is-open {
  grid-template-rows: auto 1fr;
}

#linksPanel .spot-info-page {
  height: min(var(--spot-info-page-height), calc(70vh - 120px));
}

@media(max-width:720px) {
  #linksPanel .spot-info-page {
    height: min(var(--spot-info-page-height), calc(72vh - 120px));
  }
}

/* V8: Spot-info tabs in de menuheader, zoals de mockup */
.drawer-head {
  cursor: default;
}

.drawer-head #drawerHeadLabel {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drawer-spot-info-tabs {
  display: none;
  margin-left: auto;
  padding: 0;
  gap: 8px;
  flex: 0 0 auto;
}

.drawer.is-info-open .drawer-spot-info-tabs {
  display: flex;
}

.drawer.is-info-open .drawer-head {
  gap: 10px;
}

.drawer-spot-info-tabs .spot-info-tab {
  flex: 0 0 auto;
  min-width: 72px;
  padding: 7px 12px;
  border-radius: 14px;
  font-size: .86rem;
  line-height: 1;
  font-weight: 850;
}

.drawer:not(.is-info-open) .drawer-head {
  cursor: pointer;
}

.drawer.is-info-open .spot-info-compact-head {
  padding: 10px 14px;
  gap: 4px;
}

.drawer.is-info-open .spot-info-compact-head strong {
  font-size: .98rem;
  color: var(--text);
}

.drawer.is-info-open .spot-info-compact-head #linksSub {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media(max-width:720px) {
  .drawer-spot-info-tabs {
    gap: 6px
  }

  .drawer-spot-info-tabs .spot-info-tab {
    min-width: 62px;
    padding: 7px 10px;
    font-size: .82rem
  }

  .drawer.is-info-open .drawer-head {
    padding: 0 10px;
    gap: 8px
  }
}

.rws-wind-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: grid;
  gap: 2px;
  min-width: 132px;
  max-width: 190px;
  padding: 10px 12px;
  border: 1px solid rgba(174, 219, 255, .28);
  border-radius: 18px;
  background: rgba(6, 18, 31, .78);
  box-shadow: 0 16px 42px rgba(0, 16, 38, .28);
  backdrop-filter: blur(16px);
  text-align: center;
  color: var(--text);
  font-size: .78rem;
  line-height: 1.22;
  pointer-events: none
}

.rws-wind-badge strong {
  font-size: 1.05rem;
  line-height: 1.1;
  color: #fff
}

.rws-wind-badge span {
  color: #d7edfb;
  white-space: nowrap
}

.rws-wind-badge small {
  color: var(--muted);
  font-size: .7rem
}

.rws-wind-badge.is-empty {
  display: none
}

.rws-wind-badge.is-empty,
.rws-wind-badge.is-loading,
.rws-wind-badge.is-error {
  min-width: 112px
}

.rws-wind-empty {
  color: var(--muted) !important
}

@media(max-width:720px) {
  .rws-wind-badge {
    min-width: 118px;
    padding: 8px 10px;
    border-radius: 16px;
    font-size: .72rem
  }

  .rws-wind-badge strong {
    font-size: .96rem
  }
}

.rws-wind-arrow {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  transform: rotate(var(--wind-deg, 0deg));
  transform-origin: 50% 50%;
  opacity: .95;
  filter: drop-shadow(0 4px 10px rgba(0, 16, 38, .30))
}

.rws-wind-arrow.is-hidden {
  display: none
}

.rws-wind-arrow svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible
}

.rws-wind-arrow line {
  stroke: currentColor;
  stroke-width: .84;
  stroke-linecap: round;
  marker-start: url(#rwsWindArrowTail);
  marker-end: url(#rwsWindArrowHead)
}

.rws-wind-arrow path {
  fill: currentColor
}

.rws-wind-arrow.wind-speed-gray {
  color: #9aa6b2
}

.rws-wind-arrow.wind-speed-blue {
  color: #38bdf8
}

.rws-wind-arrow.wind-speed-green {
  color: #22c55e
}

.rws-wind-arrow.wind-speed-yellow {
  color: #facc15
}

.rws-wind-arrow.wind-speed-orange {
  color: #fb923c
}

.rws-wind-arrow.wind-speed-red {
  color: #ef4444
}

@media(max-width:720px) {
  .rws-wind-arrow line {
    stroke-width: .96
  }
}

.rws-meetpunt-pin {
  width: 18px !important;
  height: 18px !important;
  margin-left: -9px !important;
  margin-top: -9px !important;
  border: 2px solid rgba(255, 255, 255, .96);
  border-radius: 999px;
  background: #0ea5e9;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .32), 0 0 0 5px rgba(14, 165, 233, .16)
}

.rws-meetpunt-pin span {
  display: block;
  width: 6px;
  height: 6px;
  margin: 4px;
  border-radius: 999px;
  background: #fff
}

.rws-source {
  display: block;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #8be7ff !important
}

.leaflet-tooltip strong {
  font-weight: 850
}

.leaflet-tooltip span {
  color: #456
}

/* RWS windregel in de spot-header */
.top-card .rws-header-line {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.25
}

.top-card .rws-header-line.is-hidden {
  display: none
}

.top-card .rws-header-line strong {
  display: inline;
  color: var(--text);
  font-size: .78rem;
  line-height: 1.25;
  letter-spacing: 0
}

.rws-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .12)
}

.rws-dot.wind-speed-gray {
  color: #9aa6b2
}

.rws-dot.wind-speed-blue {
  color: #38bdf8
}

.rws-dot.wind-speed-green {
  color: #22c55e
}

.rws-dot.wind-speed-yellow {
  color: #facc15
}

.rws-dot.wind-speed-orange {
  color: #fb923c
}

.rws-dot.wind-speed-red {
  color: #ef4444
}

.rws-sep {
  opacity: .55
}

.rws-source-pill {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 2px 7px;
  border: 1px solid rgba(174, 219, 255, .22);
  border-radius: 999px;
  background: rgba(255, 255, 255, .075);
  color: #d7edfb;
  font-size: .7rem;
  font-weight: 800;
  cursor: help;
  white-space: nowrap
}

.rws-wind-badge {
  display: none !important
}

@media(max-width:720px) {
  .top-card .rws-header-line {
    display: flex;
    font-size: .72rem
  }

  .top-card .rws-header-line.is-hidden {
    display: none
  }

  .top-card .rws-header-line strong {
    font-size: .72rem
  }

  .rws-source-pill {
    font-size: .66rem;
    padding: 1px 6px
  }

  .rws-dot {
    width: 8px;
    height: 8px
  }
}

/* V12: spots-menu vanuit de bovenste spotkaart */
.top-card {
  align-items: flex-start;
  overflow: visible
}

.top-spot-toggle {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-align: left;
  cursor: pointer
}

.top-spot-text {
  display: block;
  min-width: 0
}

.top-spot-caret {
  display: grid !important;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(174, 219, 255, .18);
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  color: var(--accent-2);
  font-weight: 900;
  line-height: 1;
  transition: transform .16s ease, background .16s ease
}

.top-card.is-spots-open .top-spot-caret {
  transform: rotate(180deg);
  background: rgba(54, 191, 250, .16)
}

.top-spots-dropdown {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  width: min(430px, calc(100vw - 28px));
  max-height: min(62vh, 560px);
  display: none;
  grid-template-rows: auto 1fr;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .045)), var(--panel-strong);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
  overflow: hidden
}

.top-card.is-spots-open .top-spots-dropdown {
  display: grid
}

.top-spots-content {
  max-height: min(54vh, 490px)
}

#spotsTab[hidden] {
  display: none !important
}

.bottom-tab-bar:has(#spotsTab[hidden]) .bottom-tab {
  min-width: 150px
}

@media(max-width:720px) {
  .top-card {
    max-width: calc(100vw - 84px);
    padding: 10px 12px
  }

  .top-spot-toggle {
    gap: 8px
  }

  .top-spots-dropdown {
    width: calc(100vw - 20px);
    max-height: 64vh
  }

  .top-spots-content {
    max-height: 56vh
  }

  .bottom-tab-bar:has(#spotsTab[hidden]) .bottom-tab {
    width: auto;
    min-width: 148px
  }

  .top-card .top-spot-caret {
    display: grid !important
  }
}


/* V13: mobiel spots-menu volle breedte + tekst zichtbaar + kaartknoppen uit de weg */
@media(max-width:720px) {
  body.top-spots-open .top-card {
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
    width: auto;
    max-width: none;
  }

  body.top-spots-open .top-spots-dropdown {
    left: 0;
    right: 0;
    width: auto;
    max-height: min(68vh, 620px);
  }

  body.top-spots-open .top-spots-content {
    max-height: min(58vh, 540px);
  }

  .top-card .top-spots-dropdown span,
  .top-card .top-spots-dropdown .name,
  .top-card .top-spots-dropdown .meta {
    display: block;
  }

  .top-card .top-spots-dropdown .spot-link {
    display: grid;
  }

  .top-card .top-spots-dropdown .spot-row {
    grid-template-columns: minmax(0, 1fr) auto;
    color: var(--text);
  }

  .top-card .top-spots-dropdown .spot-row .name {
    font-size: .96rem;
    font-weight: 760;
  }

  .top-card .top-spots-dropdown .spot-row .meta {
    margin-top: 2px;
    color: var(--muted);
    font-size: .72rem;
  }

  body.top-spots-open .zoom-controls {
    top: auto;
    bottom: calc(max(74px, env(safe-area-inset-bottom) + 74px));
    right: max(12px, env(safe-area-inset-right));
    z-index: 19;
  }
}

/* V14: mobile header layout fix + desktop spot-info stays left */
@media(min-width:721px) {
  .drawer {
    left: 24px;
    bottom: 0;
    transform: translate(0, 0);
    width: 430px;
  }

  .drawer.is-collapsed {
    transform: translate(0, calc(100% + 4px));
  }

  .bottom-tab-bar {
    left: 24px;
    transform: none;
  }
}

@media(max-width:720px) {

  .top-card,
  body.top-spots-open .top-card {
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
    top: max(10px, env(safe-area-inset-top));
    width: auto;
    max-width: none;
    z-index: 34;
  }

  .top-spots-dropdown,
  body.top-spots-open .top-spots-dropdown {
    left: 0;
    right: 0;
    width: auto;
    max-height: min(68vh, 620px);
    z-index: 35;
  }

  .top-spots-content,
  body.top-spots-open .top-spots-content {
    max-height: min(58vh, 540px);
  }

  .zoom-controls,
  body.top-spots-open .zoom-controls {
    top: calc(max(10px, env(safe-area-inset-top)) + 76px);
    bottom: auto;
    right: max(12px, env(safe-area-inset-right));
    z-index: 22;
  }
}

/* V15: keep top header readable and restore mobile spot-info drawer */
.top-spot-toggle {
  flex: 1 1 auto;
  width: 100%;
}

.top-spot-text {
  display: block;
  min-width: 0;
  overflow: hidden;
}

.top-spot-text strong,
.top-spot-text span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media(max-width:720px) {
  .top-card {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .top-spot-toggle {
    min-width: 0;
  }

  .top-spot-text strong,
  .top-spot-text span {
    display: block;
  }

  body.spot-info-open .drawer {
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
    bottom: max(0px, env(safe-area-inset-bottom));
    width: auto;
    max-height: min(72vh, 650px);
    transform: none;
    opacity: 1;
    pointer-events: auto;
    z-index: 32;
  }

  body.spot-info-open .drawer.is-collapsed {
    transform: translateY(calc(100% + 4px));
    opacity: 0;
    pointer-events: none;
  }

  body.spot-info-open .bottom-tab-bar {
    z-index: 33;
  }
}

/* V16: mobile header content zichtbaar + spot-info tab links */
@media(max-width:720px) {

  .top-card,
  body.top-spots-open .top-card {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 72px;
    padding: 10px 12px;
  }

  .top-card .mark {
    grid-column: 1;
    grid-row: 1;
  }

  .top-card .top-spot-toggle {
    grid-column: 2;
    grid-row: 1;
    display: flex !important;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
  }

  .top-card .top-spot-text {
    display: block !important;
    flex: 1 1 auto;
    min-width: 0;
    overflow: visible;
    opacity: 1;
    visibility: visible;
  }

  .top-card .top-spot-text strong,
  .top-card .top-spot-text span,
  .top-card #activeSpotTitle,
  .top-card #topSpotSub {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    max-width: 100%;
  }

  .top-card #activeSpotTitle {
    color: var(--text);
    font-size: .98rem;
    line-height: 1.12;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .top-card #topSpotSub {
    color: var(--muted);
    margin-top: 4px;
    font-size: .72rem;
    line-height: 1.25;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .top-card .rws-header-line {
    display: flex !important;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    margin-top: 4px;
    white-space: normal;
  }

  .top-card .rws-header-line.is-hidden {
    display: none !important;
  }

  .top-card .top-spot-caret {
    flex: 0 0 22px;
  }

  .bottom-tab-bar {
    left: max(10px, env(safe-area-inset-left));
    right: auto;
    transform: none;
    justify-content: flex-start;
  }

  .bottom-tab-bar:has(#spotsTab[hidden]) .bottom-tab,
  .bottom-tab {
    width: auto;
    min-width: 148px;
  }
}

/* V17: mobile header - geef de windregel echte breedte */
@media(max-width:720px) {

  .top-card,
  body.top-spots-open .top-card {
    display: block !important;
    min-height: 88px;
    padding: 12px 52px 12px 68px !important;
    position: fixed;
  }

  .top-card .mark {
    position: absolute;
    left: 24px;
    top: 22px;
    width: 34px;
    height: 34px;
  }

  .top-card .top-spot-toggle {
    display: block !important;
    width: 100%;
    min-width: 0;
    padding: 0;
  }

  .top-card .top-spot-text {
    display: block !important;
    width: 100%;
    min-width: 0;
    overflow: visible;
  }

  .top-card #activeSpotTitle {
    display: block !important;
    width: 100%;
    margin: 0 0 4px;
    font-size: 1.02rem;
    line-height: 1.12;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .top-card #topSpotSub,
  .top-card .rws-header-line {
    display: block !important;
    width: 100%;
    max-width: 100%;
    margin-top: 0;
    color: var(--muted);
    font-size: .76rem;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .top-card .rws-header-line.is-hidden {
    display: none !important;
  }

  .top-card .rws-header-line strong {
    display: inline;
    font-size: .76rem;
    line-height: 1.35;
  }

  .top-card .rws-dot {
    width: 9px;
    height: 9px;
    vertical-align: baseline;
    margin: 0 2px 0 1px;
  }

  .top-card .rws-source-pill {
    display: inline-flex;
    vertical-align: baseline;
    max-width: 112px;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: .68rem;
  }

  .top-card .top-spot-caret {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
  }

  .top-card.is-spots-open .top-spot-caret {
    transform: translateY(-50%) rotate(180deg);
  }

  .zoom-controls,
  body.top-spots-open .zoom-controls {
    top: calc(max(10px, env(safe-area-inset-top)) + 96px);
  }
}

/* V18: fix mobiele windregel - eerdere mobiele span-regel maakte alle onderdelen blokken */
@media(max-width:720px) {
  .top-card .rws-header-line {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    flex-wrap: wrap !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 4px !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    line-height: 1.25 !important;
  }

  .top-card .rws-header-line.is-hidden {
    display: none !important;
  }

  .top-card .rws-header-line span,
  .top-card .rws-header-line strong {
    display: inline-flex !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
    line-height: 1.25 !important;
  }

  .top-card .rws-header-line .rws-dot {
    display: inline-block !important;
    flex: 0 0 auto !important;
    width: 9px !important;
    height: 9px !important;
    margin: 0 2px !important;
    vertical-align: middle !important;
  }

  .top-card .rws-header-line .rws-source-pill {
    display: inline-flex !important;
    flex: 0 0 auto !important;
    max-width: none !important;
    padding: 1px 7px !important;
  }
}

/* V19: compacte header + klikbare wind-eenheid (kts / m/s / bft) */
.rws-unit-toggle {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 0;
  margin: 0;
  font: inherit;
  font-weight: 850;
  line-height: inherit;
  cursor: pointer;
}

.rws-unit-toggle:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.top-card .rws-header-line {
  gap: 5px;
  margin-top: 2px;
}

@media(max-width:720px) {

  .top-card,
  body.top-spots-open .top-card {
    min-height: 0 !important;
    padding: 9px 46px 9px 62px !important;
    border-radius: 14px !important;
  }

  .top-card .mark {
    left: 20px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 30px !important;
    height: 30px !important;
  }

  .top-card #activeSpotTitle {
    font-size: .94rem !important;
    line-height: 1.05 !important;
    margin: 0 0 2px !important;
  }

  .top-card .rws-header-line {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    flex-wrap: nowrap !important;
    margin-top: 0 !important;
    font-size: .72rem !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .top-card .rws-header-line span,
  .top-card .rws-header-line strong,
  .top-card .rws-header-line button {
    line-height: 1.15 !important;
    white-space: nowrap !important;
  }

  .top-card .rws-dot {
    width: 8px !important;
    height: 8px !important;
    margin: 0 1px !important;
  }

  .top-card .rws-source-pill {
    padding: 1px 6px !important;
    font-size: .64rem !important;
    min-height: 17px !important;
  }

  .top-card .top-spot-caret {
    right: 14px !important;
    width: 22px !important;
    height: 22px !important;
  }

  .zoom-controls,
  body.top-spots-open .zoom-controls {
    top: calc(max(10px, env(safe-area-inset-top)) + 78px) !important;
  }
}

/* V21: wind unit toggle mag het spotsmenu niet openen */
.rws-unit-toggle {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 850;
  padding: 0;
  margin: 0;
  cursor: pointer;
  line-height: inherit;
  display: inline;
  text-decoration: none
}

.rws-unit-toggle:focus-visible {
  outline: 2px solid rgba(125, 211, 252, .75);
  outline-offset: 2px;
  border-radius: 4px
}


@media(max-width:720px){
  .top-card,
  body.top-spots-open .top-card{
    padding:9px 46px 9px 74px !important;
  }

  .top-card .site-logo{
    position:absolute;
    left:20px;
    top:50%;
    transform:translateY(-50%);
    width:38px;
    height:38px;
    display:block;
  }
}