/* ============================================
   RigSize Live - Watersports Theme Stylesheet
   ============================================ */

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  background-color: #dbeafe;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  background: linear-gradient(180deg, #eaf2fb 0%, #dbeafe 100%);
}

/* App Container */
.app-container {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Custom Logo Icon */
.custom-logo {
  width: 2rem;
  height: 2rem;
  color: white;
}

.custom-logo-icon {
  width: 100%;
  height: 100%;
  color: white;
}

/* Header Styles */
.header {
  background: linear-gradient(135deg, #0891b2 0%, #2563eb 100%);
  color: white;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
  position: relative;
  z-index: 2500;
  padding-top: env(safe-area-inset-top, 0px);
}

.header-content {
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 3.5rem;
}

.header-actions {
  display: flex;
  align-items: center;
  position: relative;
}
.header-actions > * + * { margin-left: 0.5rem; }

.header-auth-btn,
.header-menu-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  color: white;
  /* Fallback: toon een placeholder als icon niet laadt */
  min-width: 40px;
  min-height: 40px;
}

.header-auth-btn:hover,
.header-menu-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Language selector in header */
.header-lang-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  color: white;
}
.header-lang-btn:hover { background: rgba(255, 255, 255, 0.3); }
.header-lang-btn svg { stroke: white !important; color: white !important; }

/* Language Bottom Sheet */
.lang-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 10000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: langOverlayIn 0.2s ease-out;
}
.lang-sheet-overlay.hidden { display: none; }
@keyframes langOverlayIn { from { opacity: 0; } to { opacity: 1; } }

.lang-sheet {
  background: #ffffff;
  border-radius: 1.25rem 1.25rem 0 0;
  width: 100%;
  max-width: 420px;
  padding: 0.5rem 0 calc(env(safe-area-inset-bottom, 34px) + 0.75rem);
  animation: langSheetSlide 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.12);
}
@keyframes langSheetSlide { from { transform: translateY(100%); } to { transform: translateY(0); } }

.lang-sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: #e2e8f0;
  margin: 0.25rem auto 0.75rem;
}

.lang-sheet-options {
  display: flex;
  flex-direction: column;
}

.lang-option {
  display: flex;
  align-items: center;
  padding: 1rem 1.25rem;
  border: none;
  background: none;
  cursor: pointer;
  transition: background 0.15s;
  text-align: left;
  width: 100%;
}
.lang-option > * + * { margin-left: 1rem; }
.lang-option:hover { background: #f1f5f9; }
.lang-option:active { background: #e2e8f0; }
.lang-option.active { background: #f0f9ff; }

.lang-option-flag {
  width: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.lang-option-flag img {
  width: 48px;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  display: block;
}

.lang-option-info {
  flex: 1;
}

.lang-option-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1e293b;
}

.lang-option-check {
  color: #0891b2;
  opacity: 0;
  transition: opacity 0.15s;
}
.lang-option.active .lang-option-check { opacity: 1; }

.header-auth-btn svg,
.header-menu-btn svg {
  width: 20px;
  height: 20px;
  stroke: white !important;
  color: white !important;
  pointer-events: none;
}

.header-auth-btn.logged-in {
  background: rgba(16, 185, 129, 0.7);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.5);
  position: relative;
}

.header-auth-btn.logged-in:not(.has-avatar)::after {
  content: '';
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 8px;
  height: 8px;
  background: #34d399;
  border-radius: 50%;
  border: 1.5px solid #0f172a;
}

.header-auth-btn.logged-in svg {
  stroke: white !important;
  color: white !important;
}

.header-auth-avatar {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  max-width: 40px;
  max-height: 40px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.header-auth-btn.has-avatar {
  padding: 0;
  overflow: hidden; /* fallback voor moderne browsers */
  background: rgba(16, 185, 129, 0.7);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.5);
  width: 40px;
  height: 40px;
}
/* iOS Safari negeert overflow:hidden op <button> — fix via img zelf */
.header-auth-btn.has-avatar img {
  width: 40px;
  height: 40px;
  max-width: 40px;
  max-height: 40px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

/* Slide Menu */
.slide-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border-radius: 0 0 1rem 1rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  min-width: 200px;
  overflow: hidden;
  z-index: 2600;
}

.slide-menu.hidden {
  display: none;
}

.menu-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 1rem 1.25rem;
  border: none;
  background: none;
  font-size: 1rem;
  color: #334155;
  cursor: pointer;
  transition: background 0.15s;
  text-align: left;
}
.menu-item > * + * { margin-left: 0.75rem; }

.menu-item * {
  pointer-events: none;
}

.menu-item:hover {
  background: #f1f5f9;
}

.menu-item:active {
  background: #e2e8f0;
}

.menu-item i {
  width: 20px;
  height: 20px;
  color: #64748b;
}

.menu-item.active {
  background: #ecfeff;
  color: #0891b2;
}

.menu-item.active i {
  color: #0891b2;
}

.header-title {
  display: flex;
  align-items: center;
  }
.header-title > * + * { margin-left: 0.75rem; }

.header-title h1 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
}

.subtitle {
  font-size: 0.75rem;
  color: #a5f3fc;
  margin: 0;
}

.icon-large {
  width: 2rem;
  height: 2rem;
}

.icon-button {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 2rem;
  padding: 0.75rem;
  cursor: pointer;
  transition: background 0.2s;
  color: white;
  min-width: 48px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-button:hover {
  background: rgba(255, 255, 255, 0.2);
}

.icon-button i {
  width: 1.5rem;
  height: 1.5rem;
}

/* View Selector Dropdown */
.view-selector {
  position: relative;
  z-index: 3000;
}

.view-dropdown-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 2rem;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  color: white;
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.2s;
  min-height: 48px;
  position: relative;
  z-index: 3001;
}
.view-dropdown-btn > * + * { margin-left: 0.5rem; }

.view-dropdown-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.view-dropdown-btn i {
  width: 1.25rem;
  height: 1.25rem;
}

.chevron-icon {
  margin-left: 0.25rem;
  transition: transform 0.2s;
}

.view-dropdown-btn.open .chevron-icon {
  transform: rotate(180deg);
}

.view-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: white;
  border-radius: 1rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  min-width: 180px;
  overflow: hidden;
  z-index: 3000;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.2s, transform 0.2s;
}

.view-dropdown.hidden {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}

.dropdown-item {
  width: 100%;
  background: none;
  border: none;
  padding: 0.875rem 1rem;
  display: flex;
  align-items: center;
  cursor: pointer;
  color: #0f172a;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.2s;
  text-align: left;
}
.dropdown-item > * + * { margin-left: 0.75rem; }

.dropdown-item:hover {
  background: #f1f5f9;
}

.dropdown-item.active {
  background: #e0f2fe;
  color: #0891b2;
}

.dropdown-item i {
  width: 1.25rem;
  height: 1.25rem;
  color: currentColor;
}

/* Welcome Screen */
.welcome-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #0891b2 0%, #2563eb 100%);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.welcome-screen.hidden {
  display: none;
}

/* Hide header and bottom nav when welcome screen is active */
body:has(.welcome-screen:not(.hidden)) .bottom-tab-bar,
body:has(.welcome-screen:not(.hidden)) .header {
  display: none;
}

.welcome-content {
  background: white;
  border-radius: 1.5rem;
  padding: 1.5rem;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  margin: auto;
}

.welcome-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #0891b2 0%, #2563eb 100%);
  border-radius: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.welcome-icon i {
  width: 36px;
  height: 36px;
  color: white;
}

.welcome-content h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  text-align: center;
  margin: 0 0 0.25rem 0;
}

.welcome-subtitle {
  font-size: 0.875rem;
  color: #0891b2;
  text-align: center;
  margin: 0 0 1.5rem 0;
  font-weight: 500;
}

.welcome-explanation {
  background: #f8fafc;
  border-radius: 2rem;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.welcome-explanation h2 {
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 0.5rem 0;
}

.welcome-explanation p {
  color: #64748b;
  line-height: 1.5;
  margin: 0 0 1rem 0;
  font-size: 0.875rem;
}

.welcome-benefits {
  display: flex;
  flex-direction: column;
  }
.welcome-benefits > * + * { margin-top: 0.5rem; }

.benefit-item {
  display: flex;
  align-items: center;
  color: #0f172a;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.5;
}
.benefit-item > * + * { margin-left: 0.75rem; }

.benefit-item i {
  width: 2rem;
  height: 2rem;
  min-width: 2rem;
  min-height: 2rem;
  color: #0891b2;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0fdfa;
  border-radius: 8px;
}

/* Force all SVG icons to same size */
.benefit-item i svg {
  width: 1.1rem !important;
  height: 1.1rem !important;
}

.welcome-form h2 {
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 0.25rem 0;
}

.form-help {
  font-size: 0.8125rem;
  color: #64748b;
  margin: 0 0 1rem 0;
  line-height: 1.4;
}

.welcome-form .input-group {
  margin-bottom: 1rem;
}

.welcome-form .input-group label {
  display: flex;
  align-items: center;
  font-size: 0.875rem;
}
.welcome-form .input-group label > * + * { margin-left: 0.5rem; }

.welcome-form .input-group label i {
  width: 1rem;
  height: 1rem;
  color: #64748b;
}

.btn-large {
  padding: 0.875rem;
  font-size: 1rem;
  width: 100%;
}

@media (max-height: 700px) {
  .welcome-content {
    padding: 1rem;
  }
  
  .welcome-icon {
    width: 56px;
    height: 56px;
  }
  
  .welcome-icon i {
    width: 32px;
    height: 32px;
  }
  
  .welcome-content h1 {
    font-size: 1.25rem;
  }
  
  .welcome-explanation {
    padding: 0.875rem;
    margin-bottom: 1rem;
  }
  
  .welcome-explanation p {
    margin-bottom: 0.75rem;
  }
}

/* Surfspot Search */
.surfspot-search {
  padding: 0 1rem 0.75rem;
  position: relative;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 1rem;
  width: 1.25rem;
  height: 1.25rem;
  color: #64748b;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 0.75rem 3rem 0.75rem 3rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 2rem;
  background: rgba(255, 255, 255, 0.15);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: white;
  font-size: 0.9375rem;
  font-weight: 500;
  outline: none;
  transition: all 0.2s;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.search-input:focus {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
}

.clear-search {
  position: absolute;
  right: 0.5rem;
  background: none;
  border: none;
  padding: 0.5rem;
  min-width: 44px; min-height: 44px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
  .clear-search:hover {
    color: white;
  }
}

.clear-search i {
  width: 1.25rem;
  height: 1.25rem;
}

.surfspot-suggestions {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 1rem;
  right: 1rem;
  background: white;
  border-radius: 2rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
}

.surfspot-item {
  padding: 1rem;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: background 0.2s;
}

.surfspot-item:last-child {
  border-bottom: none;
}

@media (hover: hover) {
  .surfspot-item:hover {
    background: #f8fafc;
  }
}

.surfspot-name {
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.25rem;
}

.surfspot-location {
  font-size: 0.875rem;
  color: #64748b;
}

.surfspot-distance {
  font-size: 0.75rem;
  color: #0891b2;
  margin-top: 0.25rem;
}
/* Main Content */
.main-content {
  flex: 1;
  position: relative;
  overflow: hidden;
  min-height: 0;
}

/* Tab bar placeholder — hoogte wordt direct overschreven door JS (syncTabBarPlaceholder).
   CSS-waarde is de fallback voor de ms vóór JS meet.
   GEEN env(safe-area-inset-bottom) hier — die zone wordt gedekt door .safe-area-bottom-fill.
   Placeholder matcht alleen de tab bar hoogte (~50px). */
.tab-bar-placeholder {
  flex-shrink: 0;
  height: 50px;
  background: #dbeafe;
  pointer-events: none;
}

/* Verberg placeholder als tab bar ook verborgen is */
body:has(.landing-page:not(.hidden)) .tab-bar-placeholder {
  display: none;
}

/* Bottom Tab Bar */
.bottom-tab-bar {
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  background: #dbeafe;
  border-top: 1px solid rgba(14,116,144,0.15);
  padding-bottom: 0;
  flex-shrink: 0;
  z-index: 1100;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
}

/* Safe area zone onder home indicator — position:fixed bypasses overflow:hidden op app-container */
.safe-area-bottom-fill {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: env(safe-area-inset-bottom, 0px);
  background: #dbeafe;
  z-index: 1099;
  pointer-events: none;
}
.session-detail-open .safe-area-bottom-fill {
  display: none;
}
.session-detail-open body,
body.session-detail-open {
  background: #dbeafe !important;
}

/* Safe area bottom: position:fixed buiten app-container
   Vult de gap tussen app-container en physical screen bottom op iOS PWA
   zonder de flex layout te beïnvloeden */
.tab-bar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 0 10px;
  border: none;
  background: transparent;
  color: #0e7490;
  cursor: pointer;
  transition: color 0.15s;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: visible;
}
* Safe area bottom: position:fixed buiten app-container
   Vult de gap tussen app-container en physical screen bottom op iOS PWA
   zonder de flex layout te beïnvloeden */
.tab-bar-item > * + * { margin-top: 2px; }

.tab-bar-item i,
.tab-bar-item svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  color: inherit;
}

.tab-bar-item span {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.tab-bar-item.active {
  color: #0e7490;
}

.tab-bar-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background: #0e7490;
  border-radius: 0 0 2px 2px;
}

.tab-bar-item:active {
  opacity: 0.7;
}

.view-container {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hidden {
  display: none !important;
}

/* Map Styles */
.map-container {
  flex: 1;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1;
}

/* Voorkom zwart canvas bij eerste load (MapLibre toont #000 voordat tiles laden).
   Targets zowel de container div als de interne MapLibre elementen. */
#map,
#map .maplibregl-map,
#map .maplibregl-canvas-container,
#map .maplibregl-canvas {
  background: #dbeafe !important;
}

/* Session Setup Trigger Button */
.session-setup-trigger {
  position: fixed;
  bottom: max(64px, calc(36px + env(safe-area-inset-bottom, 0px)));
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #0891b2 0%, #2563eb 100%);
  border: none;
  border-radius: 2rem;
  padding: 0.8rem 1.5rem;
  display: flex;
  align-items: center;
  cursor: pointer;
  color: white;
  font-weight: 700;
  font-size: 0.9375rem;
  z-index: 1200;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
  transition: none;
  white-space: nowrap;
  min-width: 220px;
  justify-content: center;
}
* Session Setup Trigger Button */
.session-setup-trigger > * + * { margin-left: 0.625rem; }

.session-setup-trigger:active {
  transform: translateX(-50%) scale(0.96);
  transition: transform 0.1s;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.3);
}

.session-setup-trigger.hidden {
  display: none;
}

/* Verberg trigger altijd als chatRoomView zichtbaar is - CSS fallback */
body:has(#chatRoomView:not(.hidden)) .session-setup-trigger {
  display: none !important;
}

.session-setup-trigger i {
  width: 1.125rem;
  height: 1.125rem;
  color: white;
}

/* Session Setup Full Page */
.session-setup-page {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, #eaf2fb 0%, #dbeafe 100%);
  z-index: 2500;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUpSetup 0.25s ease-out;
}

@keyframes slideUpSetup {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.session-setup-page.hidden {
  display: none;
}

.session-setup-header {
  background: linear-gradient(135deg, #0891b2 0%, #2563eb 100%);
  padding: calc(env(safe-area-inset-top, 0px) + 1rem) 1rem 1rem 1rem;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.session-setup-header > * + * { margin-left: 0.75rem; }

.session-setup-header h1 {
  color: white;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
}

.session-setup-back {
  background: rgba(255,255,255,0.2);
  border: none;
  border-radius: 0.5rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: white;
  transition: background 0.2s;
}

.session-setup-back:active {
  background: rgba(255,255,255,0.3);
}

.session-setup-back i {
  width: 1.25rem;
  height: 1.25rem;
}

.session-setup-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.75rem 1rem calc(1.5rem + env(safe-area-inset-bottom, 34px));
}

.session-setup-card {
  background: white;
  border-radius: 2rem;
  padding: 1rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  }
.session-setup-card > * + * { margin-top: 0.625rem; }

.session-setup-intro {
  font-size: 0.9375rem;
  color: #334155;
  font-weight: 500;
  margin: 0;
  text-align: center;
}

.session-setup-gps-note {
  font-size: 0.75rem;
  color: #94a3b8;
  margin: 0;
  text-align: center;
  line-height: 1.4;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.session-setup-gps-note > * + * { margin-left: 4px; }

.gps-note-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  margin-top: 1px;
  color: #0891b2;
}

/* ============================================
   SAFETY CHECK SECTIE
   ============================================ */
.safety-section {
  background: #f8fbff;
  border: 1px solid #e0eaf5;
  border-radius: 12px;
  padding: 11px 13px;
  margin-bottom: 12px;
}

.safety-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.safety-label-group {
  display: flex;
  flex-direction: column;
  }
.safety-label-group > * + * { margin-top: 2px; }

.safety-label-top {
  display: flex;
  align-items: center;
}

.safety-label-top > * + * {
  margin-left: 5px;
}

.safety-label-text {
  font-size: 0.875rem;
  font-weight: 700;
  color: #1e293b;
}

.safety-label-sub {
  font-size: 0.75rem;
  color: #94a3b8;
}

.safety-info-btn {
  background: #e0eaf5;
  border: none;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  color: #5a90c8;
  flex-shrink: 0;
}

/* Toggle knop */
.safety-toggle {
  position: relative;
  width: 44px;
  height: 26px;
  background: #cbd5e1;
  border-radius: 13px;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: background 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.safety-toggle[aria-checked="true"] {
  background: #0891b2;
}

.safety-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  pointer-events: none;
}

.safety-toggle[aria-checked="true"] .safety-toggle-thumb {
  transform: translateX(18px);
}

/* Tooltip */
.safety-tooltip {
  background: #1e293b;
  color: #e2e8f0;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.75rem;
  line-height: 1.5;
  margin-top: 8px;
}

/* Time picker */
.safety-time-picker {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 0.5px solid #e0eaf5;
}

.safety-time-label {
  font-size: 0.75rem;
  color: #64748b;
  display: block;
  margin-bottom: 7px;
}

.safety-chips {
  display: flex;
  flex-wrap: wrap;
  margin-top: -4px;
  margin-left: -4px;
}

.safety-chip {
  padding: 5px 12px;
  border-radius: 14px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 4px;
  margin-left: 4px;
  background: #edf2f8;
  color: #64748b;
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.safety-chip-selected {
  background: #0891b2;
  color: white;
}

.safety-feedback {
  font-size: 0.6875rem;
  color: #64748b;
  margin: 7px 0 0;
  line-height: 1.5;
}

.safety-custom-row {
  display: flex;
  align-items: center;
  margin-top: 8px;
  padding: 7px 10px;
  background: #f0f9ff;
  border: 1.5px solid #bae6fd;
  border-radius: 10px;
}
.safety-custom-row > * + * { margin-left: 8px; }

.safety-custom-label {
  font-size: 0.75rem;
  color: #0369a1;
  font-weight: 600;
  white-space: nowrap;
}

.safety-custom-row input[type="time"] {
  flex: 1;
  min-width: 0;
  padding: 3px 6px;
  border: none;
  background: transparent;
  font-size: 1rem;
  font-weight: 700;
  color: #0891b2;
  outline: none;
  font-family: inherit;
}

.safety-custom-row span {
  font-size: 0.75rem;
  color: #64748b;
}

/* ============================================
   OVERDUE INDICATOR — FEED KAART
   ============================================ */
.surfer-card-new.overdue-card {
  background: #fffaf7;
  border-color: #f5d9c8;
}

.surfer-card-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  margin-right: 10px;
}

.surfer-card-avatar-wrap .surfer-card-avatar,
.surfer-card-avatar-wrap .surfer-card-avatar-placeholder {
  margin-right: 0;
}

.surfer-overdue-dot {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 13px;
  height: 13px;
  background: #e07020;
  border-radius: 50%;
  border: 2px solid white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.surfer-overdue-dot svg {
  width: 7px;
  height: 7px;
  color: white;
}

.surfer-detail-overdue {
  display: inline-flex;
  align-items: center;
  background: #ef4444;
  color: white;
  font-weight: 700;
  font-size: 0.7rem;
  padding: 2px 7px 2px 5px;
  border-radius: 999px;
  white-space: nowrap;
}
.surfer-detail-overdue > * + * { margin-left: 3px; }

.surfer-detail-overdue svg {
  width: 9px;
  height: 9px;
  flex-shrink: 0;
}

.surfer-overdue-banner {
  display: flex;
  align-items: center;
  background: #fef2f2;
  border: 1.5px solid #fca5a5;
  border-radius: 10px;
  padding: 9px 12px;
  margin-bottom: 10px;
}
.surfer-overdue-banner > * + * { margin-left: 8px; }

.surfer-overdue-banner-icon {
  width: 18px;
  height: 18px;
  color: #dc2626;
  flex-shrink: 0;
}

.surfer-overdue-banner-text {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #b91c1c;
  line-height: 1.3;
}

/* ============================================
   SAFETY PULSE — KAARTMARKER
   ============================================ */
@keyframes safety-pulse {
  0%   { transform: translateZ(0) scale(1); opacity: 0.85; }
  100% { transform: translateZ(0) scale(1.9); opacity: 0; }
}

.surfer-marker-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid #e07020;
  animation: safety-pulse 1.4s ease-out infinite;
  pointer-events: none;
  will-change: transform, opacity;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.surfer-marker-pulse.ring2 {
  animation-delay: 0.55s;
}

/* Input Styles */
.input-group {
  display: flex;
  flex-direction: column;
  }
* Input Styles */
.input-group > * + * { margin-top: 0.25rem; }

.input-row {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 0.25rem;
}
.input-row > * + * { margin-left: 0.5rem; }

.input-half {
  flex: 1 1 calc(50% - 0.25rem);
  min-width: calc(50% - 0.25rem);
}

.input-half input {
  font-size: 0.9375rem;
  padding: 0.5rem 0.625rem;
}

.input-half select {
  font-size: 0.9375rem;
  padding: 0.5rem 0.625rem;
}

#sessionProfileFields {
  margin-bottom: 0.25rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid #e5e7eb;
}

.input-group label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #374151;
}

.label-hint {
  font-weight: 400;
  font-size: 0.75rem;
  color: #9ca3af;
}

.input-group input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 2px solid #e5e7eb;
  border-radius: 2rem;
  font-size: 1rem;
  transition: all 0.2s;
  outline: none;
}

.input-group select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 2px solid #e5e7eb;
  border-radius: 2rem;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.2s;
  outline: none;
  background: white;
  color: #1f2937;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  padding-right: 2rem;
}

.input-group select:focus {
  border-color: #0891b2;
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1);
}

/* Gear input hidden field */
.gear-input.hidden-field {
  display: none;
}

/* Gear input select styling */
select.gear-input {
  padding: 0.5rem 0.5rem;
  border: 2px solid #e5e7eb;
  border-radius: 2rem;
  font-size: 0.85rem;
  outline: none;
  background: white;
  color: #1f2937;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.4rem center;
  padding-right: 1.5rem;
  min-width: 80px;
}

.input-group input:focus {
  border-color: #0891b2;
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1);
}

/* Button Styles */
.btn {
  width: 100%;
  padding: 0.75rem;
  border: none;
  border-radius: 2rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  }
* Button Styles */
.btn > * + * { margin-left: 0.5rem; }

.btn i {
  width: 1.25rem;
  height: 1.25rem;
}

.btn-primary {
  background: linear-gradient(135deg, #0891b2 0%, #2563eb 100%);
  color: white;
  box-shadow: 0 10px 15px -3px rgba(8, 145, 178, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 20px 25px -5px rgba(8, 145, 178, 0.4);
  transform: translateY(-1px);
}

.btn-danger {
  background: linear-gradient(135deg, #dc2626 0%, #e11d48 100%);
  color: white;
  box-shadow: 0 10px 15px -3px rgba(220, 38, 38, 0.3);
}

.btn-danger:hover {
  box-shadow: 0 20px 25px -5px rgba(220, 38, 38, 0.4);
  transform: translateY(-1px);
}

/* Session Login Hint */
.session-login-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 2rem;
  cursor: pointer;
  transition: all 0.2s;
}
* Session Login Hint */
.session-login-hint > * + * { margin-left: 0.375rem; }

.session-login-hint:hover {
  background: #fde68a;
  border-color: #fbbf24;
}

.session-login-hint i {
  width: 16px;
  height: 16px;
  color: #d97706;
  flex-shrink: 0;
}

.session-login-hint.hidden {
  display: none;
}

/* Session Status */
.session-status {
  text-align: center;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  background: #d1fae5;
  color: #065f46;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
}
.status-badge > * + * { margin-left: 0.5rem; }

/* Modern Status Badge */
.status-badge-modern {
  display: inline-flex;
  align-items: center;
  background: #d1fae5;
  color: #065f46;
  padding: 0.625rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
}
* Modern Status Badge */
.status-badge-modern > * + * { margin-left: 0.5rem; }

.status-badge-modern .status-text {
  color: #065f46;
}

.status-badge-modern .status-divider {
  color: #6ee7b7;
  font-weight: 400;
}

.status-badge-modern .status-gear {
  color: #047857;
  font-weight: 700;
}

.status-pulse {
  width: 0.5rem;
  height: 0.5rem;
  background: #10b981;
  border-radius: 50%;
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* ============================================
   SESSION SUMMARY MODAL
   ============================================ */
.summary-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.summary-modal-content {
  background: white;
  border-radius: 1.5rem;
  max-width: 340px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  overflow: hidden;
}

.summary-scrollable {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 1.5rem 1.5rem 0.5rem;
  flex: 1;
  min-height: 0;
}

.summary-footer-fixed {
  padding: 1rem 1.5rem 1.5rem;
  background: white;
  border-radius: 0 0 1.5rem 1.5rem;
  position: relative;
}

.summary-footer-fixed::before {
  content: '';
  position: absolute;
  top: -24px;
  left: 0;
  right: 0;
  height: 24px;
  background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,1));
  pointer-events: none;
}

.summary-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.summary-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
}

.summary-icon i {
  width: 28px;
  height: 28px;
  color: white;
}

.summary-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 0.75rem;
  display: block;
  border: 3px solid #10b981;
  box-shadow: 0 2px 12px rgba(16, 185, 129, 0.3);
}

.summary-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.summary-stats {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.5rem;
}
.summary-stats > * + * { margin-top: 0.75rem; }

.summary-stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.summary-stat-row.single {
  grid-template-columns: 1fr;
}

.summary-stat-row.single .summary-stat {
  justify-content: center;
}

.summary-stat {
  display: flex;
  align-items: center;
  background: #f8fafc;
  border-radius: 0.75rem;
  padding: 0.875rem;
  min-width: 0;
  overflow: hidden;
}
.summary-stat > * + * { margin-left: 0.75rem; }

.summary-stat > i {
  width: 20px;
  height: 20px;
  color: #0891b2;
  flex-shrink: 0;
}

.summary-stat > svg {
  flex-shrink: 0;
}

.summary-stat-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.summary-stat-value {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}

.summary-stat-label {
  font-size: 0.6875rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.summary-footer {
  display: flex;
  flex-direction: column;
  margin-top: 1rem;
}
.summary-footer > * + * { margin-top: 0.75rem; }

.summary-notes-input {
  width: 100%;
  border: 1.5px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 0.75rem;
  font-size: 0.875rem;
  color: #0f172a;
  resize: none;
  font-family: inherit;
  line-height: 1.5;
  box-sizing: border-box;
  transition: border-color 0.15s;
}

.summary-notes-input:focus {
  outline: none;
  border-color: #0891b2;
}

.session-notes-text {
  background: #f8fafc;
  border-radius: 0.75rem;
  padding: 0.875rem;
  font-size: 0.875rem;
  color: #334155;
  line-height: 1.6;
  white-space: pre-wrap;
}

.summary-saved,
.summary-tip,
.summary-error {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  padding: 0.625rem;
  border-radius: 0.5rem;
}
.summary-saved,
.summary-tip,
.summary-error > * + * { margin-left: 0.5rem; }

.summary-saved {
  background: #d1fae5;
  color: #065f46;
}

.summary-saved i {
  width: 16px;
  height: 16px;
}

.summary-tip {
  background: #fef3c7;
  color: #92400e;
}

.summary-tip i {
  width: 16px;
  height: 16px;
}

.summary-error {
  background: #fee2e2;
  color: #991b1b;
}

.summary-error i {
  width: 16px;
  height: 16px;
}

/* Settings View */
.settings-container {
  height: 100%;
  overflow-y: auto;
  padding: 0.75rem 0.75rem calc(72px + env(safe-area-inset-bottom, 34px));
  background: linear-gradient(180deg, #eaf2fb 0%, #dbeafe 100%);
  position: relative;
  z-index: 2000;
}

.settings-card {
  max-width: 28rem;
  margin: 0 auto 8rem;
  background: white;
  border-radius: 1.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
}

.settings-header {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
}
.settings-header > * + * { margin-left: 0.75rem; }

.settings-icon {
  width: 3rem;
  height: 3rem;
  background: linear-gradient(135deg, #0891b2 0%, #2563eb 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.settings-icon i {
  width: 1.5rem;
  height: 1.5rem;
}

.settings-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

.settings-subtitle {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0;
}

/* Avatar Upload */
.avatar-upload-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 0.5rem;
}
* Avatar Upload */
.avatar-upload-section > * + * { margin-top: 8px; }

.avatar-upload {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  position: relative;
  cursor: pointer;
  overflow: hidden;
}

.avatar-preview {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-placeholder-icon {
  width: 36px;
  height: 36px;
  color: #cbd5e1;
}

.avatar-upload-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 28px;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.avatar-upload-overlay i {
  width: 14px;
  height: 14px;
}

.avatar-remove-btn {
  background: none;
  border: none;
  color: #ef4444;
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  transition: background 0.15s;
  min-height: 44px;
  min-width: 44px;
}
.avatar-remove-btn > * + * { margin-left: 4px; }

.avatar-remove-btn i {
  width: 12px;
  height: 12px;
}

.avatar-remove-btn:hover {
  background: #fef2f2;
}

/* Chat avatar */
.chat-bubble-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.chat-bubble-avatar-placeholder {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chat-bubble-avatar-placeholder i {
  width: 14px;
  height: 14px;
  color: #94a3b8;
}

.chat-bubble-wrapper {
  display: flex;
  align-items: flex-end;
  max-width: 80%;
  align-self: flex-start;
}
.chat-bubble-wrapper > * + * { margin-left: 8px; }

.chat-bubble-wrapper.own {
  align-self: flex-end;
  flex-direction: row-reverse;
}

/* Map popup avatar */
.popup-header-with-avatar {
  display: flex;
  align-items: center;
  }
* Map popup avatar */
.popup-header-with-avatar > * + * { margin-left: 8px; }

.popup-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.popup-avatar-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.popup-avatar-placeholder i {
  width: 16px;
  height: 16px;
  color: #94a3b8;
}

.settings-content {
  display: flex;
  flex-direction: column;
  }
.settings-content > * + * { margin-top: 1rem; }

/* Info Box */
.info-box {
  background: #dbeafe;
  border: 1px solid #93c5fd;
  border-radius: 0.75rem;
  padding: 1rem;
  margin-top: 0.5rem;
}

.info-box h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1e3a8a;
  margin: 0 0 0.5rem 0;
}

.info-box p {
  font-size: 0.75rem;
  color: #1e40af;
  line-height: 1.5;
  margin: 0;
}

.settings-section {
  margin: 1.5rem 0;
}

.section-title {
  display: flex;
  align-items: center;
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 0.75rem 0;
}
.section-title > * + * { margin-left: 0.5rem; }

.section-title i {
  width: 1.25rem;
  height: 1.25rem;
  color: #0891b2;
}

.gear-section-header h3 {
  display: flex;
  align-items: center;
  font-size: 1.125rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0.5rem 0 0.75rem 0;
}
.gear-section-header h3 > * + * { margin-left: 0.5rem; }

.gear-section-header h3 i,
.gear-section-header h3 svg {
  width: 1.25rem;
  height: 1.25rem;
  color: #0891b2;
}

.map-style-selector {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.map-style-btn {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 2rem;
  padding: 0.875rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s;
  color: #64748b;
  font-weight: 500;
  font-size: 0.875rem;
}
.map-style-btn > * + * { margin-top: 0.5rem; }

.map-style-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.map-style-btn.active {
  background: #e0f2fe;
  border-color: #0891b2;
  color: #0891b2;
}

.map-style-btn i {
  width: 1.5rem;
  height: 1.5rem;
}

/* Sport Type Selector */
.sport-type-selector {
  display: flex;
  margin-bottom: 0.5rem;
  padding: 0.25rem;
  background: var(--bg-secondary);
  border-radius: 2rem;
}
* Sport Type Selector */
.sport-type-selector > * + * { margin-left: 0.375rem; }

.sport-type-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.5rem;
  border: none;
  border-radius: 2rem;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}
.sport-type-btn > * + * { margin-left: 0.3rem; }

.sport-type-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.sport-type-btn.active {
  background: linear-gradient(135deg, #0891b2, #0ea5e9);
  color: white;
  box-shadow: 0 2px 8px rgba(8, 145, 178, 0.4);
}

.sport-type-btn i {
  width: 1.1rem;
  height: 1.1rem;
}

.sport-type-btn .sport-icon {
  width: 20px;
  height: 20px;
}

.sport-type-btn.active .sport-icon {
  filter: brightness(0) invert(1);
}

.profile-sport-selector {
  margin-bottom: 0;
}

/* Fin Type Selector (Vin/Foil) — compacter dan sport selector */
.fin-type-selector {
  display: flex;
  margin-bottom: 0.5rem;
  padding: 0.2rem;
  background: var(--bg-secondary);
  border-radius: 2rem;
  max-width: 220px;
}
* Fin Type Selector (Vin/Foil) — compacter dan sport selector */
.fin-type-selector > * + * { margin-left: 0.3rem; }

.fin-type-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.35rem;
  border: none;
  border-radius: 2rem;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}
.fin-type-btn > * + * { margin-left: 0.25rem; }

.fin-type-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.fin-type-btn.active {
  background: linear-gradient(135deg, #0891b2, #0ea5e9);
  color: white;
  box-shadow: 0 2px 8px rgba(8, 145, 178, 0.4);
}

.fin-type-btn i {
  width: 1.1rem;
  height: 1.1rem;
}

.fin-type-btn .sport-icon {
  width: 16px;
  height: 16px;
  filter: brightness(0);
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.fin-type-btn.active .sport-icon {
  filter: brightness(0) invert(1);
  opacity: 1;
}

.profile-fin-selector {
  margin-bottom: 0;
}

/* Board type + Fin/Foil op één rij in session setup */
.input-row-boardfin {
  align-items: flex-end;
  margin-top: 0.1rem;
}
* Board type + Fin/Foil op één rij in session setup */
.input-row-boardfin > * + * { margin-left: 0.5rem; }

/* Fin selector in boardfin-rij: vul resterende ruimte op */
.input-row-boardfin .fin-type-selector {
  margin-bottom: 0.35rem;
  max-width: none;
  flex: 1;
  min-width: 130px;
}

/* Label boven fin selector, net als andere labels in de rij */
.input-row-boardfin .fin-type-selector::before {
  content: attr(data-label);
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  margin-right: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  align-self: center;
}

/* Pills in boardfin-rij compacter */
.input-row-boardfin .fin-type-btn {
  padding: 0.2rem 0.5rem;
}

/* Wind Unit Selector */
.wind-unit-selector {
  display: flex;
  margin-bottom: 0.5rem;
  padding: 0.2rem;
  background: var(--bg-secondary);
  border-radius: 2rem;
  max-width: 260px;
}
* Wind Unit Selector */
.wind-unit-selector > * + * { margin-left: 0.3rem; }

.wind-unit-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.5rem;
  border: none;
  border-radius: 2rem;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.wind-unit-btn > * + * { margin-left: 0.35rem; }

.wind-unit-btn:active { opacity: 0.8; }

.wind-unit-btn.active {
  background: linear-gradient(135deg, #0891b2, #0ea5e9);
  color: white;
  box-shadow: 0 2px 8px rgba(8, 145, 178, 0.4);
}

.wind-unit-label {
  font-weight: 700;
  font-size: 0.85rem;
}

/* Fin Badge (history cards) */
.fin-badge {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 600;
  color: #0891b2;
  background: rgba(8, 145, 178, 0.1);
  padding: 1px 5px;
  border-radius: 2rem;
  vertical-align: middle;
  margin-left: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Hide board volume for kite/wing */
.input-group.hidden-field {
  display: none;
}

/* Leaflet Popup Customization */
.leaflet-popup-content-wrapper {
  border-radius: 2rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
  padding: 0;
  overflow: hidden;
}

.leaflet-popup-content {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.leaflet-popup-tip {
  background: white;
}

/* Modern Popup Content - Apple Fitness Style */
.popup-content {
  min-width: 180px;
  padding: 10px 12px;
}

.popup-header {
  font-weight: 700;
  font-size: 1rem;
  color: #0f172a;
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid #f1f5f9;
}

/* Gear section - Sail & Board prominent */
.popup-gear {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 6px 0;
  margin-bottom: 6px;
  border-bottom: 1px solid #f1f5f9;
}
* Gear section - Sail & Board prominent */
.popup-gear > * + * { margin-left: 1rem; }

.popup-gear-item {
  text-align: center;
}

.popup-gear-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: #0891b2;
  line-height: 1;
}

.popup-gear-label {
  font-size: 0.7rem;
  color: #64748b;
  margin-top: 2px;
}

.popup-gear-sub {
  font-size: 0.65rem;
  color: #94a3b8;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 110px;
}

.popup-gear-divider {
  width: 1px;
  height: 2rem;
  background: #e2e8f0;
}

.popup-details {
  display: flex;
  flex-direction: column;
  }
.popup-details > * + * { margin-top: 3px; }

.popup-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

.popup-detail-label {
  color: #64748b;
}

.popup-detail-value {
  font-weight: 600;
  color: #0f172a;
}

/* Mobile Optimizations */
@media (max-width: 640px) {
  .header-content {
    padding: 0.75rem 1rem;
  }
  
  .header-title h1 {
    font-size: 1.125rem;
  }
  
  .stat-value {
    font-size: 1.75rem;
  }
}

/* Prevent zoom on input focus (iOS) */
@media screen and (max-width: 767px) {
  input[type="text"],
  input[type="number"] {
    font-size: 16px;
  }
}

.about-content {
  background: linear-gradient(180deg, #eaf2fb 0%, #dbeafe 100%);
  border-radius: 0.75rem;
  padding: 1rem;
}

.about-description {
  color: #475569;
  font-size: 0.875rem;
  line-height: 1.6;
  margin: 0 0 1rem 0;
}

.about-features {
  display: flex;
  flex-direction: column;
  }
.about-features > * + * { margin-top: 0.75rem; }

.about-feature {
  display: flex;
  align-items: flex-start;
  color: #0f172a;
  font-size: 0.875rem;
  line-height: 1.5;
}
.about-feature > * + * { margin-left: 0.75rem; }

.about-feature i {
  width: 1.25rem;
  height: 1.25rem;
  color: #0891b2;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

/* About Page */
.about-page-container {
  height: 100%;
  overflow-y: auto;
  padding: 1.5rem 0.25rem calc(72px + env(safe-area-inset-bottom, 34px));
  background: linear-gradient(180deg, #eaf2fb 0%, #dbeafe 100%);
}

.about-page-header {
  text-align: center;
  margin-bottom: 2rem;
}

.about-page-icon {
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, #2563eb 0%, #34d399 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.about-page-icon i {
  width: 48px;
  height: 48px;
  color: white;
}

.about-page-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.25rem 0;
}

.about-page-subtitle {
  font-size: 0.875rem;
  color: #0891b2;
  font-weight: 500;
  margin: 0;
}

.about-page-content {
  display: flex;
  flex-direction: column;
  padding-bottom: 2rem;
}
.about-page-content > * + * { margin-top: 1.5rem; }

.about-page-section {
  padding: 0;
}

.about-page-section h2 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 0.75rem 0;
}

.about-page-section p {
  color: #475569;
  font-size: 0.875rem;
  line-height: 1.6;
  margin: 0;
}

.about-page-features {
  display: flex;
  flex-direction: column;
  margin-top: 0.5rem;
}
.about-page-features > * + * { margin-top: 1rem; }

.about-page-feature {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  background: #f8fafc;
  border-radius: 0.75rem;
}
.about-page-feature > * + * { margin-left: 0.75rem; }

.about-page-feature i {
  width: 2rem;
  height: 2rem;
  min-width: 2rem;
  min-height: 2rem;
  color: #0891b2;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ecfeff;
  border-radius: 8px;
}

/* Force all SVG icons to same size */
.about-page-feature i svg {
  width: 1.1rem !important;
  height: 1.1rem !important;
}

.about-page-feature span {
  color: #0f172a;
  font-size: 0.875rem;
  line-height: 1.5;
  font-weight: 500;
}

.about-page-version {
  text-align: center;
  padding: 1.5rem 0 0.5rem 0;
  margin-top: 1rem;
  border-top: 1px solid #e2e8f0;
}

.about-page-version span {
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 500;
}

/* List View */
.list-container {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 0.75rem 0 calc(72px + env(safe-area-inset-bottom, 34px));
  background: linear-gradient(180deg, #eaf2fb 0%, #dbeafe 100%);
}

.list-header {
  margin-bottom: 1.5rem;
}

.list-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.25rem 0;
}

.list-subtitle {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0;
}

.surfers-list {
  display: flex;
  flex-direction: column;
  padding: 0 0.75rem 120px; /* Ruimte voor session panel */
}
.surfers-list > * + * { margin-top: 0.75rem; }

.surfer-card {
  background: white;
  border-radius: 2rem;
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
.surfer-card > * + * { margin-left: 1rem; }

.surfer-card:active {
  transform: scale(0.98);
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.surfer-avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.surfer-avatar.own-marker {
  border: 3px solid #fbbf24;
}

.surfer-info {
  flex: 1;
  min-width: 0;
}

.surfer-name {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.5rem 0;
  display: flex;
  align-items: center;
  }
.surfer-name > * + * { margin-left: 0.5rem; }

.you-badge {
  background: #fbbf24;
  color: #78350f;
  font-size: 0.625rem;
  font-weight: 600;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  text-transform: uppercase;
}

.surfer-details {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  font-size: 0.75rem;
  color: #64748b;
}

.surfer-detail {
  display: flex;
  flex-direction: column;
}

.detail-label {
  font-size: 0.625rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  margin-bottom: 0.125rem;
}

.detail-value {
  font-weight: 600;
  color: #0f172a;
  font-size: 0.875rem;
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #64748b;
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state-text {
  font-size: 1rem;
  font-weight: 500;
}

/* Surfspot Markers */
.surfspot-marker {
  background: none !important;
  border: none !important;
}

.surfspot-icon {
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.25));
  cursor: pointer;
  transition: transform 0.2s ease;
}

.surfspot-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

@media (hover: hover) {
  .surfspot-marker:hover .surfspot-icon {
    transform: scale(1.15);
  }
}

.surfspot-popup {
  text-align: center;
  padding: 0.5rem;
}

.surfspot-popup-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: #0f172a;
  margin-bottom: 0.25rem;
}

.surfspot-popup-location {
  font-size: 0.75rem;
  color: #64748b;
}

/* Auth Status */
.auth-status {
  padding: 0.75rem;
  background: #f1f5f9;
  border-radius: 2rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.auth-logged-in {
  color: #059669;
}

.auth-logged-out {
  color: #64748b;
}

.auth-logged-out a {
  color: #0891b2;
  text-decoration: underline;
}

/* Auth Modal */
.auth-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5000;
  padding: 1rem;
}

.auth-modal.hidden {
  display: none;
}

.auth-modal-content {
  background: white;
  border-radius: 1.5rem;
  padding: 2rem;
  max-width: 400px;
  width: 100%;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
}

.auth-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: #f1f5f9;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #64748b;
}

.auth-close-btn:hover {
  background: #e2e8f0;
}

.auth-header {
  text-align: center;
  margin-bottom: 1rem;
}

.auth-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #0891b2, #0e7490);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
  color: white;
}

.auth-icon i {
  width: 24px;
  height: 24px;
}

.auth-header h2 {
  font-size: 1.5rem;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.auth-header p {
  color: #64748b;
  font-size: 0.875rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  }
.auth-form > * + * { margin-top: 1rem; }

.auth-message {
  padding: 0.75rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  text-align: center;
}

.auth-message:empty {
  display: none;
}

.auth-message.success {
  background: #d1fae5;
  color: #059669;
}

.auth-message.error {
  background: #fee2e2;
  color: #dc2626;
}

.auth-hint {
  margin-top: 1rem;
  font-size: 0.75rem;
  color: #94a3b8;
  text-align: center;
}

.auth-links {
  text-align: center;
  margin-top: 0.5rem;
}

.auth-links a {
  font-size: 0.875rem;
  color: #0891b2;
  text-decoration: none;
}

.auth-links a:hover {
  text-decoration: underline;
}

.auth-switch {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
  font-size: 0.875rem;
  color: #64748b;
}

.auth-switch a {
  color: #0891b2;
  text-decoration: none;
  font-weight: 600;
  margin-left: 0.25rem;
}

.auth-switch a:hover {
  text-decoration: underline;
}

/* Social Login Buttons */
.social-login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 2rem;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}
* Social Login Buttons */
.social-login-btn > * + * { margin-left: 0.75rem; }

.apple-btn {
  background: #000;
  color: #fff;
}

.apple-btn:hover {
  background: #1a1a1a;
}

.google-btn {
  background: #fff;
  color: #1f2937;
  border: 2px solid #e2e8f0;
}

.google-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.auth-divider {
  display: flex;
  align-items: center;
  margin: 0.25rem 0;
}
.auth-divider > * + * { margin-left: 1rem; }

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.auth-divider span {
  font-size: 0.8125rem;
  color: #94a3b8;
  white-space: nowrap;
}

/* Session History */
.history-page-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 0.75rem 0 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}

.history-page-header {
  text-align: center;
  margin-bottom: 1.5rem;
  flex-shrink: 0;
}

/* Compact header - icon and title inline */
.history-page-header-compact {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
  flex-shrink: 0;
}
* Compact header - icon and title inline */
.history-page-header-compact > * + * { margin-left: 0.75rem; }

.history-page-icon-small {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #0891b2, #0e7490);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.history-page-icon-small i {
  width: 18px;
  height: 18px;
}

.history-page-header-compact h1 {
  font-size: 1.125rem;
  color: #0f172a;
  margin: 0;
  font-weight: 600;
}

/* History Tabs */
.history-tabs {
  display: flex;
  background: rgba(255,255,255,0.4);
  border-radius: 10px;
  padding: 3px;
  margin-bottom: 0;
  flex-shrink: 0;
}
* History Tabs */
.history-tabs > * + * { margin-left: 4px; }

.history-tab {
  flex: 1;
  padding: 7px 4px;
  border: none;
  border-radius: 2rem;
  background: transparent;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.history-tab.active {
  background: white;
  color: #0891b2;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.history-tab-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.history-tab-panel.hidden {
  display: none !important;
}

.history-coming-soon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  text-align: center;
}

.coming-soon-icon {
  width: 56px;
  height: 56px;
  background: #f0f9ff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0891b2;
  margin-bottom: 1rem;
}

.coming-soon-icon i {
  width: 28px;
  height: 28px;
}

.history-coming-soon h2 {
  font-size: 1.125rem;
  color: #0f172a;
  margin: 0 0 0.5rem;
}

.history-coming-soon p {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0;
  max-width: 280px;
  line-height: 1.5;
}

.history-page-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #0891b2, #0e7490);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
  color: white;
}

.history-page-icon i {
  width: 28px;
  height: 28px;
}

.history-page-header h1 {
  font-size: 1.25rem;
  color: #0f172a;
  margin-bottom: 0.25rem;
}

.history-page-subtitle {
  color: #64748b;
  font-size: 0.875rem;
}

.history-page-content {
  background: linear-gradient(180deg, #eaf2fb 0%, #dbeafe 100%);
  border-radius: 2rem 2rem 0 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  box-sizing: border-box;
}

.history-login-prompt {
  text-align: center;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex: 1;
  min-height: 200px;
}

.login-prompt-icon {
  width: 56px;
  height: 56px;
  background: rgba(255,255,255,0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: #64748b;
}

.login-prompt-icon i {
  width: 28px;
  height: 28px;
}

.history-login-prompt h2 {
  font-size: 1.125rem;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.history-login-prompt p {
  color: #64748b;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  max-width: 280px;
}

.history-login-prompt .btn {
  width: auto;
  padding: 0.875rem 2rem;
}

.session-history-list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 34px));
}

/* History Filters */
.hist-filters {
  display: flex;
  flex-direction: column;
  padding: 0.75rem 0.75rem 0;
  margin-bottom: 0.5rem;
}
* History Filters */
.hist-filters > * + * { margin-top: 8px; }

.hist-sport-tabs {
  display: flex;
  background: rgba(255,255,255,0.4);
  border-radius: 10px;
  padding: 3px;
}
.hist-sport-tabs > * + * { margin-left: 4px; }

/* Fallback: margin als gap niet ondersteund is (iOS < 14.5) */
@supports not (gap: 4px) {
  .hist-sport-tabs > * + * {
    margin-left: 4px;
  }
}

.hist-sport-tab {
  flex: 1;
  padding: 6px 4px;
  border: none;
  border-radius: 2rem;
  background: transparent;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.hist-sport-tab > * + * { margin-left: 3px; }

.hist-sport-tab.active {
  background: white;
  color: #0891b2;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.hist-sport-icon {
  width: 16px;
  height: 16px;
  opacity: 0.6;
}

.hist-sport-tab.active .hist-sport-icon {
  opacity: 1;
  filter: brightness(0) saturate(100%) invert(41%) sepia(85%) saturate(1379%) hue-rotate(166deg) brightness(95%) contrast(101%);
}

.hist-period-tabs {
  display: flex;
  background: rgba(255,255,255,0.4);
  border-radius: 10px;
  padding: 3px;
}
.hist-period-tabs > * + * { margin-left: 4px; }

.hist-period-tab {
  flex: 1;
  padding: 7px 6px;
  border: none;
  border-radius: 2rem;
  background: transparent;
  color: #64748b;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.hist-period-tab.active {
  background: white;
  color: #0891b2;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.hist-count {
  padding: 0 0.75rem;
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

/* Sport icon in session card */
.session-card-sport-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #f0f9ff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-right: 10px;
}

.session-card-sport-icon img {
  width: 26px;
  height: 26px;
  opacity: 0.8;
  filter: brightness(0) saturate(100%) invert(41%) sepia(85%) saturate(1379%) hue-rotate(166deg) brightness(95%) contrast(101%);
}

/* Sport badge in session detail */
.session-detail-sport-badge {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(135deg, #ecfeff, #f0f9ff);
  border: 1px solid #cffafe;
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 8px;
}
* Sport badge in session detail */
.session-detail-sport-badge > * + * { margin-left: 6px; }

.session-detail-sport-badge img {
  width: 18px;
  height: 18px;
  filter: brightness(0) saturate(100%) invert(41%) sepia(85%) saturate(1379%) hue-rotate(166deg) brightness(95%) contrast(101%);
}

.session-detail-sport-badge span {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #0891b2;
}

/* Inline sport icon in detail items */
.detail-sport-inline-icon {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  margin-right: 4px;
  opacity: 0.7;
}

#historyLoggedIn {
  flex: 1;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

/* ===== LEADERBOARD EXTRA STYLES (main LB styles are inline in index.html) ===== */
.lb-entry-own .lb-row { background: #ecfeff; border-color: #0891b2; }

#historyLoggedIn:not(.hidden) {
  display: block;
}

.history-item {
  display: flex;
  padding: 1rem;
  border-bottom: 1px solid #f1f5f9;
}
.history-item > * + * { margin-left: 1rem; }

.history-item:last-child {
  border-bottom: none;
}

.history-date {
  display: flex;
  flex-direction: column;
  min-width: 80px;
  font-size: 0.75rem;
}

.history-day {
  font-weight: 600;
  color: #0f172a;
}

.history-time {
  color: #94a3b8;
}

.history-details {
  flex: 1;
}

.history-spot {
  font-weight: 600;
  color: #0891b2;
  margin-bottom: 0.25rem;
}

.history-stats {
  display: flex;
  flex-wrap: wrap;
  font-size: 0.75rem;
  color: #64748b;
}
.history-stats > * + * { margin-left: 0.75rem; }

.empty-history {
  text-align: center;
  padding: 2rem;
  color: #64748b;
}

.empty-history .hint {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 0.5rem;
}
/* ============================================
   SESSION CARDS (History List)
   ============================================ */
.session-cards-list {
  display: flex;
  flex-direction: column;
  padding: 0.75rem 0 calc(72px + env(safe-area-inset-bottom, 34px));
  width: 100%;
  box-sizing: border-box;
}
* ============================================
   SESSION CARDS (History List)
   ============================================ */
.session-cards-list > * + * { margin-top: 0.5rem; }

/* Fallback: margin als gap niet ondersteund is (iOS < 14.5) */
@supports not (gap: 0.5rem) {
  .session-cards-list > * + * {
    margin-top: 0.5rem;
  }
}

/* Swipe-to-delete wrapper */
.session-card-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 0.75rem;
  width: 100%;
  box-sizing: border-box;
  /* Safari: voorkom dat border-radius clip breekt tijdens swipe transform */
  -webkit-mask-image: -webkit-radial-gradient(white, black);
}

.session-card-content {
  display: flex;
  align-items: center;
  background: #f8fafc;
  border-radius: 0.75rem;
  padding: 1rem;
  cursor: pointer;
  transition: transform 0.3s ease;
  border: 1px solid #e2e8f0;
  position: relative;
  z-index: 2;
  width: 100%;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

.session-card-content:active {
  background: #f1f5f9;
}

/* Delete button behind the card */
.session-card-delete {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 90px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  z-index: 1;
  border-radius: 0 0.75rem 0.75rem 0;
  -webkit-tap-highlight-color: transparent;
}
* Delete button behind the card */
.session-card-delete > * + * { margin-top: 4px; }

.session-card-delete span {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.session-card-delete:active {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.session-card-delete i {
  width: 24px;
  height: 24px;
}

/* Legacy support for old .session-card class */
.session-card {
  display: flex;
  align-items: center;
  background: #f8fafc;
  border-radius: 0.75rem;
  padding: 1rem;
  cursor: pointer;
  transition: background 0.15s;
  border: 1px solid #e2e8f0;
}

.session-card:active {
  background: #f1f5f9;
}

.session-card-info {
  flex: 1;
  min-width: 0;
}

.session-card-title-row {
  display: flex;
  align-items: center;
  min-width: 0;
}
.session-card-title-row > * + * { margin-left: 0.25rem; }

.session-card-title {
  font-weight: 600;
  font-size: 1rem;
  color: #0f172a;
  margin-bottom: 0.25rem;
  min-width: 0;
  flex: 1;
}

.session-card-subtitle {
  font-size: 0.8125rem;
  color: #64748b;
}

.session-card-duration {
  font-size: 1.25rem;
  font-weight: 600;
  color: #0891b2;
  margin-right: 0.5rem;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  white-space: nowrap;
}

.session-card-arrow {
  color: #94a3b8;
  flex-shrink: 0;
}

.session-card-arrow i {
  width: 20px;
  height: 20px;
}

/* Swipe hint animation */
@keyframes swipeHint {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-10px); }
}

.session-card-wrapper:first-child .session-card-content {
  /* Subtle hint animation for first card */
}

/* History page content - light theme */
.history-page-content {
  background: linear-gradient(180deg, #eaf2fb 0%, #dbeafe 100%);
  border-radius: 2rem 2rem 0 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#historyLoggedIn {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#historyLoggedIn:not(.hidden) {
  display: block;
}

.session-history-list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 34px));
}
.session-detail-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #f2f2f7;
  z-index: 3000;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.session-detail-header {
  background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
  padding: 1rem;
  padding-top: max(1rem, env(safe-area-inset-top));
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 10;
}
.session-detail-header > * + * { margin-left: 1rem; }

.session-detail-back {
  display: flex;
  align-items: center;
  background: none;
  border: none;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  padding: 0.5rem;
  margin: -0.5rem;
}
.session-detail-back > * + * { margin-left: 0.25rem; }

.session-detail-back i {
  width: 20px;
  height: 20px;
}

.session-detail-header h1 {
  font-size: 1.125rem;
  font-weight: 600;
  color: white;
  margin: 0;
}

/* Session Detail Tabs */
.session-detail-tabs {
  display: flex;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 9;
}

.session-tab {
  flex: 1;
  padding: 0.875rem 0.5rem;
  background: none;
  border: none;
  font-size: 0.9rem;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
}

.session-tab.active {
  color: #0891b2;
  font-weight: 600;
}

.session-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 1rem;
  right: 1rem;
  height: 3px;
  background: #0891b2;
  border-radius: 3px 3px 0 0;
}

.session-tab-content {
  display: none;
}

.session-tab-content.active {
  display: block;
}

.session-detail-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  color: #94a3b8;
  text-align: center;
}

.session-detail-placeholder i {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.session-detail-placeholder p {
  font-size: 1rem;
  margin: 0;
}

/* Statistieken Tab - App Style */
.stats-section {
  background: #ffffff;
  margin-bottom: 0.75rem;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.stats-section-header {
  font-size: 0.75rem;
  font-weight: 600;
  color: #0891b2;
  letter-spacing: 0.05em;
  padding: 0.875rem 1rem 0.5rem 1rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.stats-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid #f1f5f9;
}

.stats-row:last-child {
  border-bottom: none;
}

.stats-label {
  color: #64748b;
  font-size: 0.95rem;
}

.stats-value {
  color: #1e293b;
  font-size: 1rem;
  font-weight: 600;
}

.session-detail-content {
  padding: 1rem;
  padding-bottom: 1rem;
}

.session-detail-hero {
  text-align: center;
  margin-bottom: 1.5rem;
}

.session-detail-location {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.5rem;
}
.session-detail-location > * + * { margin-left: 0.5rem; }

.session-detail-location i {
  width: 20px;
  height: 20px;
  color: #0891b2;
}

.session-detail-datetime {
  color: #64748b;
  font-size: 0.9375rem;
}

.session-detail-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.detail-stat {
  background: white;
  border-radius: 0.75rem;
  padding: 1rem;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.detail-stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0891b2;
  margin-bottom: 0.25rem;
}

.detail-stat-label {
  font-size: 0.75rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.session-detail-section {
  background: white;
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.session-detail-section h2 {
  font-size: 0.875rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  margin: 0 0 0.75rem 0;
}

.session-detail-items {
  display: flex;
  flex-direction: column;
  }
.session-detail-items > * + * { margin-top: 0.75rem; }

.detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.detail-item-label {
  color: #64748b;
}

.detail-item-value {
  font-weight: 600;
  color: #0f172a;
}

/* ============================================
   SURFER CARDS (Active Surfers List)
   Apple Fitness Style
   ============================================ */
.surfer-cards-list {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0;
}
* ============================================
   SURFER CARDS (Active Surfers List)
   Apple Fitness Style
   ============================================ */
.surfer-cards-list > * + * { margin-top: 0.375rem; }

.surfer-card-new {
  display: flex;
  align-items: center;
  background: #f8fafc;
  border-radius: 0.75rem;
  padding: 0.7rem 0.85rem;
  cursor: pointer;
  transition: background 0.15s;
  border: 1px solid #e2e8f0;
}

.surfer-card-new:active {
  background: #f1f5f9;
}

.surfer-card-new.own-card {
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.surfer-card-new.own-card:active {
  background: #d1fae5;
}

.surfer-card-left {
  flex: 1;
  min-width: 0;
}

.surfer-card-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  margin-right: 10px;
  border: 2px solid #e2e8f0;
}

.surfer-card-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e2e8f0;
  color: #64748b;
  font-size: 0.875rem;
  font-weight: 700;
}

.own-card .surfer-card-avatar {
  border-color: #a7f3d0;
}

.surfer-card-name {
  font-weight: 600;
  font-size: 0.9375rem;
  color: #0f172a;
  margin-bottom: 0.125rem;
  display: flex;
  align-items: center;
  }
.surfer-card-name > * + * { margin-left: 0.5rem; }

.you-badge {
  display: inline-block;
  background: #10b981;
  color: white;
  font-size: 0.625rem;
  font-weight: 700;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  text-transform: uppercase;
}

.surfer-card-details {
  font-size: 0.8125rem;
  color: #64748b;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}
.surfer-card-details > * + * { margin-left: 0.375rem; }

.surfer-card-spot {
  font-size: 0.75rem;
  color: #0891b2;
  display: flex;
  align-items: center;
  margin-top: 0.25rem;
}
.surfer-card-spot > * + * { margin-left: 0.25rem; }

.surfer-card-spot i {
  width: 12px;
  height: 12px;
}

.surfer-detail-item strong {
  color: #334155;
  font-weight: 600;
}

.surfer-detail-highlight strong {
  font-size: 1.05rem;
  color: #0f172a;
  font-weight: 700;
}

.surfer-detail-divider {
  color: #cbd5e1;
}

.surfer-card-right {
  text-align: right;
  margin-right: 0.5rem;
}

.surfer-card-speed {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0891b2;
  line-height: 1;
}

.surfer-card-speed-unit {
  font-size: 0.6875rem;
  color: #64748b;
  text-transform: uppercase;
}

.surfer-card-arrow {
  color: #94a3b8;
}

.surfer-card-arrow i {
  width: 20px;
  height: 20px;
}

/* Session limit notice */
.session-limit-notice {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  margin: 0.75rem 1rem;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1px solid #bae6fd;
  border-radius: 0.75rem;
  font-size: 0.8125rem;
  color: #0369a1;
}
* Session limit notice */
.session-limit-notice > * + * { margin-left: 0.5rem; }

.session-limit-notice i {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Empty state styling */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: #64748b;
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.empty-state-text {
  font-size: 1.125rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.5rem;
}

.empty-state-hint {
  font-size: 0.875rem;
  color: #64748b;
}

/* Secondary button */
.btn-secondary {
  background: #f1f5f9;
  color: #0891b2;
  margin-top: 0.5rem;
}

.btn-secondary:hover {
  background: #e2e8f0;
}

/* ============================================
   MOBILE RESPONSIVE STYLES
   Supports: iPhone SE, iPhone 12-15, Plus/Max, Android
   ============================================ */

/* Small phones (iPhone SE, small Android - 320-375px) */
@media screen and (max-width: 375px) {
 /* Sport Type Selector */
  .sport-type-selector {
  padding: 0.2rem;
  }
/* Sport Type Selector */
  .sport-type-selector > * + * { margin-left: 0.25rem; }
  
  .sport-type-btn {
    padding: 0.5rem 0.4rem;
    font-size: 0.75rem;
  }
.sport-type-btn > * + * { margin-left: 0.25rem; }
  
  .sport-type-btn i {
    width: 0.9rem;
    height: 0.9rem;
  }
  
  .sport-type-btn .sport-icon {
    width: 22px;
    height: 22px;
  }
  
 /* Fin Type Selector */
  .fin-type-selector {
  padding: 0.15rem;
    max-width: 190px;
  }
/* Fin Type Selector */
  .fin-type-selector > * + * { margin-left: 0.2rem; }
  
  .fin-type-btn {
    padding: 0.25rem 0.3rem;
    font-size: 0.7rem;
  }
.fin-type-btn > * + * { margin-left: 0.2rem; }
  
  .fin-type-btn i {
    width: 0.8rem;
    height: 0.8rem;
  }
  
  .fin-type-btn .sport-icon {
    width: 14px;
    height: 14px;
  }
  
  /* Data Tables */
  .data-table {
    font-size: 0.75rem;
    min-width: 340px;
  }
  
  .data-table-header th {
    padding: 0.625rem 0.375rem;
    font-size: 0.625rem;
  }
  
  .data-table-body td {
    padding: 0.625rem 0.375rem;
  }
  
  .col-spot, .col-name {
    max-width: 100px;
  }
  
  .you-badge-small {
    font-size: 0.5625rem;
    padding: 0.0625rem 0.25rem;
  }
  
  /* Welcome Screen */
  .welcome-content {
    padding: 1.25rem;
    border-radius: 1.25rem;
  }
  
  .welcome-icon {
    width: 52px;
    height: 52px;
  }
  
  .welcome-icon i {
    width: 28px;
    height: 28px;
  }
  
  .welcome-content h1 {
    font-size: 1.25rem;
  }
  
  .welcome-subtitle {
    font-size: 0.8125rem;
    margin-bottom: 1rem;
  }
  
  .welcome-explanation {
    padding: 0.875rem;
    margin-bottom: 1rem;
  }
  
  .welcome-explanation h2 {
    font-size: 0.9375rem;
  }
  
  .welcome-explanation p {
    font-size: 0.8125rem;
  }
  
  .benefit-item {
    font-size: 0.8125rem;
    padding: 0.5rem;
  }
  
  .benefit-item i {
    width: 1.75rem;
    height: 1.75rem;
    min-width: 1.75rem;
    min-height: 1.75rem;
  }
  
  /* History Page */
  .history-page-container {
    padding: 0.75rem 0 0;
  }
  
  .history-page-header h1 {
    font-size: 1.125rem;
  }
  
  .history-page-icon {
    width: 48px;
    height: 48px;
  }
  
  .history-page-icon i {
    width: 24px;
    height: 24px;
  }
  
  .history-login-prompt {
    padding: 1.5rem 1rem;
    min-height: 250px;
  }
  
  .history-login-prompt h2 {
    font-size: 1rem;
  }
  
  .history-login-prompt p {
    font-size: 0.8125rem;
  }
  
  .login-prompt-icon {
    width: 48px;
    height: 48px;
  }
  
  .login-prompt-icon i {
    width: 24px;
    height: 24px;
  }
  
  /* Settings Page */
  .settings-container {
    padding: 0.75rem 0.75rem calc(72px + env(safe-area-inset-bottom, 34px));
  }
  
  .settings-card {
    padding: 1rem;
    border-radius: 2rem;
  }
  
  .settings-icon {
    width: 2.5rem;
    height: 2.5rem;
  }
  
  .settings-icon i {
    width: 1.25rem;
    height: 1.25rem;
  }
  
  .settings-header h2 {
    font-size: 1.125rem;
  }
  
  .map-style-selector {
  }
.map-style-selector > * + * { margin-left: 0.375rem; }
  
  .map-style-btn {
    padding: 0.625rem;
    font-size: 0.75rem;
  }
  
  .map-style-btn i {
    width: 1rem;
    height: 1rem;
  }
  
  /* About Page */
  .about-page-container {
    padding: 0.75rem;
  }
  
  .about-page-header h1 {
    font-size: 1.25rem;
  }
  
  .about-page-icon {
    width: 52px;
    height: 52px;
  }
  
  .about-page-icon i {
    width: 28px;
    height: 28px;
  }
  
  /* List View */
  .list-container {
    padding: 0.75rem 0;
  }
  
  .list-header h2 {
    font-size: 1.125rem;
  }
  
  .surfer-card {
    padding: 0.875rem;
  }
  
  .surfer-avatar {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  
  .surfer-name {
    font-size: 0.9375rem;
  }
  
  .input-half input {
    font-size: 0.9375rem;
    padding: 0.5rem 0.625rem;
  }
  
  .input-half label {
    font-size: 0.75rem;
  }
  
  /* Auth Modal */
  .auth-modal-content {
    padding: 1.5rem;
    margin: 0.75rem;
    border-radius: 1.25rem;
  }
  
  .auth-icon {
    width: 52px;
    height: 52px;
  }
  
  .auth-icon i {
    width: 26px;
    height: 26px;
  }
  
  .auth-header h2 {
    font-size: 1.25rem;
  }
  
  /* Header */
  .header-title h1 {
    font-size: 1.125rem;
  }
  
  .header-title .subtitle {
    font-size: 0.6875rem;
  }
  
  .icon-large {
    width: 1.5rem;
    height: 1.5rem;
  }
}

/* Standard phones (iPhone 12-15, most Android - 376-428px) */
@media screen and (min-width: 376px) and (max-width: 428px) {
  .welcome-content {
    padding: 1.5rem;
  }
  
  .history-login-prompt {
    min-height: 280px;
  }
  
  .settings-container {
    padding: 0.75rem 0.75rem calc(72px + env(safe-area-inset-bottom, 34px));
  }
  
  .about-page-container {
    padding: 0.75rem 0.75rem calc(72px + env(safe-area-inset-bottom, 34px));
  }
  
  .list-container {
    padding: 0.75rem 0 calc(72px + env(safe-area-inset-bottom, 34px));
  }
}

/* Large phones (iPhone Plus/Max, large Android - 429-640px) */
@media screen and (min-width: 429px) and (max-width: 640px) {
  .history-page-container {
    padding: 1.25rem 0 0;
  }
  
  .history-login-prompt {
    min-height: 320px;
  }
  
  .settings-container {
    padding: 1rem 1rem calc(72px + env(safe-area-inset-bottom, 34px));
  }
}

/* Short screens (landscape or small height - under 667px) */
@media screen and (max-height: 667px) {
  /* Welcome Screen */
  .welcome-screen {
    padding: 1rem 0.75rem;
    align-items: flex-start;
  }
  
  .welcome-content {
    padding: 1rem;
    margin-top: 0.5rem;
  }
  
  .welcome-icon {
    width: 44px;
    height: 44px;
    margin-bottom: 0.5rem;
  }
  
  .welcome-icon i {
    width: 24px;
    height: 24px;
  }
  
  .welcome-content h1 {
    font-size: 1.125rem;
    margin-bottom: 0.125rem;
  }
  
  .welcome-subtitle {
    margin-bottom: 0.75rem;
  }
  
  .welcome-explanation {
    padding: 0.75rem;
    margin-bottom: 0.75rem;
  }
  
  .welcome-benefits {
  }
.welcome-benefits > * + * { margin-left: 0.25rem; }
  
  .benefit-item {
    padding: 0.375rem 0.5rem;
  }
  
  /* History Page - Landscape */
  .history-page-container {
    padding: 0.5rem 0 0;
    height: 100%;
  }
  
  .history-page-header-compact {
    margin-bottom: 0.5rem;
  }
  
  .history-page-icon-small {
    width: 28px;
    height: 28px;
  }
  
  .history-page-icon-small i {
    width: 14px;
    height: 14px;
  }
  
  .history-page-header-compact h1 {
    font-size: 1rem;
  }
  
  .history-page-content {
    border-radius: 0.75rem;
  }
  
  .history-login-prompt {
    padding: 1rem;
    min-height: auto;
  }
  
  .login-prompt-icon {
    width: 36px;
    height: 36px;
    margin-bottom: 0.5rem;
  }
  
  .login-prompt-icon i {
    width: 18px;
    height: 18px;
  }
  
  .history-login-prompt h2 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
  }
  
  .history-login-prompt p {
    font-size: 0.8125rem;
    margin-bottom: 0.75rem;
  }
  
  .history-login-prompt .btn {
    padding: 0.625rem 1.5rem;
    font-size: 0.9375rem;
  }
  
  /* Data table in landscape */
  .data-table {
    font-size: 0.75rem;
  }
  
  .data-table-header th {
    padding: 0.5rem 0.375rem;
    font-size: 0.625rem;
  }
  
  .data-table-body td {
    padding: 0.5rem 0.375rem;
  }
  
  .history-page-header {
    margin-bottom: 1rem;
  }
  
  .history-page-icon {
    width: 44px;
    height: 44px;
    margin-bottom: 0.5rem;
  }
  
  .history-page-icon i {
    width: 22px;
    height: 22px;
  }
  
  /* About Page */
  .about-page-header {
    margin-bottom: 1rem;
  }
  
  .about-page-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 0.5rem;
  }
  
  .about-page-section {
    margin-bottom: 1rem;
  }
  
  /* Settings */
  .settings-section {
    margin: 1rem 0;
  }
}

/* Very short screens (under 568px height - iPhone SE landscape) */
@media screen and (max-height: 568px) {
  .welcome-screen {
    padding: 0.5rem;
  }
  
  .welcome-content {
    padding: 0.875rem;
  }
  
  .welcome-icon {
    width: 36px;
    height: 36px;
    margin-bottom: 0.375rem;
  }
  
  .welcome-icon i {
    width: 22px;
    height: 22px;
  }
  
  .welcome-content h1 {
    font-size: 1rem;
  }
  
  .welcome-subtitle {
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
  }
  
  .welcome-explanation {
    padding: 0.5rem;
    margin-bottom: 0.5rem;
  }
  
  .welcome-explanation h2 {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
  }
  
  .welcome-explanation p {
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
  }
  
  .benefit-item {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
  }
  
  .btn-large {
    padding: 0.75rem;
    font-size: 1rem;
  }
}
/* ============================================
   SHARING STARTED SCREEN
   ============================================ */
.sharing-started-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease;
  cursor: pointer;
}

.sharing-started-modal.fade-out {
  animation: fadeOut 0.3s ease forwards;
}

.sharing-started-content {
  background: white;
  border-radius: 1.5rem;
  padding: 2.5rem 2rem 2rem;
  max-width: 340px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.sharing-started-icon {
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: center;
}

.sharing-started-karma {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0891b2;
  margin-bottom: 1.25rem;
  letter-spacing: 0.02em;
}

.sharing-started-text {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: #4b5563;
  margin-bottom: 1.5rem;
}

.sharing-started-tap {
  font-size: 0.75rem;
  color: #9ca3af;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* Safe area support for iOS */
@supports (padding: max(0px)) {
  .header-content {
    padding-top: max(1.25rem, env(safe-area-inset-top));
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }
  
  .settings-container,
  .about-page-container,
  .list-container {
    padding-bottom: 1rem;
  }
  
  .welcome-screen {
    padding-top: max(1rem, env(safe-area-inset-top));
    padding-bottom: 1rem;
    padding-left: max(0.75rem, env(safe-area-inset-left));
    padding-right: max(0.75rem, env(safe-area-inset-right));
  }
  
  .auth-modal {
    padding: max(1rem, env(safe-area-inset-top)) max(0.75rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-left));
  }
}
/* Surfer Detail Modal (vanuit realtime lijst) */
.surfer-detail-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0,0,0,0.4); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
}
.surfer-detail-card {
  background: white; border-radius: 1rem; padding: 1.5rem;
  width: 100%; max-width: 360px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.surfer-detail-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.75rem;
}
.surfer-detail-top h2 {
  font-size: 1.25rem; font-weight: 700; color: #0f172a; margin: 0;
  display: flex; align-items: center;
  }
.surfer-detail-top h2 > * + * { margin-left: 0.5rem; }
.surfer-detail-close {
  background: #f1f5f9; border: none; border-radius: 2rem;
  width: 32px; height: 32px; display: flex; align-items: center;
  justify-content: center; cursor: pointer; color: #64748b;
}
.surfer-detail-close i { width: 18px; height: 18px; }
.surfer-detail-spot {
  display: flex; align-items: center;
  font-size: 0.8125rem; color: #0891b2; margin-bottom: 1rem;
}
.surfer-detail-spot > * + * { margin-left: 6px; }
.surfer-detail-spot i { width: 14px; height: 14px; }
.surfer-detail-gear-row {
  display: flex; align-items: center; justify-content: center;
  padding: 1rem 0; margin-bottom: 0.75rem;
  border-top: 1px solid #f1f5f9; border-bottom: 1px solid #f1f5f9;
}
.surfer-detail-gear-row > * + * { margin-left: 1.5rem; }
.surfer-detail-gear-item { text-align: center; }
.surfer-detail-gear-value {
  font-size: 1.75rem; font-weight: 700; color: #0891b2; line-height: 1;
}
.surfer-detail-gear-label {
  font-size: 0.75rem; color: #64748b; margin-top: 2px;
}
.surfer-detail-gear-divider {
  width: 1px; height: 40px; background: #e2e8f0;
}
.surfer-detail-rows { margin-bottom: 1rem; }
.surfer-detail-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; border-bottom: 1px solid #f8fafc;
}
.surfer-detail-row:last-child { border-bottom: none; }
.surfer-detail-row-label { font-size: 0.8125rem; color: #64748b; }
.surfer-detail-row-value { font-size: 0.8125rem; color: #1e293b; font-weight: 600; }
.surfer-detail-map-btn { width: 100%; justify-content: center; }

/* Loading spinner animation */
.spin {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ============================================
   PWA STANDALONE MODE - Compact layout
   Actief wanneer app op beginscherm staat
   ============================================ */
@media (display-mode: standalone) {
  /* Compactere header */
  .header-content {
    padding: 0.5rem 0.85rem;
    min-height: 2.75rem;
  }
  
  .header-title h1 {
    font-size: 1.1rem;
  }
  
  .header-title .subtitle {
    font-size: 0.65rem;
  }
  
  .header-title {
  }
.header-title > * + * { margin-left: 0.5rem; }
  
  .icon-large {
    width: 1.5rem;
    height: 1.5rem;
  }
  
  .header-auth-btn,
  .header-menu-btn {
    width: 34px;
    height: 34px;
  }
  
  .header-auth-btn svg,
  .header-menu-btn svg {
    width: 17px;
    height: 17px;
  }
  
  .header-actions {
  }
.header-actions > * + * { margin-left: 0.35rem; }
  
  /* Compactere zoekbalk */
  .surfspot-search {
    padding: 0 0.85rem 0.5rem;
  }
  
  .search-input {
    padding: 0.5rem 2.5rem;
    font-size: 0.875rem;
    border-radius: 2rem;
  }
  
  .search-icon {
    left: 0.75rem;
    width: 1rem;
    height: 1rem;
  }
  
  /* Tab bar — geen safe-area override nodig, hoofddefinitie is correct */
  .bottom-tab-bar {
    overflow: visible;
  }
  
  /* Badge moet boven alles staan */
  .tab-badge {
    z-index: 10;
  }
  
  .tab-bar-item {
    padding: 5px 0 3px;
  overflow: visible;
  }
.tab-bar-item > * + * { margin-left: 1px; }
  
  .tab-bar-item i,
  .tab-bar-item svg {
    width: 22px;
    height: 22px;
  }
  
  .tab-bar-item span {
    font-size: 0.625rem;
  }
  
  /* Floating elementen — aangepast aan compactere tab bar */
  .session-setup-trigger {
    bottom: max(64px, calc(36px + env(safe-area-inset-bottom, 0px))) !important;
    padding: 0.8rem 1.5rem;
    font-size: 0.9375rem;
  }
}

/* ============================================
   KLEINE SCHERMEN (iPhone SE/8, 375px breed, ≤700px hoog)
   Compact ongeacht PWA of browser
   ============================================ */
@media (max-height: 700px) {
  .header-content {
    padding: 0.5rem 0.85rem;
    min-height: 2.5rem;
  }
  
  .header-title h1 {
    font-size: 1.05rem;
  }
  
  .header-title .subtitle {
    font-size: 0.6rem;
  }
  
  .icon-large {
    width: 1.4rem;
    height: 1.4rem;
  }
  
  .header-auth-btn,
  .header-menu-btn {
    width: 32px;
    height: 32px;
  }
  
  .header-auth-btn svg,
  .header-menu-btn svg {
    width: 16px;
    height: 16px;
  }
  
  .surfspot-search {
    padding: 0 0.75rem 0.4rem;
  }
  
  .search-input {
    padding: 0.45rem 2.25rem;
    font-size: 0.85rem;
  }
  
  .tab-bar-item {
    padding: 5px 0 3px;
  }
.tab-bar-item > * + * { margin-left: 1px; }
  
  .tab-bar-item i,
  .tab-bar-item svg {
    width: 22px;
    height: 22px;
  }
  
  .tab-bar-item span {
    font-size: 0.6rem;
  }
  
  .session-setup-trigger {
    padding: 0.7rem 1.25rem;
    font-size: 0.875rem;
    bottom: max(52px, calc(34px + env(safe-area-inset-bottom, 0px)));
  }
}

/* ============================================
   KLEINE SCHERMEN + STANDALONE gecombineerd
   ============================================ */
@media (display-mode: standalone) and (max-height: 700px) {
  .session-setup-trigger {
    bottom: max(52px, calc(30px + env(safe-area-inset-bottom, 0px)));
  }
}

/* ============================================
   HELE KLEINE SCHERMEN (iPhone SE 1st gen, ≤570px)
   ============================================ */
@media (max-height: 570px) {
  .header-content {
    padding: 0.35rem 0.75rem;
    min-height: 2.25rem;
  }
  
  .header-title .subtitle {
    display: none;
  }
  
  .surfspot-search {
    padding: 0 0.75rem 0.35rem;
  }
  
  .search-input {
    padding: 0.4rem 2rem;
    font-size: 0.8rem;
  }
  
  .tab-bar-item {
    padding: 4px 0 2px;
  }
  
  .tab-bar-item span {
    font-size: 0.55rem;
  }
}

/* ============================================
   TAB BAR - SEPARATOR & DROPDOWN
   ============================================ */

.tab-bar-separator {
  width: 1px;
  background: #e2e8f0;
  margin: 8px 0;
  flex-shrink: 0;
}

.tab-bar-wind.active {
  color: #0284c7 !important;
}

.tab-bar-wind.active::before {
  background: #0284c7 !important;
}

/* Lijst dropdown submenu */
.tab-dropdown {
  position: fixed;
  bottom: calc(56px + env(safe-area-inset-bottom, 8px) + 8px);
  left: 50px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.15);
  border: 1px solid #e2e8f0;
  min-width: 170px;
  z-index: 5000;
  overflow: hidden;
}

.tab-dropdown-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 12px 16px;
  border: none;
  background: none;
  font-size: 0.85rem;
  color: #334155;
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.tab-dropdown-item > * + * { margin-left: 10px; }

.tab-dropdown-item:active {
  background: #f1f5f9;
}

.tab-dropdown-item i {
  width: 18px;
  height: 18px;
  color: #0891b2;
}

.tab-dropdown-item + .tab-dropdown-item {
  border-top: 1px solid #f1f5f9;
}

/* ============================================
   WIND FORECAST VIEW
   ============================================ */

.wind-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: linear-gradient(180deg, #eaf2fb 0%, #dbeafe 100%);
}

/* Wind view tab toggle — feed-stijl */
.wind-view-tabs {
  display: flex;
  padding: 0 12px;
  background: transparent;
  border-bottom: 1px solid rgba(255,255,255,0.5);
  flex-shrink: 0;
}
* Wind view tab toggle — feed-stijl */
.wind-view-tabs > * + * { margin-left: 4px; }
.wind-view-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 4px;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.2s;
  margin-bottom: -1px;
}
.wind-view-tab > * + * { margin-left: 5px; }
.wind-view-tab.active {
  background: transparent;
  color: #0891b2;
  border-bottom-color: #0891b2;
}
.wind-view-tab:active { opacity: 0.8; }

/* Wind forecast panel */
.wind-forecast-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* Wind map panel - fullscreen over tabs */
.wind-map-panel {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  overflow: hidden;
}
.wind-map-panel.hidden { display: none; }
.wind-map-leaflet {
  width: 100%;
  height: 100%;
  background: #e8ecf0;
}

/* Wind map loading overlay */
.wind-map-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 800;
  color: #64748b;
  font-size: 0.85rem;
  background: rgba(255,255,255,0.85);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  padding: 20px 28px;
  border-radius: 2rem;
}
* Wind map loading overlay */
.wind-map-loading > * + * { margin-top: 10px; }
.wind-map-loading.hidden { display: none; }


.wind-map-legend-bar {
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(to right,
    #94a3b8 0%,
    #38bdf8 9%,
    #0ea5e9 18%,
    #06b6d4 27%,
    #22c55e 36%,
    #16a34a 46%,
    #facc15 56%,
    #fb923c 65%,
    #ef4444 74%,
    #b91c1c 85%,
    #7f1d1d 100%
  );
}
.wind-map-legend-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 0.65rem;
  color: rgba(255,255,255,0.9);
  font-weight: 600;
}
/* Beaufort schaal onder de kleurenbalk — posities via left% */
.wind-map-bft-labels {
  position: relative;
  height: 14px;
  margin-top: 1px;
}
.wind-map-bft-labels span {
  position: absolute;
  transform: translateX(-50%);
  font-size: 0.6rem;
  color: rgba(255,255,255,0.65);
  font-weight: 600;
  white-space: nowrap;
  line-height: 1;
}
.wind-map-bft-labels span:last-child {
  /* "Bft" label aan het einde */
  transform: translateX(-100%);
  color: rgba(255,255,255,0.5);
  font-weight: 400;
  font-style: italic;
}

/* Wind map - legenda bovenin */
.wm-legend-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 800;
  /* Transparant zodat kaart eronder zichtbaar is — Windfinder stijl */
  background: linear-gradient(to bottom, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0) 100%);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  padding: calc(env(safe-area-inset-top, 0px) + 8px) 14px 14px;
}
.wm-legend-top .wind-map-legend-labels {
  color: rgba(255,255,255,0.9);
}

/* Controls: terug + refresh */
.wm-controls {
  position: absolute;
  /* Bug 6 fix: relatief aan legenda die zelf al safe-area-top heeft */
  top: calc(env(safe-area-inset-top, 0px) + 46px);
  left: 12px;
  right: 12px;
  z-index: 800;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}
.wm-back-btn, .wm-refresh-btn {
  /* Bug 5 fix: minimaal 44×44px touch target (Apple HIG) */
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 12px;
  background: rgba(255,255,255,0.88);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #0f172a;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  pointer-events: all;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.wm-back-btn:active, .wm-refresh-btn:active { background: rgba(240,240,240,1); }
.wm-refresh-btn { color: #64748b; }
.wm-refresh-btn.loading i { animation: spin 1s linear infinite; }

/* Scroll tijdsselector — compact strip onderaan */
.wm-scrubber-wrap {
  position: absolute;
  /* wind-map-panel stopt al bij de bovenkant van de tab bar (main-content inset:0)
     dus bottom:0 hier = precies boven de tab bar */
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 800;
  background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.1) 100%);
  padding: 14px 0 calc(10px + env(safe-area-inset-bottom, 17px));
  pointer-events: all;
  min-height: 64px; /* voldoende touch target hoogte op Android */
  box-sizing: border-box;
}
.wm-scrubber-cursor {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  /* Cursor loopt alleen door de tick-hoogte */
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255,255,255,0.9);
  z-index: 2;
  pointer-events: none;
  border-radius: 1px;
  box-shadow: 0 0 4px rgba(255,255,255,0.4);
}
.wm-scrubber {
  display: flex;
  align-items: flex-end;
  overflow-x: scroll;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  padding: 0 50%;
  gap: 0;
}
.wm-scrubber::-webkit-scrollbar { display: none; }
.wm-tick {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 44px;
  padding-bottom: 3px;
  cursor: pointer;
  scroll-snap-align: center;
}
.wm-tick-line {
  width: 1px;
  height: 28px; /* expliciete hoogte — Android Chrome collaps anders naar 0 */
  background: rgba(255,255,255,0.3);
  margin-bottom: 3px;
  transition: all 0.15s;
  flex-shrink: 0;
}
.wm-tick.major .wm-tick-line {
  width: 2px;
  height: 40px;
  background: rgba(255,255,255,0.65);
}
.wm-tick.active .wm-tick-line {
  background: #fff;
  width: 2px;
  height: 40px;
}
.wm-tick-label {
  font-size: 9px;
  color: rgba(255,255,255,0.6);
  font-weight: 500;
  white-space: nowrap;
  text-align: center;
  line-height: 1.2;
}
.wm-tick.major .wm-tick-label { color: rgba(255,255,255,0.88); font-weight: 700; }
.wm-tick.active .wm-tick-label { color: #fff; font-weight: 700; font-size: 10px; }
.wm-tick-day {
  font-size: 8px;
  color: rgba(255,255,255,0.55);
  text-align: center;
  margin-bottom: 2px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}


.wind-map-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
  display: inline-block;
  animation: livePulse 2s ease-in-out infinite;
}
@keyframes livePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* KNMI station markers on wind map */
.knmi-map-marker {
  background: none !important;
  border: none !important;
  z-index: 500 !important;
}
.maplibregl-popup {
  z-index: 600 !important;
}
.knmi-map-marker-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
  border: 2.5px solid #0891b2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0891b2;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  transition: transform 0.15s, box-shadow 0.15s;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
@media (hover: hover) {
  .knmi-map-marker-dot:hover {
    transform: scale(1.2);
    box-shadow: 0 3px 10px rgba(0,0,0,0.4);
  }
}

/* Force Leaflet interactive panes above wind canvas overlays */
#windMapLeaflet .leaflet-marker-pane { z-index: 600 !important; }
#windMapLeaflet .leaflet-popup-pane { z-index: 700 !important; }

/* KNMI custom popup on wind map (sits on container, above canvases) */
.knmi-custom-popup {
  position: absolute;
  z-index: 500;
  transform: translate(-50%, -100%);
  pointer-events: auto;
  animation: popupFadeIn 0.15s ease-out;
}
@keyframes popupFadeIn { from { opacity: 0; transform: translate(-50%, -100%) scale(0.95); } to { opacity: 1; transform: translate(-50%, -100%) scale(1); } }

.knmi-custom-popup-content {
  background: white;
  border-radius: 12px;
  padding: 12px 14px;
  min-width: 180px;
  max-width: 260px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}
.knmi-custom-popup-tip {
  width: 12px;
  height: 12px;
  background: white;
  transform: rotate(45deg);
  margin: -6px auto 0;
  box-shadow: 2px 2px 4px rgba(0,0,0,0.06);
}
.knmi-custom-popup-close {
  position: absolute;
  top: 4px;
  right: 8px;
  background: none;
  border: none;
  font-size: 18px;
  color: #94a3b8;
  cursor: pointer;
  line-height: 1;
  padding: 2px 4px;
}
@media (hover: hover) {
  .knmi-custom-popup-close:hover { color: #334155; }
}

.knmi-popup-title {
  display: flex;
  align-items: center;
  font-size: 0.85rem;
  color: #0f172a;
  margin-bottom: 8px;
  padding-right: 16px;
}
.knmi-popup-title > * + * { margin-left: 6px; }
.knmi-popup-type {
  font-size: 0.7rem;
  color: #94a3b8;
  font-weight: 400;
  margin-left: auto;
}
.knmi-popup-wind {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
}
.knmi-popup-wind > * + * { margin-left: 6px; }
.knmi-popup-speed {
  font-size: 1.4rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
}
.knmi-popup-unit {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 500;
}
.knmi-popup-bft {
  font-size: 0.7rem;
  color: #94a3b8;
  font-weight: 500;
}
.knmi-popup-gust {
  font-size: 0.75rem;
  color: #64748b;
  margin-left: auto;
}
.knmi-popup-dir {
  display: flex;
  align-items: center;
  font-size: 0.85rem;
  color: #334155;
  margin-bottom: 8px;
}
.knmi-popup-dir > * + * { margin-left: 6px; }
.knmi-popup-time {
  font-size: 0.7rem;
  color: #94a3b8;
  margin-left: auto;
}
.knmi-popup-hint {
  font-size: 0.75rem;
  color: #94a3b8;
  line-height: 1.4;
}
.knmi-popup-source {
  font-size: 0.65rem;
  color: #b0b8c4;
  padding-top: 6px;
  border-top: 1px solid #f0f0f0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Spot bar (visible when forecast shown) */
.wind-spot-bar {
  display: flex;
  align-items: center;
  padding: 7px 12px;
  background: rgba(219,234,254,0.8);
  border-bottom: 1px solid rgba(255,255,255,0.5);
  flex-shrink: 0;
}
* Spot bar (visible when forecast shown) */
.wind-spot-bar > * + * { margin-left: 8px; }

.wind-spot-back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: #f1f5f9;
  border-radius: 10px;
  color: #334155;
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.wind-spot-back:active { background: #e2e8f0; }

.wind-spot-bar-info {
  flex: 1;
  display: flex;
  align-items: center;
  min-width: 0;
  overflow: hidden;
}
.wind-spot-bar-info > * + * { margin-left: 6px; }

.wind-spot-bar-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wind-spot-change {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: #f1f5f9;
  border-radius: 10px;
  color: #64748b;
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.wind-spot-change:active { background: #e2e8f0; }

/* Spot list container (like chat spot list) */
.wind-spot-list-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.wind-spot-list-header {
  display: flex;
  align-items: center;
  padding: 14px 12px 8px;
}
.wind-spot-list-header > * + * { margin-left: 8px; }

.wind-spot-list-header h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}

.wind-spot-search {
  position: relative;
  padding: 0 12px 8px;
}

.wind-spot-search-icon {
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translateY(-70%);
  width: 16px;
  height: 16px;
  color: #94a3b8;
  pointer-events: none;
}

.wind-spot-search input {
  width: 100%;
  padding: 10px 12px 10px 36px;
  border: 1px solid #e2e8f0;
  border-radius: 2rem;
  font-size: 16px; /* 16px prevents iOS auto-zoom on focus */
  color: #1e293b;
  background: white;
  outline: none;
  box-sizing: border-box;
}

.wind-spot-search input:focus {
  border-color: #0891b2;
  box-shadow: 0 0 0 2px rgba(8,145,178,0.15);
}

.wind-spot-search input::placeholder { color: #94a3b8; }

.wind-spot-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 12px calc(72px + env(safe-area-inset-bottom, 34px));
  display: flex;
  flex-direction: column;
  }
.wind-spot-list > * + * { margin-top: 2px; }

.wind-spot-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: white;
  border: 1px solid #f1f5f9;
  border-radius: 10px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.15s;
}

.wind-spot-item:active { border-color: #0891b2; background: #f0fdfa; }

.wind-spot-item-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: #0f172a;
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}
.wind-spot-item-name > * + * { margin-left: 6px; }

.wind-spot-item-right {
  display: flex;
  align-items: center;
  }
.wind-spot-item-right > * + * { margin-left: 6px; }

.wind-spot-item-prov {
  font-size: 0.75rem;
  color: #94a3b8;
}

.wind-spot-item-arrow {
  width: 16px;
  height: 16px;
  color: #cbd5e1;
}

/* Wind content (forecast) */
.wind-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 34px));
}

.wind-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: #94a3b8;
  font-size: 0.9rem;
}
.wind-empty-state > * + * { margin-top: 12px; }

.wind-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: #64748b;
  font-size: 0.9rem;
}
.wind-loading > * + * { margin-top: 12px; }

.wind-loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #e2e8f0;
  border-top-color: #0891b2;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* KNMI Live Measurement Block */
.knmi-measurement {
  background: linear-gradient(135deg, #f0fdfa 0%, #e0f7fa 100%);
  border: 1px solid #99f0e0;
  border-radius: 10px;
  padding: 10px 12px;
  margin: 8px 0 4px 0;
}

.knmi-measurement-header {
  display: flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  color: #0d9488;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.knmi-measurement-header > * + * { margin-left: 6px; }

.knmi-station-info {
  font-weight: 400;
  color: #6b7280;
  margin-left: auto;
  text-transform: none;
  letter-spacing: 0;
}

.knmi-measurement-data {
  display: flex;
  align-items: center;
  }
.knmi-measurement-data > * + * { margin-left: 16px; }

.knmi-wind-main {
  display: flex;
  align-items: baseline;
  }
.knmi-wind-main > * + * { margin-left: 4px; }

.knmi-wind-value {
  font-size: 22px;
  font-weight: 700;
  color: #1e293b;
}

.knmi-wind-unit {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}

.knmi-gust {
  font-size: 12px;
  color: #64748b;
  margin-left: 4px;
}

.knmi-wind-dir {
  display: flex;
  align-items: center;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
}
.knmi-wind-dir > * + * { margin-left: 4px; }

.knmi-time {
  font-size: 11px;
  color: #9ca3af;
  margin-left: auto;
}

.knmi-measurement {
  cursor: pointer;
}

.knmi-chevron {
  color: #9ca3af;
}

.knmi-detail-panel {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #ccf0e8;
}

.knmi-detail-row {
  margin-bottom: 10px;
}

.knmi-detail-row:last-child {
  margin-bottom: 0;
}

.knmi-detail-label {
  font-size: 11px;
  font-weight: 600;
  color: #0d9488;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 2px;
}

.knmi-detail-value {
  font-size: 13px;
  color: #1e293b;
  font-weight: 500;
}

.knmi-detail-hint {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.4;
  margin-top: 2px;
}

.knmi-diff {
  font-weight: 600;
  font-size: 12px;
  margin-left: 4px;
}

.knmi-detail-source {
  font-size: 11px;
  color: #9ca3af;
  padding-top: 6px;
  border-top: 1px solid #e0f2f1;
}

/* Day header */
.wind-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1px 12px;
  background: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  color: #334155;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #e2e8f0;
  border-top: 2px solid #3b82f6;
  margin-top: 0;
  position: sticky;
  top: 25px;
  z-index: 11;
}

.wind-day-header.today {
  background: #dbeafe;
  color: #0891b2;
  border-top: 2px solid #0891b2;
  border-bottom: 1px solid #e2e8f0;
}

.wind-day-header:first-child {
  margin-top: 0;
}

.wind-day-label {
  flex: 1;
}

.wind-info-btn {
  background: none;
  border: none;
  padding: 2px;
  cursor: pointer;
  color: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  min-width: 44px;
  min-height: 44px;
}
.wind-day-header.today .wind-info-btn { color: #0891b2; }
.wind-info-btn i, .wind-info-btn svg { width: 18px; height: 18px; stroke-width: 2.5; }

/* Wind info popup overlay */
.wind-info-popup {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.wind-info-popup-content {
  background: white;
  border-radius: 16px;
  max-width: 340px;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  max-height: calc(90vh - 40px);
  display: flex;
  flex-direction: column;
}
.wind-info-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: linear-gradient(135deg, #0891b2, #06b6d4);
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
}
.wind-info-popup-header button {
  background: none; border: none; color: white;
  cursor: pointer; padding: 2px; display: flex;
}
.wind-info-popup-header button i,
.wind-info-popup-header button svg { width: 18px; height: 18px; }
.wind-info-popup-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.wind-info-popup-body > * + * { margin-top: 14px; }
.wind-info-row {
  display: flex;
  align-items: flex-start;
}
.wind-info-row > * + * { margin-left: 12px; }
.wind-info-icon {
  width: 20px; height: 20px;
  color: #0891b2;
  flex-shrink: 0;
  margin-top: 2px;
}
.wind-info-row strong {
  font-size: 0.85rem;
  color: #0f172a;
}
.wind-info-sub {
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.4;
}
.wind-info-tip {
  font-size: 0.75rem;
  color: #64748b;
  background: #f0fdfa;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #99f6e4;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}
.wind-info-tip > * + * { margin-left: 4px; }
.wind-info-tip i, .wind-info-tip svg {
  width: 14px; height: 14px;
  color: #0891b2;
  flex-shrink: 0;
}

.wind-info-divider {
  height: 1px;
  background: #e2e8f0;
  margin: 12px 0;
}

.wind-info-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #0d9488;
  margin-bottom: 8px;
}

/* Forecast table header */
.wind-table-header {
  display: grid;
  grid-template-columns: auto auto auto auto;
  justify-content: space-between;
  gap: 4px;
  align-items: center;
  padding: 5px 12px;
  background: #e8f0fe;
  font-size: 0.68rem;
  font-weight: 600;
  color: #0369a1;
  letter-spacing: 0;
  border-bottom: 1px solid #f1f5f9;
  border-left: 3px solid transparent;
  position: sticky;
  top: 0;
  z-index: 12;
}

.wind-table-header span {
  overflow: visible;
  white-space: nowrap;
}

.wind-table-header span:nth-child(6),
.wind-table-header span:nth-child(7) {
  text-align: right;
}

.wind-header-temp {
  text-align: right;
}
/* Forecast row */
.wind-row {
  display: grid;
  grid-template-columns: auto auto auto auto;
  justify-content: space-between;
  gap: 4px;
  align-items: center;
  padding: 5px 12px;
  background: white;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  border-left: 3px solid transparent;
  -webkit-tap-highlight-color: transparent;
}

/* Met golfdata: voeg golven-kolom toe */
#windContent.wind-has-waves .wind-table-header,
#windContent.wind-has-waves .wind-row {
  grid-template-columns: auto auto auto auto 38px;
}

/* Met golfdata + getij: voeg beide kolommen toe */
#windContent.wind-has-waves.wind-has-tides .wind-table-header,
#windContent.wind-has-waves.wind-has-tides .wind-row {
  grid-template-columns: auto auto auto auto 38px 40px;
}

/* Getij zonder golven (bijv. Perkpolder, Waddenzee-havens):
   Layout 1 HTML heeft 5 grid-kinderen: time-dir | combined | weather | temp | tide
   Zonder deze regel valt de tide-cel naar een tweede rij. */
#windContent.wind-has-tides:not(.wind-has-waves) .wind-table-header,
#windContent.wind-has-tides:not(.wind-has-waves) .wind-row {
  grid-template-columns: auto auto auto auto 44px;
}

/* Expand early/late hours button */
.wind-expand-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  background: #f1f5f9;
  border: none;
  border-bottom: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
* Expand early/late hours button */
.wind-expand-btn > * + * { margin-left: 6px; }
.wind-expand-btn:active { background: #e2e8f0; }
.wind-expand-btn svg {
  transition: transform 0.2s;
  flex-shrink: 0;
}
.wind-expand-section {
  border-bottom: 1px solid #e2e8f0;
}

/* Time column */
.wind-time {
  font-size: 0.75rem;
  font-weight: 600;
  color: #0f172a;
}

/* Wind speed cell */
.wind-speed-cell {
  display: flex;
  align-items: center;
  min-width: 0;
  overflow: hidden;
}
* Wind speed cell */
.wind-speed-cell > * + * { margin-left: 3px; }

.wind-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.wind-speed-value {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
  display: inline-block;
  min-width: 26px;
  text-align: right;
}

.wind-speed-unit {
  font-size: 0.7rem;
  color: #94a3b8;
  font-weight: 500;
}

.wind-gust-dot {
  width: 7px !important;
  height: 7px !important;
}

.wind-gust {
  font-size: 0.75rem;
  color: #64748b;
}

/* Weather icon (QWeather Icons font) */
.wind-weather {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
}


/* Wind direction */
.wind-time-dir {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
}
* Wind direction */
.wind-direction > * + * { margin-left: 1px; }

.wind-dir-arrow {
  width: 20px;
  height: 20px;
  color: #1e293b;
  flex-shrink: 0;
}
.wind-dir-text {
  font-size: 0.68rem;
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
}

.wind-temp {
  font-size: 0.75rem;
  font-weight: 600;
  color: #0f172a;
  text-align: right;
  white-space: nowrap;
}

/* Weericoon kolom */
.wind-weather-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
}

/* Combined wind + gust cell — één horizontale regel */
.wind-combined-cell {
  display: flex;
  align-items: center;
  min-width: 0;
  overflow: hidden;
}
/* Spacer tussen wind en rechterkolommen */
.wind-spacer {
  min-width: 0;
}



.wind-single-line {
  display: flex;
  align-items: center;
  min-width: 0;
}
.wind-single-line > * + * { margin-left: 3px; }

.wind-sep {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-left: 2px !important;
  margin-right: 1px !important;
}

.wind-gust-value {
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
  display: inline-block;
  min-width: 22px;
  text-align: right;
}

.wind-weather-inline {
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
  margin-left: 4px !important;
}

/* Wave cell */
.wind-wave-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 0;
  text-align: right;
}

.wind-wave-height {
  font-size: 0.72rem;
  font-weight: 700;
  color: #0369a1;
  white-space: nowrap;
}

.wind-wave-period {
  font-size: 0.62rem;
  color: #64748b;
  white-space: nowrap;
}

.wind-wave-na {
  font-size: 0.8rem;
  color: #cbd5e1;
}

/* Tide cell */
.wind-tide-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 0;
  text-align: right;
}

/* Normaal uur: pijl + hoogte volgend keerpunt */
.wind-tide-dir {
  font-size: 0.85rem;
  color: #334155;
  line-height: 1.1;
}

.wind-tide-level {
  font-size: 0.68rem;
  color: #475569;
  white-space: nowrap;
}

/* Keerpuntuur: HW of LW met tijd */
.wind-tide-tp {
  gap: 0;
}

.wind-tide-tp-icon {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
}

.wind-tide-hw { color: #16a34a; }   /* groen voor hoogwater */
.wind-tide-lw { color: #0891b2; }   /* blauw voor laagwater */

/* Keerpuntuur rij: pijl + HW/LW label naast elkaar */
.wind-tide-tp-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
}

.wind-tide-tp-label {
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 1;
}

.wind-tide-tp-time {
  font-size: 0.65rem;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
  line-height: 1.2;
}

.wind-tide-tp-level {
  font-size: 0.68rem;
  color: #475569;
  white-space: nowrap;
}

/* Geen tide data (buiten bereik RWS) */
.wind-tide-na {
  font-size: 0.8rem;
  color: #94a3b8;
}

/* ============================================================
   SPLIT LAYOUT — layouts 2 & 3 (geen getijden)
   Elke kolom is een apart grid-kind: tijd | richting | wind | vlagen | icoon | °C | [golven]
   ============================================================ */

/* Layout 3: geen golven, geen getijden — richting kolom auto (past aan NNW tekst) */
#windContent:not(.wind-has-waves):not(.wind-has-tides) .wind-table-header,
#windContent:not(.wind-has-waves):not(.wind-has-tides) .wind-row {
  grid-template-columns: 36px auto 1fr 1fr 26px 34px;
  justify-content: initial;
  gap: 0 10px;
}

/* Layout 2: golven, geen getijden */
#windContent.wind-has-waves:not(.wind-has-tides) .wind-table-header,
#windContent.wind-has-waves:not(.wind-has-tides) .wind-row {
  grid-template-columns: 36px 52px 1fr 1fr 26px 34px 44px;
  justify-content: initial;
  gap: 0 6px;
}

/* Richting cel: pijl + NNW tekst naast elkaar */
.wind-dir-split {
  display: flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

/* NNW tekst */
.wind-dir-text-split {
  font-size: 0.65rem;
  font-weight: 700;
  color: #1e293b;
  min-width: 27px;
  letter-spacing: 0;
}

/* Kolomkop richting */
.wind-dir-header-split {
  font-size: 0.65rem;
}

/* Pijl als kind van wind-dir-split */
.wind-dir-arrow-split {
  display: block;
  width: 18px;
  height: 18px;
  color: #1e293b;
  flex-shrink: 0;
}

/* Wind-kolom (alleen snelheid, geen vlagen) — gecentreerd */
.wind-speed-split {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}
.wind-speed-split > * + * { margin-left: 3px; }

/* Vlagen-kolom (alleen gusts) — gecentreerd */
.wind-gust-split {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}
.wind-gust-split > * + * { margin-left: 3px; }

/* Kolomkoppen uitlijning split layout */
#windContent:not(.wind-has-tides) .wind-table-header span:nth-child(3),
#windContent:not(.wind-has-tides) .wind-table-header span:nth-child(4) {
  text-align: center;
}
#windContent:not(.wind-has-tides) .wind-table-header span:nth-child(7) {
  text-align: right;
}

/* Wind color scale: 11 stappen — paars → blauw → cyaan → groen → geel → oranje → rood → donkerrood */
.wind-color-0  { background: #94a3b8; }    /* 0-5 kts   - nauwelijks (grijs) */
.wind-color-1  { background: #38bdf8; }    /* 6-9 kts   - licht (lichtblauw) */
.wind-color-2  { background: #0ea5e9; }    /* 10-13 kts - matig (blauw) */
.wind-color-3  { background: #06b6d4; }    /* 14-17 kts - fris (cyaan) */
.wind-color-4  { background: #22c55e; }    /* 18-21 kts - goed (groen) */
.wind-color-5  { background: #16a34a; }    /* 22-25 kts - sterk (donkergroen) */
.wind-color-6  { background: #facc15; }    /* 26-29 kts - zeer sterk (geel) */
.wind-color-7  { background: #fb923c; }    /* 30-33 kts - waarschuwing (oranje) */
.wind-color-8  { background: #ef4444; }    /* 34-39 kts - storm (rood) */
.wind-color-9  { background: #b91c1c; }    /* 40-47 kts - zware storm (donkerrood) */
.wind-color-10 { background: #7f1d1d; }    /* 48+ kts   - extreem (zeer donkerrood) */

/* Row backgrounds */
.wind-row-bg-0  { background: #f1f5f9; }    /* grijs */
.wind-row-bg-1  { background: #e0f2fe; }    /* lichtblauw */
.wind-row-bg-2  { background: #bae6fd; }    /* blauw */
.wind-row-bg-3  { background: #a5f3fc; }    /* cyaan */
.wind-row-bg-4  { background: #bbf7d0; }    /* groen */
.wind-row-bg-5  { background: #86efac; }    /* donkergroen */
.wind-row-bg-6  { background: #fef08a; }    /* geel */
.wind-row-bg-7  { background: #fed7aa; }    /* oranje */
.wind-row-bg-8  { background: #fecaca; }    /* rood */
.wind-row-bg-9  { background: #fca5a5; }    /* donkerrood */
.wind-row-bg-10 { background: #f87171; }    /* extreem */

/* Left color accent per row — zelfde kleuren als wind-color-X dots */
.wind-row-bg-0  { border-left: 3px solid #94a3b8; }  /* grijs */
.wind-row-bg-1  { border-left: 3px solid #38bdf8; }  /* lichtblauw */
.wind-row-bg-2  { border-left: 3px solid #0ea5e9; }  /* blauw */
.wind-row-bg-3  { border-left: 3px solid #06b6d4; }  /* cyaan */
.wind-row-bg-4  { border-left: 3px solid #22c55e; }  /* groen */
.wind-row-bg-5  { border-left: 3px solid #16a34a; }  /* donkergroen */
.wind-row-bg-6  { border-left: 3px solid #facc15; }  /* geel */
.wind-row-bg-7  { border-left: 3px solid #fb923c; }  /* oranje */
.wind-row-bg-8  { border-left: 3px solid #ef4444; }  /* rood */
.wind-row-bg-9  { border-left: 3px solid #b91c1c; }  /* donkerrood */
.wind-row-bg-10 { border-left: 3px solid #7f1d1d; }  /* extreem */

/* Wind speed value altijd zwart */

/* Text colors on tinted rows — cyan/green */


.wind-row-bg-3 .wind-gust-value,
.wind-row-bg-3 .wind-sep { color: #0e7490; }
.wind-row-bg-4 .wind-gust-value,
.wind-row-bg-4 .wind-sep { color: #166534; }
.wind-row-bg-5 .wind-gust-value,
.wind-row-bg-5 .wind-sep { color: #4d5c0a; }





/* Text colors on tinted rows — yellow/orange/red/extreme */


.wind-row-bg-7 .wind-gust-value,
.wind-row-bg-7 .wind-sep { color: #854d0e; }
.wind-row-bg-8 .wind-gust-value,
.wind-row-bg-8 .wind-sep { color: #9a3412; }
.wind-row-bg-9 .wind-gust-value,
.wind-row-bg-9 .wind-sep,
.wind-row-bg-10 .wind-gust-value,
.wind-row-bg-10 .wind-sep { color: #991b1b; }





/* wind-speed-unit (kts) kleur op gekleurde rijen */
.wind-row-bg-3 .wind-speed-unit { color: #0e7490; }
.wind-row-bg-4 .wind-speed-unit { color: #14532d; }
.wind-row-bg-5 .wind-speed-unit { color: #4d5c0a; }
.wind-row-bg-6 .wind-speed-unit { color: #7a6800; }
.wind-row-bg-7 .wind-speed-unit { color: #854d0e; }
.wind-row-bg-8 .wind-speed-unit { color: #9a3412; }
.wind-row-bg-9 .wind-speed-unit,
.wind-row-bg-10 .wind-speed-unit { color: #991b1b; }

/* Hourly detail expansion */
.wind-hourly-detail {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  overflow: hidden;
  animation: windFadeIn 0.15s ease-out;
}

@keyframes windFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}



/* Attribution */
.wind-spot-info {
  display: flex;
  flex-direction: column;
  padding: 8px 16px;
  background: white;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.78rem;
  color: #64748b;
}
* Attribution */
.wind-spot-info > * + * { margin-top: 2px; }

/* Wind button — gedefinieerd in index.html <style> bij popup CSS */

.surfspot-wind-btn i { width: 14px; height: 14px; }
.surfspot-wind-btn:active { opacity: 0.8; }

/* V42: Mid Aspect card gradient */
.calc-result-mid {
  background: linear-gradient(135deg, #0d6960 0%, #14b8a6 100%);
}

/* ============================================
   VIN & FOIL CALCULATOR
   ============================================ */

.calc-field {
  margin-bottom: 0.75rem;
}

.calc-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 0.375rem;
}

.calc-select,
.calc-input {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 2rem;
  font-size: 0.9375rem;
  background: rgba(255,255,255,0.6);
  color: #0f172a;
  -webkit-appearance: none;
  box-sizing: border-box;
}

.calc-select:focus,
.calc-input:focus {
  outline: none;
  border-color: #0891b2;
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1);
}

.calc-btn-row {
  display: flex;
  }
.calc-btn-row > * + * { margin-left: 0.375rem; }

.calc-btn {
  flex: 1;
  padding: 0.625rem 0.25rem;
  border: 2px solid #e2e8f0;
  border-radius: 2rem;
  background: rgba(255,255,255,0.6);
  color: #64748b;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.15s ease;
  letter-spacing: 0.3px;
}

.calc-btn.active {
  border-color: #0891b2;
  background: #ecfeff;
  color: #0891b2;
  box-shadow: inset 0 0 0 1px #0891b2;
}

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

.calc-weed-toggle {
  display: flex;
  align-items: center;
  background: #f0f7e6;
  padding: 0.75rem 1rem;
  border-radius: 2rem;
  border: 1px solid #c5e1a5;
  margin-bottom: 0.75rem;
}
.calc-weed-toggle > * + * { margin-left: 0.625rem; }

.calc-weed-toggle input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  cursor: pointer;
  flex-shrink: 0;
  accent-color: #689f38;
}

.calc-weed-label {
  display: flex;
  align-items: center;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #558b2f;
  cursor: pointer;
  margin: 0;
}
.calc-weed-label > * + * { margin-left: 0.375rem; }

.calc-warning {
  display: flex;
  align-items: flex-start;
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  padding: 0.75rem 1rem;
  border-radius: 0 0.5rem 0.5rem 0;
  font-size: 0.8125rem;
  color: #92400e;
  margin-bottom: 1rem;
}
.calc-warning > * + * { margin-left: 0.5rem; }

.calc-results {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.625rem;
  margin: 1rem 0;
}

.calc-result-card {
  padding: 1.25rem 0.75rem;
  border-radius: 2rem;
  color: white;
  text-align: center;
}

.calc-result-std {
  background: linear-gradient(135deg, #0f766e 0%, #2dd4bf 100%);
}

.calc-result-perf {
  background: linear-gradient(135deg, #115e59 0%, #0d9488 100%);
}

.calc-result-label {
  font-size: 0.625rem;
  text-transform: uppercase;
  font-weight: 700;
  opacity: 0.9;
  letter-spacing: 0.5px;
}

.calc-result-value {
  margin: 0.375rem 0;
  line-height: 1;
}

.calc-result-value span:first-child {
  font-size: 2.75rem;
  font-weight: 900;
}

.calc-result-unit {
  font-size: 1.25rem;
  font-weight: 800;
  margin-left: 2px;
}

.calc-result-sub {
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.15);
  padding: 0.25rem 0.75rem;
  border-radius: 2rem;
  display: inline-block;
  margin-top: 0.375rem;
}

.calc-disclaimer {
  display: flex;
  align-items: flex-start;
  background: rgba(255,255,255,0.4);
  border-radius: 0.625rem;
  padding: 0.75rem;
  margin-top: 1rem;
}
.calc-disclaimer > * + * { margin-left: 0.5rem; }

.calc-disclaimer p {
  font-size: 0.6875rem;
  color: #64748b;
  line-height: 1.5;
  margin: 0;
}

.calc-disclaimer i {
  color: #94a3b8;
}

/* Calculator responsive: small phones */
@media (max-width: 359px) {
  .calc-results {
    grid-template-columns: 1fr;
  }
  .calc-result-value span:first-child {
    font-size: 2.25rem;
  }
  .calc-btn {
    font-size: 0.625rem;
    padding: 0.5rem 0.125rem;
  }
}

/* ============================================
   TABLET & DESKTOP LAYOUT
   App-frame centered on larger screens
   ============================================ */

/* Shared: all screens >= 768px (iPad + desktop) */
@media screen and (min-width: 768px) {
  body {
    background: #0f172a;
    display: flex;
    justify-content: center;
  }
  
  .app-container {
    max-width: 500px;
    width: 100%;
    position: relative;
    background: linear-gradient(180deg, #eaf2fb 0%, #dbeafe 100%);
    box-shadow: 0 0 80px rgba(8, 145, 178, 0.15), 0 0 0 1px rgba(255,255,255,0.06);
  }
  
  /* All full-screen overlays: constrain to app width */
  .welcome-screen,
  .session-setup-page,
  .summary-modal,
  .auth-modal,
  .session-detail-modal,
  .sharing-started-modal,
  .surfer-detail-overlay,
  .wind-info-popup,
  .stop-session-modal {
    max-width: 500px;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%);
    width: 100%;
  }
  
  /* FAB buttons: keep inside app frame */
  .active-session-fab {
    right: calc(50vw - 250px + 16px) !important;
  }
}

/* Desktop (laptops & monitors): phone-frame look */
@media screen and (min-width: 1024px) {
  .app-container {
    max-width: 480px;
    border-radius: 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    height: calc(100vh - 3rem);
    height: calc(100dvh - 3rem);
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255,255,255,0.08);
  }
  
  .header {
    border-radius: 1.25rem 1.25rem 0 0;
  }
  
  .bottom-tab-bar {
    border-radius: 0 0 1.25rem 1.25rem;
    padding-bottom: 8px;
  }
  
  /* Overlays match the phone frame */
  .welcome-screen,
  .session-setup-page,
  .summary-modal,
  .auth-modal,
  .session-detail-modal,
  .sharing-started-modal,
  .surfer-detail-overlay,
  .wind-info-popup,
  .stop-session-modal {
    max-width: 480px;
    border-radius: 1.25rem;
    overflow: hidden;
  }
  
  .active-session-fab {
    right: calc(50vw - 240px + 16px) !important;
    bottom: calc(56px + 8px + 60px + 1.5rem) !important;
  }
  
  .session-setup-trigger {
    bottom: calc(56px + 8px + 14px + 1.5rem) !important;
  }
}

/* Wide desktop: branding beside the app frame */
@media screen and (min-width: 1280px) {
  body::before {
    content: 'RigSize Live';
    position: fixed;
    top: 50%;
    left: calc(50% - 310px);
    transform: translate(-100%, -50%);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #0891b2, #2563eb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.5;
    pointer-events: none;
  }

  body::after {
    content: 'Share rigsizes, good surfkarma';
    position: fixed;
    top: calc(50% + 2.25rem);
    left: calc(50% - 310px);
    transform: translate(-100%, -50%);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.875rem;
    color: rgba(255,255,255,0.2);
    pointer-events: none;
  }
}

/* ============================================
   NOTIFICATIE INSTELLINGEN
   ============================================ */
.notif-perm-banner {
  display: flex;
  align-items: center;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 2rem;
  padding: 10px 14px;
  margin-bottom: 1rem;
  font-size: 0.8125rem;
  color: #92400e;
}
* ============================================
   NOTIFICATIE INSTELLINGEN
   ============================================ */
.notif-perm-banner > * + * { margin-left: 8px; }
.notif-perm-banner i { width: 16px; height: 16px; flex-shrink: 0; }

.notif-section {
  margin-bottom: 1.25rem;
}
.notif-section-title {
  display: flex;
  align-items: center;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  padding: 0 4px;
}
.notif-section-title > * + * { margin-left: 6px; }
.notif-section-title i { width: 14px; height: 14px; }

.notif-row {
  display: flex;
  align-items: center;
  padding: 14px 4px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: background 0.15s;
  border-radius: 0.75rem;
}
.notif-row > * + * { margin-left: 12px; }
.notif-row:last-of-type { border-bottom: none; }
.notif-row:active { background: #f8fafc; }

.notif-row-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  border-radius: 50%;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.notif-row-info {
  flex: 1;
  min-width: 0;
}
.notif-row-label {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #0f172a;
}
.notif-row-desc {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 2px;
  line-height: 1.3;
}

/* Notif toggle — zelfde stijl als fav-notif-toggle */
.notif-toggle {
  width: 44px;
  height: 26px;
  background: #cbd5e1;
  border-radius: 13px;
  position: relative;
  flex-shrink: 0;
  transition: background 0.2s;
  cursor: pointer;
}
.notif-toggle.active { background: #0891b2; }
.notif-toggle-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform 0.2s;
}
.notif-toggle.active .notif-toggle-knob { transform: translateX(18px); }

/* Kolomheader boven favoriete spots toggles */
.fav-notif-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 6px;
  margin-bottom: 2px;
}
.fav-notif-column-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #0891b2;
  text-align: right;
  white-space: nowrap;
}

/* ============================================
   ONBOARDING CARD
   ============================================ */
.onboarding-card {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 900;
  background: rgba(255, 255, 255, 0.97);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.06);
}
.onboarding-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 8px;
  border-bottom: 1px solid #f1f5f9;
}
.onboarding-card-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: 0.01em;
}
.onboarding-card-close {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: #94a3b8;
  display: flex;
  align-items: center;
  line-height: 1;
  border-radius: 6px;
  -webkit-tap-highlight-color: transparent;
  min-width: 44px;
  min-height: 44px;
}
.onboarding-card-body {
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  }
.onboarding-card-body > * + * { margin-top: 2px; }
.onboarding-item {
  display: flex;
  align-items: center;
  padding: 9px 8px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.onboarding-item > * + * { margin-left: 10px; }
.onboarding-item:active {
  background: #f1f5f9;
}
.onboarding-item-done {
  cursor: default;
  opacity: 0.6;
}
.onboarding-check {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.onboarding-item-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  }
.onboarding-item-text > * + * { margin-top: 1px; }
.onboarding-item-text strong {
  font-size: 0.82rem;
  color: #0f172a;
  font-weight: 600;
}
.onboarding-item-text span {
  font-size: 0.72rem;
  color: #64748b;
}

/* Amber dot op hamburger menu icoon */
.profile-incomplete-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 9px;
  height: 9px;
  background: #f59e0b;
  border-radius: 50%;
  border: 2px solid white;
  pointer-events: none;
  z-index: 10;
}

/* Amber ⚠️ badge op menu items */
.menu-warning-badge {
  margin-left: auto;
  display: flex;
  align-items: center;
  color: #f59e0b;
  flex-shrink: 0;
}

/* ============================================
   WIND ALARM MODAL
   ============================================ */
.wind-alarm-modal-overlay {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0; /* fallback voor iOS < 14.5 */
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overscroll-behavior: contain;
  animation: fadeIn 0.15s ease;
}
.wind-alarm-modal {
  background: #fff;
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 92vh;
  max-height: 92dvh;
  /* Flex column: inhoud scrollt, footer blijft vast */
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.2s ease;
  -webkit-backdrop-filter: blur(0);
}
/* Scrollbare inhoud boven de knoppen */
.wind-alarm-modal-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px 20px calc(20px + env(safe-area-inset-bottom, 34px));
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}
/* Scroll-indicator: schaduw onderaan verdwijnt als je op het einde bent */
.wind-alarm-modal-scroll-hint {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.wind-alarm-modal-scroll-hint::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 40px;
  background: linear-gradient(to top, rgba(255,255,255,0.95) 0%, transparent 100%);
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 1;
}
.wind-alarm-modal-scroll-hint.at-bottom::after {
  opacity: 0;
}
/* Sticky footer met actieknoppen */
.wind-alarm-modal-footer {
  flex-shrink: 0;
  padding: 10px 20px calc(16px + env(safe-area-inset-bottom, 34px));
  border-top: 1px solid #f1f5f9;
  background: #fff;
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.wind-alarm-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}
.wind-alarm-modal-title {
  display: flex;
  align-items: center;
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}
.wind-alarm-modal-title > * + * { margin-left: 8px; }
.wind-alarm-modal-spot {
  font-size: 0.85rem;
  color: #64748b;
  margin-top: 2px;
  padding-left: 26px;
}
.wind-alarm-close {
  width: 44px; height: 44px;
  border: none; border-radius: 50%;
  background: #f1f5f9; color: #64748b;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.wind-alarm-section {
  margin-bottom: 20px;
}
.wind-alarm-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}
.wind-alarm-knots-row {
  display: flex;
  align-items: center;
  justify-content: center;
  }
.wind-alarm-knots-row > * + * { margin-left: 16px; }
.wind-alarm-step {
  width: 44px; height: 44px;
  border: 2px solid #e2e8f0;
  border-radius: 50%;
  background: #f8fafc;
  font-size: 1.4rem;
  font-weight: 700;
  color: #0f172a;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  -webkit-tap-highlight-color: transparent;
  /* Verwijder 300ms tap delay op Android */
  touch-action: manipulation;
  /* Minimale touch target 44px conform Apple HIG */
  min-width: 44px; min-height: 44px;
}
.wind-alarm-step:active { background: #e2e8f0; }
.wind-alarm-knots-display {
  display: flex;
  align-items: baseline;
  min-width: 80px;
  justify-content: center;
}
.wind-alarm-knots-display > * + * { margin-left: 4px; }
.wind-alarm-knots-display span:first-child {
  font-size: 2.2rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
}
.wind-alarm-unit {
  font-size: 0.9rem;
  font-weight: 600;
  color: #94a3b8;
}
.wind-alarm-bft {
  text-align: center;
  font-size: 0.8rem;
  color: #f59e0b;
  font-weight: 600;
  margin-top: 8px;
}
/* ── Drum-roll picker ── */
.wind-alarm-picker-wrap {
  position: relative;
  height: 144px; /* 3 zichtbare items van 48px */
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 10px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
}
.wind-alarm-picker {
  position: relative;
  height: 100%;
  overflow: hidden;
}
.picker-items {
  height: 100%;
  overflow-y: scroll;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  /* Padding zodat eerste en laatste item centreerbaar zijn */
  padding: 48px 0;
  scrollbar-width: none;
  box-sizing: border-box;
}
.picker-items::-webkit-scrollbar { display: none; }
.picker-item {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  cursor: pointer;
  transition: color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.picker-item-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #94a3b8;
  transition: color 0.15s, font-size 0.15s;
}
.picker-item-rel {
  font-size: 0.72rem;
  color: #cbd5e1;
  transition: color 0.15s;
}
.picker-item.active .picker-item-label {
  color: #0f172a;
  font-size: 1rem;
}
.picker-item.active .picker-item-rel {
  color: #0891b2;
  font-weight: 600;
}
/* Selectie-highlight balk */
.picker-highlight {
  position: absolute;
  top: 50%;
  left: 0; right: 0;
  height: 48px;
  transform: translateY(-50%);
  background: rgba(8, 145, 178, 0.07);
  border-top: 1.5px solid #bae6fd;
  border-bottom: 1.5px solid #bae6fd;
  pointer-events: none;
  z-index: 2;
}
/* Fade boven en onder */
.picker-fade-top, .picker-fade-bottom {
  position: absolute;
  left: 0; right: 0;
  height: 48px;
  pointer-events: none;
  z-index: 3;
}
.picker-fade-top {
  top: 0;
  background: linear-gradient(to bottom, #f8fafc 0%, transparent 100%);
}
.picker-fade-bottom {
  bottom: 0;
  background: linear-gradient(to top, #f8fafc 0%, transparent 100%);
}

/* ── Alarm info uitklapper ── */
.wind-alarm-info-toggle {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  margin-top: 2px;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
}
.wind-alarm-info-header {
  display: flex;
  align-items: center;
  padding: 9px 12px;
  font-size: 0.76rem;
  font-weight: 600;
  color: #64748b;
}
.wind-alarm-info-header > * + * { margin-left: 6px; }
.wind-alarm-info-header span { flex: 1; }
.wind-alarm-info-chevron {
  transition: transform 0.2s;
  flex-shrink: 0;
  color: #94a3b8;
}
.wind-alarm-info-toggle.open .wind-alarm-info-chevron {
  transform: rotate(180deg);
}
.wind-alarm-info-body {
  display: none;
  padding: 0 12px 10px 12px;
  font-size: 0.76rem;
  color: #475569;
  line-height: 1.55;
}
.wind-alarm-info-toggle.open .wind-alarm-info-body { display: block; }
.wind-alarm-info-body p { margin: 0 0 7px 0; }
.wind-alarm-info-body p:last-child { margin-bottom: 0; }
.wind-alarm-info-body ul {
  margin: 3px 0 7px 0;
  padding-left: 15px;
}
.wind-alarm-info-body ul li { margin-bottom: 3px; }
.wind-alarm-actions {
  display: flex;
  margin-top: 4px;
}
.wind-alarm-actions > * + * { margin-left: 10px; }
.wind-alarm-delete {
  display: flex; align-items: center;
  padding: 12px 16px;
  border: 2px solid #fee2e2;
  border-radius: 12px;
  background: #fff;
  color: #ef4444;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.wind-alarm-delete > * + * { margin-left: 6px; }
.wind-alarm-save {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  }
.wind-alarm-save > * + * { margin-left: 6px; }

/* ── Alarm windrichting compass ── */
.wind-alarm-compass-section {
  margin: 0 -20px 20px; /* uitbreken uit modal padding */
}
.wind-alarm-label-opt {
  font-size: 0.72rem;
  font-weight: 400;
  color: #cbd5e1;
  text-transform: none;
  letter-spacing: 0;
  margin-left: 6px;
}
/* Label staat binnen sectie dus wel padding herstellen */
.wind-alarm-compass-section > .wind-alarm-label {
  padding: 0 20px;
  margin-bottom: 10px;
}
.alarm-compass-wrap {
  position: relative;
  width: 100%;
  height: 260px;
  overflow: hidden;
  /* geen touch-action:none op de wrap — scroll moet werken buiten de SVG */
  user-select: none;
  -webkit-user-select: none;
  flex-shrink: 0;
}
.alarm-compass-map-bg {
  position: absolute; inset: 0;
  background-color: #1a4a5e; /* fallback terwijl MapLibre laadt */
}
/* MapLibre container */
#alarmMiniMap {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}
.alarm-compass-map-dim {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.18);
  pointer-events: none;
}
.alarm-compass-svg-wrap {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none; /* wrap zelf: geen events */
}
.alarm-compass-svg {
  width: 240px; height: 240px;
  overflow: visible;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
  /* SVG ontvangt zelf de touch events */
  pointer-events: auto;
  touch-action: none;
  cursor: pointer;
}
.alarm-map-zoom-btns {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  z-index: 10;
}
.alarm-map-zoom-btns > * + * { margin-top: 2px; }
.alarm-map-zoom-btns button {
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,0.9);
  border: none;
  border-radius: 6px;
  font-size: 20px;
  line-height: 1;
  color: #333;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
  -webkit-tap-highlight-color: transparent;
}
.alarm-map-zoom-btns button:active {
  background: rgba(220,220,220,0.95);
}
.alarm-compass-bottom {
  padding: 10px 20px 0;
  display: flex; flex-direction: column;
  }
.alarm-compass-bottom > * + * { margin-top: 8px; }
.alarm-dir-hint {
  display: flex; align-items: center;
  font-size: 0.72rem; color: #94a3b8;
}
.alarm-dir-hint > * + * { margin-left: 5px; }
.alarm-dir-result {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 14px;
  background: #f0f9ff; border: 1.5px solid #bae6fd;
  border-radius: 10px; min-height: 40px;
}
.alarm-dir-result.none {
  background: #f8fafc; border-color: #e2e8f0;
}
.alarm-dir-result-text {
  font-size: 0.82rem; font-weight: 600; color: #0891b2;
}
.alarm-dir-result.none .alarm-dir-result-text { color: #94a3b8; }
.alarm-dir-reset {
  font-size: 0.72rem; color: #94a3b8; background: none; border: none;
  cursor: pointer; padding: 2px 4px; text-decoration: underline;
  flex-shrink: 0; touch-action: manipulation;
}
/* SVG klassen voor de windroos */
.ac-sector-bg {
  fill: rgba(255,255,255,0.07);
  stroke: rgba(255,255,255,0.28);
  stroke-width: 0.8;
}
.ac-sector-selected {
  fill: rgba(8,145,178,0.78);
  stroke: rgba(255,255,255,0.55);
  stroke-width: 0.8;
}
.ac-dir-label {
  font-size: 9px; font-weight: 700;
  fill: rgba(255,255,255,0.82);
  text-anchor: middle; dominant-baseline: middle;
  pointer-events: none; user-select: none;
}
.ac-dir-label-cardinal {
  font-size: 11px; font-weight: 800;
  fill: #fff;
}
.ac-dir-label-selected { fill: #fff; }
.ac-compass-center {
  fill: rgba(255,255,255,0.12);
  stroke: rgba(255,255,255,0.25);
  stroke-width: 1.5;
}
.ac-compass-center-text {
  font-size: 11px; font-weight: 800;
  fill: #fff;
  text-anchor: middle; dominant-baseline: middle;
  pointer-events: none; user-select: none;
}
.fav-alarm-btn {
  width: 36px; height: 36px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  color: #94a3b8;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  margin-right: 6px;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}
.fav-alarm-btn.active {
  border-color: #f59e0b;
  background: #fffbeb;
  color: #f59e0b;
}

/* ============================================
   WIND ALERTS PAGINA
   ============================================ */
/* ============================================
   SUBPAGE HEADER — A1 stijl (wit, teal cirkel)
   Gebruikt op: Gear, Groepsplanning, Insights,
   Wind Alerts, Favoriete Spots
   ============================================ */
.subpage-header {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  background: #ffffff;
  border-bottom: 1px solid rgba(186,230,253,0.6);
  flex-shrink: 0;
}
/* margin-left op h2 zelf — hogere specificiteit dan > * + * */
.subpage-header h2 {
  flex: 1;
  margin: 0 0 0 10px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Actie-icons rechts (bel, etc.) krijgen kleine buffer */
.subpage-header > * + *:not(h2) { margin-left: 8px; }
.subpage-back-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid #0d9488;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  color: #0d9488;
}
.subpage-back-btn svg {
  width: 16px;
  height: 16px;
  stroke: #0d9488;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.subpage-back-btn:active { background: rgba(13,148,136,0.08); }

/* Subpage content wrapper — scrollbare achtergrond */
.subpage-content {
  flex: 1;
  overflow-y: auto;
  padding: 12px 12px calc(72px + env(safe-area-inset-bottom, 34px));
  background: linear-gradient(180deg, #eaf2fb 0%, #dbeafe 100%);
}

/* Subpage card — wit blokje op blauwe achtergrond */
.subpage-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 10px;
}

.wind-alerts-page {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: transparent;
}
.wind-alerts-header {
  display: flex;
  align-items: center;
  padding: 14px 12px 12px;
  background: transparent;
  border-bottom: 1px solid rgba(186,230,253,0.5);
  flex-shrink: 0;
}
.wind-alerts-header > * + * { margin-left: 10px; }
.wind-alerts-header h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  flex: 1;
}
.wind-alerts-header .wa-bell-icon {
  color: #f59e0b;
  flex-shrink: 0;
}
.wind-alerts-intro {
  font-size: 0.78rem;
  color: #64748b;
  padding: 8px 12px 10px;
  background: transparent;
  border-bottom: 1px solid rgba(186,230,253,0.5);
  line-height: 1.45;
}
.wind-alerts-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 12px calc(72px + env(safe-area-inset-bottom, 34px));
  /* Geen flex — block layout voorkomt collapse van kaarten */
}
.wind-alerts-list .wa-spot-row,
#windAlertsPanelList .wa-spot-row {
  margin-bottom: 8px;
}
.wa-spot-row {
  background: #fff;
  border-radius: 14px;
  padding: 12px 14px 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background 0.15s;
  overflow: hidden;
}
.wa-spot-row > * + * { margin-left: 8px; }
.wa-spot-row:active { background: #f8fafc; }
.wa-spot-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.wa-spot-info > * + * { margin-top: 3px; }
.wa-spot-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
}
.wa-spot-province {
  font-size: 0.75rem;
  color: #94a3b8;
}
.wa-alarm-active {
  margin-top: 3px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #f59e0b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wa-alarm-none {
  margin-top: 3px;
  font-size: 0.75rem;
  color: #cbd5e1;
}
.wind-alerts-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 24px;
  text-align: center;
  color: #94a3b8;
  font-size: 0.9rem;
}
.wind-alerts-empty > * + * { margin-top: 10px; }
.wind-alerts-empty p {
  font-size: 0.8rem;
  color: #cbd5e1;
  margin: 0;
}

/* Badge in menu voor actieve alarms */
.menu-item-badge {
  margin-left: auto;
  background: #f59e0b;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 10px;
  padding: 1px 7px;
  min-width: 18px;
  text-align: center;
}

/* Gecombineerde auth + email rij */
.auth-email-row { margin-bottom: 4px; }
.auth-email-logged-in { display: flex; align-items: center;
  padding: 10px 14px; border-radius: 12px; background: #f0fdf4; border: 1px solid #bbf7d0; }
.auth-email-logged-in > * + * { margin-left: 8px; }
.auth-email-text { flex: 1; font-size: 0.82rem; font-weight: 600; color: #15803d; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-email-logged-out { display: flex; align-items: center;
  padding: 10px 14px; border-radius: 12px; background: #fffbeb; border: 1px solid #fde68a; font-size: 0.82rem; color: #92400e; }
.auth-email-logged-out > * + * { margin-left: 8px; }
.auth-email-logged-out span { flex: 1; }
.auth-email-checking { display: flex; align-items: center;
  padding: 10px 14px; border-radius: 12px; background: #f1f5f9; font-size: 0.82rem; color: #94a3b8; }
.auth-email-checking > * + * { margin-left: 8px; }
.auth-login-inline-btn { background: #0891b2; color: #fff; border: none; border-radius: 8px; padding: 4px 10px; font-size: 0.75rem; font-weight: 600; cursor: pointer; }

/* ── Wind Alerts info uitklapper ── */
.wa-info-toggle {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 12px;
  margin: 0 0 12px 0;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
}
.wa-info-toggle-header {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #0369a1;
}
.wa-info-toggle-header > * + * { margin-left: 7px; }
.wa-info-toggle-header span { flex: 1; }
.wa-info-chevron {
  transition: transform 0.2s;
  flex-shrink: 0;
  color: #0369a1;
}
.wa-info-toggle.open .wa-info-chevron { transform: rotate(180deg); }
.wa-info-body {
  display: none;
  padding: 0 14px 12px 14px;
  font-size: 0.78rem;
  color: #334155;
  line-height: 1.55;
}
.wa-info-toggle.open .wa-info-body { display: block; }
.wa-info-body p { margin: 0 0 8px 0; }
.wa-info-body p:last-child { margin-bottom: 0; }
.wa-info-body ul {
  margin: 4px 0 8px 0;
  padding-left: 16px;
}
.wa-info-body ul li { margin-bottom: 3px; }

/* ============================================
   TUTORIAL OVERLAY
   ============================================ */
.tutorial-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.tutorial-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.tutorial-sheet {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  background: white;
  border-radius: 24px 24px 0 0;
  padding: 20px 20px 36px;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.2);
  animation: tutorialSlideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes tutorialSlideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
.tutorial-header {
  text-align: center;
  padding: 4px 40px 16px;
}
.tutorial-sheet-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e293b;
}
.tutorial-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f1f5f9;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
}
.tutorial-card-viewport {
  overflow: hidden;
  border-radius: 16px;
  margin-bottom: 14px;
}
.tutorial-card {
  border-radius: 16px;
  padding: 20px 16px;
  text-align: center;
}
@keyframes tutSlideInRight {
  from { transform: translateX(60px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
@keyframes tutSlideInLeft {
  from { transform: translateX(-60px); opacity: 0; }
  to   { transform: translateX(0);     opacity: 1; }
}
.tutorial-slide-in-right { animation: tutSlideInRight 0.28s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.tutorial-slide-in-left  { animation: tutSlideInLeft  0.28s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.tutorial-step-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.tutorial-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}
.tutorial-icon-wrap svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
}
.tutorial-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
}
.tutorial-card-desc {
  font-size: 0.85rem;
  color: #475569;
  line-height: 1.5;
}
.tutorial-card-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  background: rgba(8,145,178,0.08);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.78rem;
  color: #0891b2;
  font-weight: 500;
  font-family: inherit;
  text-align: center;
}
.tutorial-card-hint > * + * { margin-left: 5px; }
.tutorial-dots {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}
.tutorial-dots > * + * { margin-left: 6px; }
.tutorial-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e2e8f0;
  transition: all 0.2s;
}
.tutorial-dot.active {
  width: 20px;
  border-radius: 4px;
}
.tutorial-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  }
.tutorial-nav > * + * { margin-left: 12px; }
.tutorial-btn-skip {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 8px 0;
}
.tutorial-btn-next {
  flex: 1;
  max-width: 200px;
  padding: 12px 20px;
  border-radius: 12px;
  border: none;
  color: white;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s;
}
.tutorial-btn-next > * + * { margin-left: 6px; }
.tutorial-btn-next:active { opacity: 0.8; }
.map-help-toggle { color: #0891b2 !important; }

/* ============================================
   VRIENDEN SYSTEEM — CSS
   ============================================ */

/* Volg-knop (overal) */
.follow-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  border: 1.5px solid #3b82f6;
  color: #3b82f6;
  background: transparent;
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
  min-height: 36px;
  box-sizing: border-box;
}
* ============================================
   VRIENDEN SYSTEEM — CSS
   ============================================ */

/* Volg-knop (overal) */
.follow-btn > * + * { margin-left: 4px; }
.follow-btn i { width: 12px; height: 12px; }
@media (hover: hover) {
  .follow-btn:hover { background: #eff6ff; }
}
.follow-btn.following {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
}
@media (hover: hover) {
  .follow-btn.following:hover {
    background: #ef4444;
    border-color: #ef4444;
  }
}
.follow-btn:disabled { opacity: 0.6; pointer-events: none; }

/* Map popup follow wrap */
.popup-follow-wrap {
  padding: 6px 0 2px;
  border-top: 1px solid #f1f5f9;
}

/* Leaderboard follow wrap */
.lb-row-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  }
* Leaderboard follow wrap */
.lb-row-right > * + * { margin-top: 5px; }
.lb-follow-wrap { }

/* Surfer detail modal actie-knoppen */
.surfer-detail-actions {
  display: flex;
  flex-direction: column;
  margin-top: 12px;
}
* Surfer detail modal actie-knoppen */
.surfer-detail-actions > * + * { margin-top: 10px; }

/* Chat tabs */
.chat-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 12px;
}
.chat-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #94a3b8;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.chat-tab > * + * { margin-left: 6px; }
.chat-tab i { width: 15px; height: 15px; }
.chat-tab.active {
  color: #3b82f6;
  border-bottom-color: #3b82f6;
}
.chat-friends-count {
  background: #3b82f6;
  color: white;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 6px;
  min-width: 18px;
  text-align: center;
}

/* Vrienden feed */
.friends-feed-container {
  padding: 4px 0;
  overflow-x: hidden;
  width: 100%;
}
.friends-feed-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
  overflow: hidden;
  word-break: break-word;
  width: 100%;
  box-sizing: border-box;
}
.friends-feed-header {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}
.friends-feed-header > * + * { margin-left: 9px; }
.friends-feed-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.friends-feed-avatar-placeholder {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.friends-feed-meta {
  flex: 1;
  min-width: 0;
}
.friends-feed-name {
  display: block;
  font-weight: 700;
  font-size: 0.88rem;
  color: #1e293b;
}
.friends-feed-spot {
  display: block;
  font-size: 0.75rem;
  color: #3b82f6;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.friends-feed-time {
  font-size: 0.72rem;
  color: #94a3b8;
  white-space: nowrap;
  flex-shrink: 0;
}
.friends-feed-text {
  font-size: 0.88rem;
  color: #334155;
  line-height: 1.45;
  margin-bottom: 8px;
  white-space: pre-wrap;
  word-break: break-word;
}
.friends-feed-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
}
.friends-feed-reply-btn {
  display: inline-flex;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: #3b82f6;
  background: #eff6ff;
  border: none;
  border-radius: 8px;
  padding: 5px 10px;
  cursor: pointer;
  transition: background 0.15s;
  min-height: 44px;
}
.friends-feed-reply-btn > * + * { margin-left: 5px; }
.friends-feed-reply-btn i { width: 13px; height: 13px; }
@media (hover: hover) {
  .friends-feed-reply-btn:hover { background: #dbeafe; }
}

.friends-feed-load-more {
  display: block;
  width: 100%;
  padding: 12px;
  margin-top: 4px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  color: #3b82f6;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}
@media (hover: hover) {
  .friends-feed-load-more:hover { background: #eff6ff; border-color: #3b82f6; }
}

.friends-feed-empty {
  text-align: center;
  padding: 3rem 1.5rem;
  color: #94a3b8;
}
.friends-feed-empty i { width: 40px; height: 40px; margin-bottom: 12px; opacity: 0.4; display: block; margin-left: auto; margin-right: auto; }
.friends-feed-empty p { margin: 4px 0; font-size: 0.9rem; }
.friends-feed-hint { font-size: 0.8rem !important; opacity: 0.75; }

/* Vrienden beheer in settings */
.friends-settings-info {
  font-size: 0.82rem;
  color: #64748b;
  margin-bottom: 14px;
  line-height: 1.5;
}
.friends-list { display: flex; flex-direction: column;
  }
.friends-list > * + * { margin-top: 8px; }
.friends-list-item {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  background: #f8fafc;
  border-radius: 10px;
}
.friends-list-item > * + * { margin-left: 10px; }
.friends-list-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.friends-list-avatar-placeholder {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.friends-list-name {
  flex: 1;
  font-size: 0.88rem;
  font-weight: 600;
  color: #1e293b;
}
.friends-unfollow-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid #ef4444;
  color: #ef4444;
  background: transparent;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}
@media (hover: hover) {
  .friends-unfollow-btn:hover { background: #fef2f2; }
}
.friends-unfollow-btn i { width: 14px; height: 14px; }
.friends-empty-list {
  font-size: 0.85rem;
  color: #94a3b8;
  text-align: center;
  padding: 1rem;
}

/* Vrienden pagina — tabs */
.friends-tabs {
  display: flex;
  margin-bottom: 16px;
}
* Vrienden pagina — tabs */
.friends-tabs > * + * { margin-left: 8px; }
.friends-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 9px 12px;
  border: none;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
  background: #f1f5f9;
  cursor: pointer;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.friends-tab > * + * { margin-left: 6px; }
.friends-tab.active {
  background: #0891b2;
  color: white;
}
.friends-tab.active .friends-following-count {
  background: rgba(255,255,255,0.3);
  color: white;
}

/* Vrienden pagina — zoekbalk + resultaten */
.friends-search-section {
  margin-bottom: 24px;
}
.friends-following-section {
  margin-bottom: 8px;
}
.friends-following-count {
  margin-left: 6px;
  background: #3b82f6;
  color: white;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 7px;
}
.friends-search-bar {
  position: relative;
  margin-top: 10px;
  margin-bottom: 8px;
}
.friends-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #94a3b8;
  pointer-events: none;
}
.friends-search-input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.88rem;
  color: #1e293b;
  background: #f8fafc;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s;
}
.friends-search-input:focus {
  border-color: #3b82f6;
  background: white;
}
.friends-search-results {
  display: flex;
  flex-direction: column;
  }
.friends-search-results > * + * { margin-top: 6px; }
.friends-search-result-item {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 10px;
}
.friends-search-result-item > * + * { margin-left: 10px; }
.friends-search-loading {
  text-align: center;
  padding: 12px;
  color: #94a3b8;
}

/* ============================================
   AVATAR DROPDOWN — profiel / instellingen / uitloggen
   ============================================ */

.avatar-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: white;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.16), 0 2px 8px rgba(0,0,0,0.08);
  min-width: 210px;
  z-index: 9999;
  overflow: hidden;
  padding: 6px;
  animation: ddFadeIn 0.15s ease;
}

@keyframes ddFadeIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.avatar-dd-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 10px 12px;
  border: none;
  background: transparent;
  border-radius: 9px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #1e293b;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s;
}
.avatar-dd-item > * + * { margin-left: 11px; }

.avatar-dd-item i,
.avatar-dd-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #64748b;
}

.avatar-dd-item:hover {
  background: #f1f5f9;
}

.avatar-dd-divider {
  height: 1px;
  background: #e2e8f0;
  margin: 4px 6px;
}

.avatar-dd-logout {
  color: #ef4444;
}
.avatar-dd-logout i,
.avatar-dd-logout svg {
  color: #ef4444;
}
.avatar-dd-logout:hover {
  background: #fef2f2;
}

/* De header-actions container moet position:relative hebben voor de dropdown */
.header-actions {
  position: relative;
}

/* Kruisje in vrienden zoekveld */
.friends-search-bar {
  position: relative;
}
.friends-search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: #cbd5e1;
  border: none;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  color: white;
  transition: background 0.15s;
}
.friends-search-clear i { width: 11px; height: 11px; }
.friends-search-clear:hover { background: #94a3b8; }
.friends-search-input { padding-right: 34px; }

/* ============================================
   GARMIN KOPPELING
   ============================================ */
.garmin-tag-logo {
  height: 18px;
  width: auto;
  object-fit: contain;
}
.garmin-connection-box {
  margin-top: 8px;
}
.garmin-status-loading {
  display: flex;
  align-items: center;
  color: #64748b;
  font-size: 14px;
  padding: 12px 0;
}
.garmin-status-loading > * + * { margin-left: 8px; }
.garmin-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0,0,0,0.1);
  border-top-color: #0891b2;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
.garmin-connected {
  display: flex;
  flex-direction: column;
  }
.garmin-connected > * + * { margin-top: 12px; }
.garmin-connected-info {
  display: flex;
  align-items: center;
  padding: 10px 0;
}
.garmin-connected-info > * + * { margin-left: 10px; }
.garmin-status-text {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: #10b981;
}
.garmin-status-date {
  display: block;
  font-size: 12px;
  color: #94a3b8;
  margin-top: 2px;
}
.garmin-disconnect-btn {
  font-size: 13px;
  padding: 8px 14px;
  border: 1px solid #ef4444;
  color: #ef4444;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
}
.garmin-disconnect-btn > * + * { margin-left: 6px; }
.garmin-disconnect-btn:active {
  background: #fef2f2;
}
.garmin-disconnected {
  padding: 8px 0;
}
.garmin-desc {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 12px;
  line-height: 1.5;
}
.garmin-connect-btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  background: #fff;
  color: #1e293b;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s;
}
.garmin-connect-btn > * + * { margin-left: 10px; }
.garmin-connect-btn:active {
  border-color: #0891b2;
  background: #f8fafc;
}
.garmin-btn-logo {
  height: 16px;
  width: auto;
  object-fit: contain;
}

.garmin-backfill-period-btn {
  padding: 6px 12px;
  border-radius: 20px;
  border: 1.5px solid #e5e7eb;
  background: #f9fafb;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: #374151;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.garmin-backfill-period-btn.active {
  background: #0891b2;
  color: #fff;
  border-color: #0891b2;
}
.garmin-backfill-import-btn {
  width: 100%;
  padding: 10px 16px;
  border-radius: 10px;
  border: none;
  background: #0891b2;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.garmin-backfill-import-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

/* ============================================
   IK BOTTOM SHEET
   ============================================ */
#ikView {
  display: flex; flex-direction: column;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: linear-gradient(180deg, #eaf2fb 0%, #dbeafe 100%);
}
.ik-page-header {
  padding: 20px 16px 12px;
  background: transparent;
}
.ik-page-header h2 {
  font-size: 22px; font-weight: 700;
  color: var(--color-text-primary, #0f172a);
  margin: 0;
}
.ik-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px; padding: 0 16px 20px;
}
.ik-tile {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center;
  background: var(--color-background-secondary, #f8fafc);
  border: 0.5px solid var(--color-border-tertiary, #e2e8f0);
  border-radius: 16px;
  padding: 20px 12px;
  cursor: pointer; min-height: 100px;
  transition: background 0.15s;
  position: relative;
  color: #3b82f6;
  /* iOS gap fallback */
  margin-top: 0;
}
.ik-tile .menu-warning-badge {
  position: absolute;
  top: 10px; right: 10px;
  margin-left: 0;
  color: #f59e0b;
}
.ik-tile i { width: 28px; height: 28px; stroke: #3b82f6; color: #3b82f6; margin-bottom: 10px; }
.ik-tile svg { width: 28px; height: 28px; stroke: #3b82f6 !important; color: #3b82f6; margin-bottom: 10px; }
.ik-tile .menu-warning-badge svg { width: 20px; height: 20px; stroke: #f59e0b !important; color: #f59e0b; margin-bottom: 0; }
.ik-tile-label {
  font-size: 13px; font-weight: 600;
  color: var(--color-text-primary, #0f172a);
}
.ik-tile:active { background: var(--color-background-tertiary, #f1f5f9); }
.ik-tile--full {
  grid-column: 1 / -1;
  flex-direction: row;
  min-height: 64px;
  padding: 16px 20px;
}
.ik-tile--full > * + * { margin-left: 10px; }
.ik-tile.ik-tile--soon .ik-tile-label {
  color: var(--color-text-tertiary, #94a3b8);
}
.ik-tile.ik-tile--soon { color: var(--color-text-tertiary, #94a3b8); }
.ik-tile.ik-tile--soon i { stroke: var(--color-text-tertiary, #94a3b8); color: var(--color-text-tertiary, #94a3b8); }
.ik-tile.ik-tile--soon svg { stroke: var(--color-text-tertiary, #94a3b8) !important; color: var(--color-text-tertiary, #94a3b8); }
.ik-tile-soon-badge {
  font-size: 10px; color: var(--color-text-tertiary, #94a3b8);
  margin-top: 4px;
}

/* ============================================ */
/* ANALYSES TAB CARDS                           */
/* ============================================ */
.analyses-list {
  display: flex;
  flex-direction: column;
  padding: 16px 16px 32px;
  flex-shrink: 0;
}
* ============================================ */
/* ANALYSES TAB CARDS                           */
/* ============================================ */
.analyses-list > * + * { margin-top: 12px; }
.analyses-sport-filter {
  display: flex;
  padding: 14px 16px 4px;
  flex-shrink: 0;
}
.analyses-sport-filter > * + * { margin-left: 8px; }
.analyse-card {
  background: var(--color-background-primary, #fff);
  border-radius: 14px;
  border: 0.5px solid var(--color-border-tertiary, #e2e8f0);
  padding: 14px;
}
.analyse-card-head {
  display: flex;
  align-items: flex-start;
  margin-bottom: 8px;
}
.analyse-card-head > * + * { margin-left: 10px; }
.analyse-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.analyse-icon i { width: 18px; height: 18px; stroke-width: 1.8; }
.analyse-icon--blue  { background: #e6f4fa; }
.analyse-icon--blue i  { stroke: #1a7fa8; }
.analyse-icon--green { background: #e8f5e9; }
.analyse-icon--green i { stroke: #2e7d32; }
.analyse-icon--amber { background: #fff8e1; }
.analyse-icon--amber i { stroke: #f59f00; }
.analyse-icon--purple { background: #f3e8ff; }
.analyse-icon--purple i { stroke: #7c3aed; }
.analyse-icon--coral { background: #fde8e4; }
.analyse-icon--coral i { stroke: #c0392b; }
.analyse-card-text { flex: 1; }
.analyse-title {
  font-size: 13px; font-weight: 600;
  color: var(--color-text-primary, #0f172a);
  margin-bottom: 2px;
}
.analyse-desc {
  font-size: 11.5px;
  color: var(--color-text-secondary, #64748b);
  line-height: 1.4;
}
.analyse-note {
  font-size: 10.5px;
  color: #94a3b8;
  margin-top: 6px;
  font-style: italic;
}
.analyse-quote {
  font-size: 12px;
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 8px;
  line-height: 1.45;
  font-style: italic;
}
.analyse-quote--blue   { color: #0d4f7c; background: #e6f4fa; }
.analyse-quote--green  { color: #1b5e20; background: #e8f5e9; }
.analyse-quote--amber  { color: #92400e; background: #fff8e1; }
.analyse-quote--purple { color: #5b21b6; background: #f3e8ff; }
.analyse-quote--coral  { color: #991b1b; background: #fde8e4; }
.analyse-tag {
  display: inline-block;
  font-size: 10px; font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
}
.analyse-tag--blue   { background: #e6f4fa; color: #0d4f7c; }
.analyse-tag--green  { background: #e8f5e9; color: #1b5e20; }
.analyse-tag--amber  { background: #fff8e1; color: #92400e; }
.analyse-tag--purple { background: #f3e8ff; color: #5b21b6; }
.analyse-tag--coral  { background: #fde8e4; color: #991b1b; }

/* ============================================ */
/* RWS Waterinfo station markers                */
/* Blauw kleur om te onderscheiden van KNMI     */
/* ============================================ */
.rws-map-marker-dot {
  border-color: #0369a1 !important;
  color: #0369a1 !important;
  background: rgba(239, 246, 255, 0.85) !important;
}
@media (hover: hover) {
  .rws-map-marker-dot:hover {
    transform: scale(1.2);
    box-shadow: 0 3px 10px rgba(3,105,161,0.4);
  }
}

/* ============================================
   HASHTAG — feed tekst
   ============================================ */
.feed-hashtag {
  color: #3b82f6;
  font-weight: 500;
  cursor: pointer;
  display: inline;
}
.feed-hashtag:hover {
  text-decoration: underline;
}

.feed-card-description {
  font-size: 0.8125rem;
  color: #334155;
  line-height: 1.45;
  margin-bottom: 8px;
  word-break: break-word;
}

/* ============================================
   HASHTAG — leaderboard pagina (slide-over)
   ============================================ */
.hashtag-page {
  position: fixed;
  inset: 0;
  background: #f8fafc;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow: hidden;
}
.hashtag-page.visible {
  transform: translateX(0);
}

.hashtag-page-header {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  min-height: 54px;
}
.hashtag-page-header > * + * { margin-left: 10px; }

.hashtag-back-btn,
.hashtag-share-btn {
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  flex-shrink: 0;
}
.hashtag-back-btn:active,
.hashtag-share-btn:active {
  background: #f1f5f9;
}
.hashtag-back-btn svg,
.hashtag-share-btn svg {
  width: 20px;
  height: 20px;
}

.hashtag-page-title {
  flex: 1;
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hashtag-metric-tabs {
  display: flex;
  padding: 10px 16px 6px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.hashtag-metric-tabs > * + * { margin-left: 6px; }
.hashtag-metric-tabs::-webkit-scrollbar { display: none; }

.hashtag-metric-btn {
  flex-shrink: 0;
  background: #f1f5f9;
  border: none;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.hashtag-metric-btn.active {
  background: #0f172a;
  color: #fff;
}

.hashtag-period-tabs {
  display: flex;
  padding: 8px 16px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}
.hashtag-period-tabs > * + * { margin-left: 6px; }

.hashtag-period-btn {
  flex: 1;
  background: #f1f5f9;
  border: none;
  border-radius: 8px;
  padding: 6px 0;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.hashtag-period-btn.active {
  background: #e2e8f0;
  color: #0f172a;
}

.hashtag-lb-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 16px calc(72px + env(safe-area-inset-bottom, 34px));
}

.hashtag-lb-loading {
  display: flex;
  justify-content: center;
  padding: 40px 0;
}

.hashtag-lb-count {
  font-size: 0.75rem;
  color: #94a3b8;
  text-align: center;
  margin-bottom: 12px;
}

.hashtag-lb-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 0;
  color: #94a3b8;
}
.hashtag-lb-empty > * + * { margin-top: 10px; }
.hashtag-lb-empty svg {
  width: 36px;
  height: 36px;
  opacity: 0.4;
}
.hashtag-lb-empty p {
  font-size: 0.875rem;
  text-align: center;
}

.hashtag-lb-rows {
  display: flex;
  flex-direction: column;
  }
.hashtag-lb-rows > * + * { margin-top: 8px; }

.hashtag-lb-row {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.hashtag-lb-row > * + * { margin-left: 12px; }

.hashtag-lb-rank {
  font-size: 1rem;
  width: 28px;
  text-align: center;
  flex-shrink: 0;
  font-weight: 600;
  color: #64748b;
}

.hashtag-lb-name {
  flex: 1;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hashtag-lb-value {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #3b82f6;
  flex-shrink: 0;
}

/* ============================================
   BRAND PICKER MODAL
   ============================================ */
.brand-picker-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(0,0,0,0);
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  transition: background 0.25s ease;
}
.brand-picker-overlay--visible {
  background: rgba(0,0,0,0.45);
}

.brand-picker-sheet {
  width: 100%;
  background: #fff;
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  height: 65vh;
  max-height: calc(100vh - env(safe-area-inset-top, 44px) - 20px);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  will-change: transform;
}
.brand-picker-sheet--add {
  height: auto;
  max-height: 60vh;
}
.brand-picker-sheet--visible {
  transform: translateY(0);
}

.brand-picker-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 16px 12px 16px;
  padding-top: max(env(safe-area-inset-top, 0px), 16px);
  border-bottom: 1px solid #f1f5f9;
  flex-shrink: 0;
}

.brand-picker-search-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}
.brand-picker-search-icon {
  position: absolute;
  left: 12px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  pointer-events: none;
}
.brand-picker-search {
  width: 100%;
  padding: 10px 12px 10px 38px;
  background: #f1f5f9;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  color: #0f172a;
  outline: none;
  -webkit-appearance: none;
}
.brand-picker-search::placeholder { color: #94a3b8; }

.brand-picker-close {
  background: #f1f5f9;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  color: #64748b;
  padding: 0;
}

.brand-picker-list {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
  padding-bottom: env(safe-area-inset-bottom, 16px);
}

.brand-picker-section-header {
  padding: 10px 16px 6px 16px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #f8fafc;
}

.brand-picker-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.1s;
}
.brand-picker-item--active,
.brand-picker-item:active {
  background: #f0f9ff;
}

.brand-picker-logo {
  width: 52px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-right: 14px;
}
.brand-picker-logo img {
  max-width: 52px;
  max-height: 36px;
  width: auto;
  height: auto;
  object-fit: contain;
}
.brand-picker-logo--add {
  color: #0891b2;
}

.brand-picker-name {
  font-size: 0.9375rem;
  font-weight: 500;
  color: #0f172a;
}

.brand-picker-empty {
  padding: 32px 16px;
  text-align: center;
  color: #94a3b8;
  font-size: 0.9rem;
}

.brand-picker-footer-section {
  margin-top: 8px;
}

/* Pill (na selectie) */
.brand-ac-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.brand-ac-pill {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 8px 10px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 2rem;
  cursor: pointer;
  min-width: 0;
}


/* iPhone SE (320px) - history tabs compacter */
@media (max-width: 360px) {
  .history-tab {
    font-size: 0.68rem;
    padding: 7px 2px;
  }
}