:root {
  --bg: #f6f8f8;
  --panel: rgba(255, 255, 255, 0.94);
  --panel-solid: #ffffff;
  --text: #0f2c49;
  --muted: #65798a;
  --line: #d7e2e8;
  --button: #173453;
  --button-hover: #224d70;
  --water: #d9edf2;
  --shadow: 0 18px 45px rgba(21, 43, 61, 0.13);
  --soft-shadow: 0 10px 26px rgba(21, 43, 61, 0.10);
  --radius: 12px;
  --header-h: 74px;
  --footer-h: 58px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; color: var(--text); background: var(--bg); }
body { overflow: hidden; }
button, select, input, textarea { font: inherit; }

.page-shell { min-height: 100vh; display: grid; grid-template-rows: var(--header-h) minmax(0, 1fr) var(--footer-h); }
.site-header {
  height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 0 38px;
  background: rgba(255,255,255,0.97); border-bottom: 1px solid rgba(23,48,74,0.08); box-shadow: 0 4px 18px rgba(25,55,77,0.05); z-index: 800;
}
.brand { text-decoration: none; color: var(--text); font-size: clamp(20px, 2vw, 30px); font-weight: 850; letter-spacing: -0.025em; white-space: nowrap; }
.main-nav { display: flex; align-items: center; gap: clamp(18px, 2.5vw, 42px); margin-left: auto; }
.main-nav a, .site-footer a { color: var(--text); text-decoration: none; }
.main-nav a { font-size: 14px; font-weight: 800; letter-spacing: 0.01em; white-space: nowrap; }
.main-nav a:hover, .site-footer a:hover { color: var(--button-hover); }
.menu-toggle { display: none; border: 1px solid var(--line); background: var(--panel-solid); color: var(--text); border-radius: 8px; padding: 9px 12px; font-weight: 800; }
.language-switch { display: inline-flex; align-items: center; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,0.72); }
.language-switch button { min-width: 38px; height: 30px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; font-weight: 900; letter-spacing: 0.04em; }
.language-switch button.is-active { background: var(--button); color: #fff; }
.language-switch button:hover { color: var(--text); }
.language-switch button.is-active:hover { color: #fff; }

.map-stage { position: relative; min-height: 0; overflow: hidden; background: linear-gradient(135deg, #e8f4f7, #f8fbfa); }
.map-stage::before { content: ''; position: absolute; inset: 0; z-index: 0; background: linear-gradient(90deg, rgba(15,44,73,0.18), rgba(15,44,73,0.02) 54%, rgba(15,44,73,0.10)), url('images/hero-boat-qr.png') center / cover no-repeat; opacity: 0; transition: opacity .22s ease; }
.map-stage.hero-mode::before { opacity: 1; }
#map { position: absolute; inset: 0; z-index: 1; background: var(--water); opacity: 1; transition: opacity .22s ease; }
.map-stage.hero-mode #map { opacity: 0; pointer-events: none; }
.leaflet-control-attribution { display: block; font-size: 10px; color: rgba(15,44,73,0.70); background: rgba(255,255,255,0.72); }
.leaflet-control-zoom { border: 0 !important; box-shadow: var(--soft-shadow) !important; overflow: hidden; border-radius: 10px; }
.leaflet-control-zoom a { color: var(--text) !important; border: 0 !important; }
.map-stage.hero-mode .leaflet-control-container { display: none; }

.search-card {
  position: absolute; z-index: 450; top: 46px; left: 36px; width: min(335px, calc(100vw - 72px)); padding: 28px 28px 24px;
  background: var(--panel); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.82); border-radius: var(--radius); box-shadow: var(--shadow);
}
.search-card h1 { margin: 0 0 10px; font-size: 22px; line-height: 1.1; letter-spacing: 0.005em; }
.search-card p { margin: 0 0 24px; color: var(--text); font-size: 14px; line-height: 1.45; }
.search-card form { display: grid; gap: 10px; }
.search-card label { margin-top: 5px; color: var(--text); font-size: 12px; font-weight: 850; }
.search-card select {
  width: 100%; height: 42px; appearance: none; border: 1px solid var(--line); border-radius: 6px; padding: 0 42px 0 14px; color: var(--text);
  background: #fff url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 7.25L9 11.25L13 7.25' stroke='%230f2c49' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  font-size: 14px; font-weight: 700; box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}
.search-card select:focus { outline: 2px solid rgba(35,72,101,0.18); border-color: #9fb4c4; }

.primary-btn, .secondary-btn, .close-panel {
  border: 0; border-radius: 6px; background: var(--button); color: #fff; cursor: pointer; font-weight: 850; transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}
.primary-btn { height: 48px; margin-top: 10px; width: 100%; font-size: 15px; box-shadow: 0 7px 16px rgba(24,51,79,0.20); }
.secondary-btn { height: 42px; width: 100%; font-size: 14px; }
.close-panel { height: 36px; padding: 0 16px; font-size: 12px; background: #eef4f7; color: var(--text); }
.primary-btn:hover, .secondary-btn:hover { background: var(--button-hover); box-shadow: 0 10px 22px rgba(24,51,79,0.23); }
.primary-btn:active, .secondary-btn:active, .close-panel:active { transform: translateY(1px); }

.boat-card {
  position: absolute; z-index: 440; right: 40px; bottom: 30px; width: min(438px, calc(100vw - 80px)); display: grid; grid-template-columns: 160px 1fr; gap: 18px; padding: 16px;
  background: var(--panel); border: 1px solid rgba(255,255,255,0.84); border-radius: var(--radius); box-shadow: var(--shadow); backdrop-filter: blur(8px);
}
.map-stage.hero-mode .boat-card { display: none; }
.boat-photo { min-height: 120px; border-radius: 7px; background-position: center; background-size: cover; }
.photo-motor { background-image: linear-gradient(180deg, rgba(15,36,56,0.08), rgba(15,36,56,0.16)), url('https://images.unsplash.com/photo-1605281317010-fe5ffe798166?auto=format&fit=crop&w=700&q=80'); }
.photo-electric { background-image: linear-gradient(180deg, rgba(15,36,56,0.08), rgba(15,36,56,0.16)), url('https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?auto=format&fit=crop&w=700&q=80'); }
.photo-row { background-image: linear-gradient(180deg, rgba(15,36,56,0.08), rgba(15,36,56,0.16)), url('https://images.unsplash.com/photo-1507525428034-b723cf961d3e?auto=format&fit=crop&w=700&q=80'); }
.boat-info { display: grid; align-content: start; gap: 9px; }
.boat-info h2 { margin: 0; font-size: 20px; line-height: 1.12; letter-spacing: 0.01em; }
.boat-info p { margin: 0; color: #2d7892; font-size: 13px; font-weight: 650; }
.boat-meta-row { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-size: 13px; font-weight: 800; }
.boat-meta-icon { width: 18px; height: 24px; object-fit: contain; flex: 0 0 18px; }
.price-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 6px 0 4px; }
.price-row div { display: grid; justify-items: center; gap: 3px; padding: 0 10px; border-right: 1px solid var(--line); }
.price-row div:last-child { border-right: 0; }
.price-row span { font-size: 12px; font-weight: 750; color: var(--muted); }
.price-row strong { font-size: 16px; color: var(--text); }

.content-panel {
  position: absolute; z-index: 470; top: 34px; right: 38px; width: min(640px, calc(100vw - 420px)); max-height: calc(100% - 74px); overflow: auto; padding: 24px;
  background: rgba(255,255,255,0.96); border: 1px solid rgba(255,255,255,0.86); border-radius: var(--radius); box-shadow: var(--shadow); backdrop-filter: blur(10px);
  transform: translateY(12px); opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s ease;
}
.content-panel.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
.content-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 10px; }
.eyebrow { margin: 0; color: #2d7892; font-size: 12px; font-weight: 850; letter-spacing: 0.08em; }
.content-panel h2 { margin: 0 0 10px; font-size: 28px; line-height: 1.12; }
.panel-lead { margin: 0 0 18px; color: var(--muted); font-size: 15px; line-height: 1.55; }
.panel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.info-tile { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.info-image { height: 130px; background-size: cover; background-position: center; }
.image-how-find { background-image: linear-gradient(135deg, rgba(23,52,83,.08), rgba(45,120,146,.12)), url('images/how-find-boat.png'); }
.image-how-info { background-image: linear-gradient(135deg, rgba(23,52,83,.08), rgba(45,120,146,.12)), url('images/how-view-info.png'); }
.image-how-qr { background-image: linear-gradient(135deg, rgba(23,52,83,.08), rgba(45,120,146,.12)), url('images/how-scan-qr.png'); }
.image-how-return { background-image: linear-gradient(135deg, rgba(23,52,83,.08), rgba(45,120,146,.12)), url('images/how-return-boat.png'); }
.image-qr { background-image: linear-gradient(135deg, rgba(23,52,83,.15), rgba(45,120,146,.2)), url('https://images.unsplash.com/photo-1516321318423-f06f85e504b3?auto=format&fit=crop&w=700&q=80'); }
.image-contract { background-image: linear-gradient(135deg, rgba(23,52,83,.12), rgba(45,120,146,.16)), url('https://images.unsplash.com/photo-1554224155-6726b3ff858f?auto=format&fit=crop&w=700&q=80'); }
.image-owner { background-image: linear-gradient(135deg, rgba(23,52,83,.10), rgba(45,120,146,.16)), url('https://images.unsplash.com/photo-1569263979104-865ab7cd8d13?auto=format&fit=crop&w=700&q=80'); }
.image-safety { background-image: linear-gradient(135deg, rgba(23,52,83,.12), rgba(45,120,146,.18)), url('https://images.unsplash.com/photo-1526778548025-fa2f459cd5c1?auto=format&fit=crop&w=700&q=80'); }
.image-shop { background-image: linear-gradient(135deg, rgba(23,52,83,.12), rgba(45,120,146,.18)), url('https://images.unsplash.com/photo-1507525428034-b723cf961d3e?auto=format&fit=crop&w=700&q=80'); }
.image-contact { background-image: linear-gradient(135deg, rgba(23,52,83,.12), rgba(45,120,146,.18)), url('https://images.unsplash.com/photo-1519608487953-e999c86e7455?auto=format&fit=crop&w=700&q=80'); }
.info-tile h3 { margin: 14px 14px 7px; font-size: 16px; }
.info-tile p { margin: 0 14px 16px; color: var(--muted); font-size: 13px; line-height: 1.45; }

.site-footer { height: var(--footer-h); display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 0 40px; background: rgba(255,255,255,0.97); border-top: 1px solid rgba(23,48,74,0.08); color: var(--text); font-size: 14px; font-weight: 760; z-index: 700; }
.custom-pin { width: 28px; height: 28px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--button); border: 3px solid rgba(255,255,255,0.92); box-shadow: 0 7px 18px rgba(14,39,60,0.28); }
.custom-pin::after { content: ''; position: absolute; width: 8px; height: 8px; border-radius: 50%; left: 7px; top: 7px; background: rgba(255,255,255,0.96); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { box-shadow: var(--soft-shadow); }
.leaflet-popup-content { margin: 13px 16px; color: var(--text); font-size: 13px; }


.panel-action { margin-top: 18px; }

.outline-btn {
  min-height: 42px; border: 1px solid var(--line); border-radius: 6px; background: rgba(255,255,255,0.92); color: var(--text); cursor: pointer; font-weight: 850; padding: 0 16px;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.outline-btn:hover { border-color: #9fb4c4; background: #f7fbfc; }
.outline-btn:disabled { opacity: .45; cursor: not-allowed; }

.registration-panel {
  position: absolute; z-index: 480; top: 50%; left: 50%; width: min(860px, calc(100vw - 80px)); max-height: none; overflow: visible; padding: 22px;
  background: rgba(255,255,255,0.97); border: 1px solid rgba(255,255,255,0.88); border-radius: var(--radius); box-shadow: var(--shadow); backdrop-filter: blur(10px);
  transform: translate(-50%, calc(-50% + 12px)); opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s ease;
}
.registration-panel.is-open { transform: translate(-50%, -50%); opacity: 1; pointer-events: auto; }
.registration-head h2 { margin: 4px 0 0; font-size: 24px; line-height: 1.12; }
.registration-progress { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 14px; }
.registration-progress span { padding: 6px 9px; border: 1px solid var(--line); border-radius: 999px; background: #f7fbfc; color: var(--muted); font-size: 12px; font-weight: 820; }
.registration-progress span.is-active { background: var(--button); border-color: var(--button); color: #fff; }

.registration-form { display: block; }
.form-step { display: none; margin: 0; padding: 0; border: 0; }
.form-step.is-active { display: grid; gap: 9px; }
.form-step legend { margin-bottom: 3px; color: var(--text); font-size: 18px; font-weight: 850; }
.form-note { margin: 0 0 4px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.registration-form label { color: var(--text); font-size: 13px; font-weight: 820; }
.registration-form input, .registration-form select, .registration-form textarea {
  width: 100%; min-height: 38px; border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; color: var(--text); background: #fff; font: inherit; font-size: 14px;
}
.registration-form textarea { resize: vertical; min-height: 58px; }
.registration-form input:focus, .registration-form select:focus, .registration-form textarea:focus { outline: 2px solid rgba(35,72,101,0.18); border-color: #9fb4c4; }
.picked-location, .generated-number, .publish-result { border: 1px solid var(--line); border-radius: 10px; background: #f7fbfc; padding: 13px 14px; color: var(--text); font-size: 14px; }
.generated-number { display: grid; gap: 5px; }
.generated-number span, .generated-number small { color: var(--muted); }
.generated-number strong { font-size: 22px; letter-spacing: 0.02em; }
.checkbox-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; line-height: 1.35; }
.checkbox-row input { width: auto; min-height: auto; margin-top: 2px; }
.price-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.price-option { display: grid; grid-template-columns: auto minmax(100px, 1fr) 110px; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.price-option input[type="checkbox"] { width: auto; min-height: auto; }
.price-option input[type="number"] { min-height: 34px; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.two-col label { display: grid; gap: 7px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }
.form-actions .primary-btn, .form-actions .outline-btn { width: auto; min-width: 130px; }
.photo-preview { display: grid; gap: 6px; }
.photo-thumb { padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photo-thumb.has-image { display: grid; grid-template-columns: 54px 1fr; align-items: center; gap: 9px; white-space: normal; }
.photo-thumb.has-image img { width: 54px; height: 42px; object-fit: cover; border-radius: 5px; background: #eef5f7; }
.boat-photo.has-uploaded-photo { background-position: center; background-size: cover; }
.publish-result { display: grid; gap: 5px; background: #eef7f4; border-color: rgba(45,120,146,0.25); }
.publish-result[hidden] { display: none; }
.map-stage.is-picking-location { cursor: crosshair; }
.map-stage.is-picking-location #map::after {
  content: 'Vali paadi täpne asukoht kaardil'; position: absolute; z-index: 460; left: 50%; bottom: 24px; transform: translateX(-50%); padding: 10px 14px; border-radius: 999px;
  background: rgba(15,44,73,0.9); color: #fff; font-size: 13px; font-weight: 850; pointer-events: none; box-shadow: var(--soft-shadow);
}

@media (max-width: 1180px) { .content-panel { width: min(580px, calc(100vw - 76px)); left: 38px; right: 38px; top: 34px; } .content-panel.is-open ~ .boat-card { display: none; } }
@media (max-width: 980px) {
  :root { --header-h: auto; } body { overflow: auto; } .page-shell { min-height: 100vh; grid-template-rows: auto minmax(760px, 1fr) var(--footer-h); }
  .site-header { min-height: 68px; padding: 18px 22px; flex-wrap: wrap; } .brand { font-size: 20px; } .menu-toggle { display: inline-flex; }
  .main-nav { display: none; width: 100%; flex-direction: column; align-items: flex-start; gap: 12px; padding-top: 12px; } .main-nav.is-open { display: flex; }
  .search-card { top: 24px; left: 22px; width: calc(100vw - 44px); max-width: 720px; } .map-stage.map-mode .search-card { max-width: 340px; } .boat-card { right: 22px; bottom: 24px; }
}
@media (max-width: 700px) {
  .map-stage { min-height: 980px; } .search-card { position: relative; inset: auto; margin: 18px auto 0; width: calc(100vw - 30px); } .search-card.landing-mode { padding: 28px 22px; width: calc(100vw - 30px); } .search-card.landing-mode .home-actions { flex-direction: column; gap: 10px; } .search-card.landing-mode .home-actions .primary-btn, .search-card.landing-mode .home-actions .outline-btn { width: 100%; min-width: 0; } .home-hero-content h1 { font-size: 31px; }
  .boat-card { position: relative; right: auto; bottom: auto; margin: 18px auto 24px; width: calc(100vw - 30px); grid-template-columns: 1fr; } .boat-photo { min-height: 180px; }
  .content-panel { position: relative; top: auto; left: auto; right: auto; width: calc(100vw - 30px); max-height: none; margin: 18px auto 24px; } .panel-grid { grid-template-columns: 1fr; }
  #map { position: absolute; inset: 0; } .site-footer { padding: 0 22px; }
}

@media (max-width: 900px) { .registration-panel { width: calc(100vw - 36px); padding: 18px; } .price-options { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .registration-panel { position: absolute; top: 50%; left: 50%; right: auto; width: calc(100vw - 30px); max-height: none; margin: 0; } .two-col, .price-option { grid-template-columns: 1fr; } .form-actions { flex-direction: column-reverse; } .form-actions .primary-btn, .form-actions .outline-btn { width: 100%; } .registration-progress { gap: 6px; } }

.home-actions {
  display: flex;
  gap: 18px;
  margin: 0;
}
.home-actions .primary-btn,
.home-actions .outline-btn {
  margin-top: 0;
}


.boat-map-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--button);
  border: 3px solid rgba(255,255,255,0.94);
  box-shadow: 0 9px 22px rgba(14,39,60,0.28);
}
.boat-map-icon svg {
  width: 27px;
  height: 27px;
  display: block;
  fill: #fff;
  stroke: #fff;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.boat-map-icon svg path:last-child {
  fill: none;
}

.geofishing-boat-popup .leaflet-popup-content-wrapper {
  border-radius: 14px;
  border: 1px solid rgba(23,48,74,0.08);
  background: rgba(255,255,255,0.98);
}
.geofishing-boat-popup .leaflet-popup-content {
  margin: 0;
  width: 300px !important;
}
.boat-popup-card {
  padding: 16px;
  color: var(--text);
}
.popup-photo {
  display: block;
  width: 100%;
  height: 128px;
  object-fit: cover;
  border-radius: 10px;
  margin: 0 0 12px;
  background: #eef5f7;
}
.popup-text-block {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}
.popup-description {
  margin: 0;
  padding: 8px 9px;
  border-radius: 8px;
  background: #fbfdfe;
  border: 1px solid rgba(176, 196, 207, 0.45);
  color: var(--text);
  font-size: 12px;
  line-height: 1.35;
}
.popup-eyebrow {
  margin: 0 0 5px;
  color: #2d7892;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
}
.boat-popup-card h3 {
  margin: 0 0 11px;
  font-size: 18px;
  line-height: 1.15;
}
.boat-popup-card dl {
  display: grid;
  gap: 7px;
  margin: 0;
}
.boat-popup-card dl div {
  display: grid;
  grid-template-columns: 102px 1fr;
  gap: 8px;
}
.boat-popup-card dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.boat-popup-card dd {
  margin: 0;
  font-size: 12px;
  font-weight: 750;
}
.popup-type-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.popup-type-icon {
  width: 18px;
  height: 24px;
  object-fit: contain;
  flex: 0 0 18px;
}
.popup-guide {
  margin: 11px 0 0;
  padding: 10px;
  border-radius: 8px;
  background: #f7fbfc;
  color: var(--text);
  font-size: 12px;
  line-height: 1.4;
}
.popup-prices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 12px;
}
.popup-prices div {
  display: grid;
  gap: 2px;
  padding: 8px 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: center;
}
.popup-prices span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}
.popup-prices strong {
  color: var(--text);
  font-size: 13px;
}
.popup-button {
  width: 100%;
  height: 38px;
  margin-top: 12px;
  border: 0;
  border-radius: 6px;
  background: var(--button);
  color: #fff;
  cursor: pointer;
  font-weight: 850;
}
.popup-button:hover {
  background: var(--button-hover);
}

@media (max-width: 700px) {
  .boat-card::before {
    position: static;
    justify-self: start;
    margin-bottom: -4px;
    grid-column: 1 / -1;
  }
  .geofishing-boat-popup .leaflet-popup-content {
    width: min(300px, calc(100vw - 72px)) !important;
  }
  .boat-popup-card dl div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .popup-prices {
    grid-template-columns: 1fr;
  }
}


.search-card.landing-mode {
  width: min(860px, calc(100vw - 92px));
  padding: 54px 48px 46px;
}
.map-stage.map-mode .search-card.landing-mode {
  width: min(380px, calc(100vw - 72px));
  padding: 22px;
}
.home-hero-content h1 {
  margin: 0 0 30px;
  color: var(--text);
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.18;
  letter-spacing: -0.035em;
}
.search-card.landing-mode .home-actions {
  display: flex;
  gap: 18px;
  margin: 0;
}
.search-card.landing-mode .home-actions .primary-btn,
.search-card.landing-mode .home-actions .outline-btn {
  width: auto;
  min-width: 250px;
  height: 58px;
  margin: 0;
  padding: 0 26px;
}
.map-stage.map-mode .home-hero-content {
  display: none;
}
.map-stage.map-mode .find-boat-hint {
  margin: 0;
}


.map-stage.map-mode .search-card.landing-mode {
  display: none;
}
.map-stage.map-mode.find-mode .search-card.landing-mode {
  display: block;
}
.map-stage.content-modal-mode::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 455;
  pointer-events: none;
  background: rgba(15, 44, 73, 0.26);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.content-panel.is-modal {
  top: 50%;
  left: 50%;
  right: auto;
  width: min(780px, calc(100vw - 80px));
  max-height: min(760px, calc(100% - 82px));
  transform: translate(-50%, calc(-50% + 12px));
  z-index: 480;
}
.content-panel.is-modal.is-open {
  transform: translate(-50%, -50%);
}

.map-stage.registration-mode::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 455;
  pointer-events: none;
  background: rgba(15, 44, 73, 0.26);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.map-stage.registration-mode .search-card {
  display: none;
}
.map-stage.registration-mode .registration-panel {
  z-index: 480;
}
.find-boat-hint {
  margin: 14px 0 0;
  padding: 12px 14px;
  border: 1px solid rgba(35, 72, 101, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}
.find-boat-hint[hidden] {
  display: none;
}

.boat-card::before { content: none; display: none; }
.boat-map-icon { width: 24px; height: 24px; border-width: 2px; box-shadow: 0 6px 14px rgba(14,39,60,0.25); }
.boat-map-icon svg { width: 20px; height: 20px; }


/* V016 mobile usability refinement.
   Keeps the approved desktop design, but makes hero, modals, map cards and forms usable on phones. */
@media (max-width: 980px) {
  html, body {
    min-height: 100%;
    overflow-x: hidden;
  }

  .page-shell {
    min-height: 100dvh;
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  .site-header {
    position: relative;
    z-index: 900;
    min-height: auto;
    padding: 13px 16px;
    gap: 12px;
  }

  .brand {
    max-width: calc(100% - 96px);
    font-size: clamp(15px, 4vw, 19px);
    line-height: 1.12;
    letter-spacing: 0.015em;
  }

  .menu-toggle {
    min-height: 40px;
    padding: 0 12px;
    border-radius: 7px;
  }

  .main-nav {
    position: static;
    display: none;
    width: 100%;
    margin-top: 2px;
    padding: 12px 0 2px;
    border-top: 1px solid rgba(23,48,74,0.09);
    background: transparent;
  }

  .main-nav.is-open {
    display: grid;
    grid-template-columns: 1fr;
  }

  .main-nav a {
    width: 100%;
    padding: 9px 0;
  }

  .language-switch {
    align-self: flex-start;
    margin-top: 4px;
  }

  .map-stage {
    min-height: calc(100dvh - 126px);
    overflow: hidden;
  }

  .map-stage.hero-mode::before,
  .map-stage.hero-mode::after {
    min-height: 100%;
  }

  .search-card.landing-mode {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(560px, calc(100vw - 30px));
    margin: 0;
    padding: clamp(22px, 5vw, 32px);
    transform: translate(-50%, -50%);
  }

  .home-hero-content h1 {
    font-size: clamp(27px, 7.2vw, 42px);
    line-height: 1.04;
    letter-spacing: -0.04em;
  }

  .home-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 18px;
  }

  .home-actions .primary-btn,
  .home-actions .outline-btn {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 0 14px;
    font-size: 13px;
  }

  .map-stage.map-mode .search-card {
    top: 14px;
    left: 14px;
    width: min(360px, calc(100vw - 28px));
    padding: 16px;
  }

  .find-boat-hint {
    font-size: 13px;
    line-height: 1.45;
  }

  .boat-card {
    left: 14px;
    right: 14px;
    bottom: 14px;
    width: auto;
    max-width: none;
    grid-template-columns: 96px 1fr;
  }

  .boat-photo {
    min-height: 132px;
  }

  .boat-info {
    padding: 14px;
  }

  .boat-info h2 {
    font-size: 18px;
  }

  .price-row {
    gap: 0;
  }

  .price-row div {
    padding: 0 6px;
  }

  .content-panel,
  .content-panel.is-modal {
    position: absolute;
    z-index: 620;
    top: 50%;
    left: 50%;
    right: auto;
    width: min(720px, calc(100vw - 28px));
    max-height: calc(100dvh - 136px);
    margin: 0;
    padding: 18px;
    overflow: auto;
    transform: translate(-50%, calc(-50% + 12px));
  }

  .content-panel.is-open,
  .content-panel.is-modal.is-open {
    transform: translate(-50%, -50%);
  }

  .content-panel h2 {
    font-size: clamp(22px, 6vw, 28px);
  }

  .panel-lead {
    font-size: 14px;
  }

  .panel-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .info-image {
    height: clamp(130px, 38vw, 180px);
  }

  .info-tile h3 {
    font-size: 15px;
  }

  .info-tile p {
    font-size: 13px;
  }

  .registration-panel {
    position: absolute;
    z-index: 650;
    top: 50%;
    left: 50%;
    width: min(760px, calc(100vw - 24px));
    max-height: calc(100dvh - 126px);
    padding: 16px;
    overflow: auto;
    transform: translate(-50%, calc(-50% + 12px));
  }

  .registration-panel.is-open {
    transform: translate(-50%, -50%);
  }

  .registration-head h2 {
    font-size: 21px;
  }

  .registration-progress {
    gap: 5px;
    margin: 10px 0 12px;
  }

  .registration-progress span {
    padding: 6px 8px;
    font-size: 11px;
  }

  .form-step.is-active {
    gap: 8px;
  }

  .form-step legend {
    font-size: 17px;
  }

  .registration-form input,
  .registration-form select,
  .registration-form textarea {
    min-height: 42px;
    font-size: 16px;
  }

  .price-options,
  .two-col,
  .price-option {
    grid-template-columns: 1fr;
  }

  .price-option {
    align-items: stretch;
  }

  .checkbox-row {
    padding: 10px;
  }

  .form-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .form-actions .primary-btn,
  .form-actions .outline-btn {
    width: 100%;
    min-width: 0;
    min-height: 46px;
  }

  .leaflet-control-zoom {
    margin-top: 14px !important;
    margin-right: 14px !important;
  }

  .geofishing-boat-popup .leaflet-popup-content {
    width: min(300px, calc(100vw - 58px)) !important;
  }

  .popup-prices {
    grid-template-columns: 1fr;
  }

  .site-footer {
    min-height: 54px;
    height: auto;
    padding: 12px 16px;
    flex-wrap: wrap;
    row-gap: 6px;
    font-size: 12px;
  }
}

@media (max-width: 560px) {
  .site-header {
    padding: 12px 14px;
  }

  .brand {
    max-width: calc(100% - 86px);
    font-size: 15px;
  }

  .menu-toggle {
    font-size: 12px;
  }

  .map-stage {
    min-height: calc(100dvh - 116px);
  }

  .search-card.landing-mode {
    width: calc(100vw - 24px);
    padding: 20px 16px;
  }

  .home-hero-content h1 {
    font-size: clamp(24px, 8vw, 33px);
  }

  .boat-card {
    grid-template-columns: 1fr;
  }

  .boat-photo {
    min-height: 150px;
  }

  .content-panel,
  .content-panel.is-modal,
  .registration-panel {
    width: calc(100vw - 18px);
    max-height: calc(100dvh - 112px);
    padding: 15px;
  }

  .content-panel-head {
    align-items: flex-start;
    gap: 10px;
  }

  .close-panel {
    min-height: 38px;
    padding: 0 10px;
    white-space: nowrap;
  }

  .registration-progress {
    max-height: 72px;
    overflow: auto;
  }

  .map-stage.is-picking-location #map::after {
    left: 12px;
    right: 12px;
    bottom: 12px;
    transform: none;
    text-align: center;
  }
}

@media (max-width: 390px) {
  .home-hero-content h1 {
    font-size: 23px;
  }

  .home-actions .primary-btn,
  .home-actions .outline-btn {
    font-size: 12px;
  }

  .price-row strong {
    font-size: 14px;
  }
}


/* V017 focused mobile header and hero controls refinement.
   Desktop layout remains unchanged. */
@media (max-width: 980px) {
  .site-header {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    column-gap: 10px;
  }

  .brand {
    max-width: none;
    font-size: clamp(13px, 3.45vw, 16px);
    line-height: 1.1;
    letter-spacing: 0.01em;
  }

  .menu-toggle {
    grid-column: 3;
    grid-row: 1;
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 40px;
    min-height: 40px;
    padding: 0;
    border-radius: 8px;
    font-size: 25px;
    line-height: 1;
  }

  .menu-toggle span {
    transform: translateY(-1px);
  }

  .main-nav {
    grid-column: 1 / -1;
  }

  .language-switch {
    grid-column: 2;
    grid-row: 1;
    display: inline-flex;
    align-self: center;
    margin: 0;
  }

  .language-switch button {
    min-width: 34px;
    height: 32px;
    padding: 0 8px;
    font-size: 12px;
  }

  .search-card.landing-mode {
    top: 42%;
    width: auto;
    min-width: min(330px, calc(100vw - 28px));
    max-width: calc(100vw - 28px);
    padding: 12px;
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(255, 255, 255, 0.58);
    box-shadow: 0 18px 48px rgba(18, 47, 70, 0.20);
    backdrop-filter: blur(8px);
  }

  .search-card.landing-mode .home-hero-content h1 {
    display: none;
  }

  .home-actions {
    margin-top: 0;
    gap: 9px;
  }
}

@media (max-width: 560px) {
  .site-header {
    padding: 10px 12px;
    grid-template-columns: minmax(0, 1fr) auto auto;
    column-gap: 8px;
  }

  .brand {
    font-size: clamp(12px, 3.65vw, 14px);
    max-width: 100%;
  }

  .menu-toggle {
    width: 40px;
    height: 38px;
    min-height: 38px;
    font-size: 24px;
  }

  .language-switch button {
    min-width: 31px;
    height: 30px;
    padding: 0 7px;
    font-size: 11px;
  }

  .search-card.landing-mode {
    top: 38%;
    min-width: min(312px, calc(100vw - 24px));
    padding: 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.66);
  }

  .home-actions .primary-btn,
  .home-actions .outline-btn {
    min-height: 47px;
    padding: 0 13px;
    font-size: 12px;
    border-radius: 7px;
  }
}

@media (max-width: 390px) {
  .brand {
    font-size: 11.5px;
  }

  .search-card.landing-mode {
    top: 36%;
    min-width: calc(100vw - 22px);
  }
}


/* V018 mobile find-a-boat flow:
   mobile hides recommendation card, opens the find instruction as centered modal,
   and supports a small neon-blue current-location dot on the Leaflet map. */
.user-location-dot {
  filter: drop-shadow(0 0 7px rgba(0, 217, 255, 0.96));
}

@media (max-width: 980px) {
  .map-stage.map-mode .boat-card {
    display: none;
  }

  .map-stage.mobile-find-help-mode::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 560;
    background: rgba(8, 24, 38, 0.34);
    backdrop-filter: blur(5px);
    pointer-events: none;
  }

  .map-stage.mobile-find-help-mode .search-card {
    position: absolute;
    z-index: 590;
    top: 50%;
    left: 50%;
    width: min(380px, calc(100vw - 28px));
    margin: 0;
    padding: 18px;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255,255,255,0.86);
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(7, 21, 34, 0.30);
    backdrop-filter: blur(12px);
  }

  .map-stage.mobile-find-help-mode .find-boat-hint {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
  }

  .map-stage.mobile-find-help-mode .find-boat-hint::before {
    content: 'ÕPETUS';
    color: #2d7892;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
  }

  .map-stage.mobile-find-help-mode .find-boat-hint {
    pointer-events: auto;
  }

  .mobile-find-help-close {
    justify-self: end;
    min-width: 86px;
    min-height: 38px;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 7px;
    background: var(--button);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
  }
}

@media (max-width: 560px) {
  .map-stage.mobile-find-help-mode .search-card {
    width: calc(100vw - 24px);
    padding: 16px;
  }
}


/* V019 requested mobile refinements:
   keeps desktop layout working, simplifies mobile header/menu and map state. */
@media (max-width: 980px) {
  .map-stage.hero-mode::before {
    background-position: 66% center;
  }

  .site-header {
    grid-template-columns: 1fr auto;
  }

  .language-switch {
    display: none !important;
  }

  .menu-toggle {
    grid-column: 2;
  }

  .main-nav {
    grid-column: 1 / -1;
  }

  .search-card.landing-mode {
    top: 36%;
    min-width: 0;
    width: auto;
    max-width: calc(100vw - 36px);
    padding: 10px;
    background: rgba(255, 255, 255, 0.58);
  }

  .home-actions {
    width: auto;
    justify-items: center;
    gap: 8px;
  }

  .home-actions .primary-btn,
  .home-actions .outline-btn {
    width: auto;
    min-width: min(255px, calc(100vw - 72px));
    max-width: calc(100vw - 72px);
    min-height: 42px;
    padding: 0 14px;
    font-size: 12px;
  }

  .map-stage.map-mode .search-card:not(.landing-mode) {
    display: none;
  }

  .map-stage.mobile-find-help-mode .search-card {
    display: block;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
  }

  .map-stage.mobile-find-help-mode .find-boat-hint {
    padding: 18px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(255,255,255,0.86);
    box-shadow: 0 24px 60px rgba(7, 21, 34, 0.30);
  }

  .geofishing-locate-control {
    margin-top: 6px !important;
    margin-right: 14px !important;
  }

  .geofishing-locate-button {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 0;
    background: #fff;
    color: #17304a;
    cursor: pointer;
    font-size: 22px;
    font-weight: 900;
    line-height: 1;
  }

  .geofishing-locate-button:hover {
    background: #f4fbff;
  }
}

@media (max-width: 560px) {
  .map-stage.hero-mode::before {
    background-position: 70% center;
  }

  .search-card.landing-mode {
    top: 34%;
    max-width: calc(100vw - 32px);
    padding: 9px;
  }

  .home-actions .primary-btn,
  .home-actions .outline-btn {
    min-width: min(238px, calc(100vw - 70px));
    min-height: 40px;
    font-size: 11.5px;
  }

  .map-stage.mobile-find-help-mode .find-boat-hint {
    padding: 16px;
  }
}


/* V020 mobile-only hero image focus correction.
   Desktop image and all functional logic remain unchanged. */
@media (max-width: 980px) {
  .map-stage.hero-mode::before {
    background-position: 84% center;
  }
}

@media (max-width: 560px) {
  .map-stage.hero-mode::before {
    background-position: 88% center;
  }
}

@media (max-width: 390px) {
  .map-stage.hero-mode::before {
    background-position: 91% center;
  }
}


/* V021 mobile hero fine-tune and map control cleanup.
   Mobile-only: image focus slightly more left/down, buttons slightly higher,
   hidden leftover white card on map, locate button matching Leaflet zoom style. */
@media (max-width: 980px) {
  .map-stage.hero-mode::before {
    background-position: 80% 58%;
  }

  .search-card.landing-mode {
    top: 32%;
  }

  .map-stage.map-mode > .search-card:not(.landing-mode),
  .map-stage.map-mode > .search-card:not(.landing-mode) * {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  .map-stage.map-mode > .search-card:not(.landing-mode) {
    width: 0 !important;
    height: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: 0 !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    transform: none !important;
  }

  .geofishing-locate-control {
    margin-top: 0 !important;
    margin-right: 14px !important;
  }

  .geofishing-locate-control.leaflet-bar {
    border: 2px solid rgba(0,0,0,0.2);
    border-radius: 4px;
    box-shadow: none;
  }

  .geofishing-locate-button {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 0;
    border-bottom: 0;
    border-radius: 2px;
    background: #fff;
    color: #111;
    cursor: pointer;
    font-size: 20px;
    font-weight: 700;
    line-height: 30px;
    font-family: Arial, Helvetica, sans-serif;
  }

  .geofishing-locate-button:hover,
  .geofishing-locate-button:focus {
    background: #f4f4f4;
  }
}

@media (max-width: 560px) {
  .map-stage.hero-mode::before {
    background-position: 84% 60%;
  }

  .search-card.landing-mode {
    top: 30%;
  }
}

@media (max-width: 390px) {
  .map-stage.hero-mode::before {
    background-position: 87% 61%;
  }

  .search-card.landing-mode {
    top: 29%;
  }
}


/* V022 correction: mobile hero image direction fix.
   Previous V021 moved the visible crop in the wrong direction.
   This override moves the image visually LEFT and visually DOWN in mobile view.
   Other V021 fixes remain unchanged. */
@media (max-width: 980px) {
  .map-stage.hero-mode::before {
    background-position: 96% 42%;
  }
}

@media (max-width: 560px) {
  .map-stage.hero-mode::before {
    background-position: 98% 39%;
  }
}

@media (max-width: 390px) {
  .map-stage.hero-mode::before {
    background-position: 100% 37%;
  }
}


/* V023 mobile hero fine-tune.
   Corrects V022: image was too far left, so X focus is softened.
   The visible background is moved down with transform, and homepage buttons are lifted. */
@media (max-width: 980px) {
  .map-stage.hero-mode::before {
    background-position: 91% 42%;
    transform: translateY(18px) scale(1.035);
    transform-origin: center center;
  }

  .search-card.landing-mode {
    top: 27%;
  }
}

@media (max-width: 560px) {
  .map-stage.hero-mode::before {
    background-position: 93% 40%;
    transform: translateY(22px) scale(1.04);
    transform-origin: center center;
  }

  .search-card.landing-mode {
    top: 25%;
  }
}

@media (max-width: 390px) {
  .map-stage.hero-mode::before {
    background-position: 94% 39%;
    transform: translateY(24px) scale(1.045);
    transform-origin: center center;
  }

  .search-card.landing-mode {
    top: 24%;
  }
}


/* V024 mobile hero: move background image clearly downward.
   Only mobile hero background tuning; desktop and page logic unchanged. */
@media (max-width: 980px) {
  .map-stage.hero-mode::before {
    background-position: 91% 24%;
    transform: translateY(48px) scale(1.09);
    transform-origin: center center;
  }

  .search-card.landing-mode {
    top: 25%;
  }
}

@media (max-width: 560px) {
  .map-stage.hero-mode::before {
    background-position: 93% 20%;
    transform: translateY(56px) scale(1.11);
    transform-origin: center center;
  }

  .search-card.landing-mode {
    top: 23%;
  }
}

@media (max-width: 390px) {
  .map-stage.hero-mode::before {
    background-position: 94% 18%;
    transform: translateY(62px) scale(1.12);
    transform-origin: center center;
  }

  .search-card.landing-mode {
    top: 22%;
  }
}


/* V025 bug fix:
   - Registration location picker opens the map and returns to the form after map click.
   - The old top-left white search card leaves no visible edge in mobile map view. */
@media (max-width: 980px) {
  .map-stage.map-mode:not(.mobile-find-help-mode) > .search-card,
  .map-stage.map-mode:not(.mobile-find-help-mode) > .search-card.find-mode,
  .map-stage.map-mode:not(.mobile-find-help-mode) > .search-card:not(.landing-mode) {
    display: none !important;
    position: absolute !important;
    left: -99999px !important;
    top: -99999px !important;
    width: 0 !important;
    height: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: 0 !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    outline: 0 !important;
    opacity: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
    visibility: hidden !important;
    transform: none !important;
    box-shadow: none !important;
    background: transparent !important;
  }

  .map-stage.mobile-find-help-mode > .search-card {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    left: 50% !important;
    top: 50% !important;
    width: min(380px, calc(100vw - 28px)) !important;
    height: auto !important;
    max-width: calc(100vw - 28px) !important;
    max-height: calc(100dvh - 120px) !important;
    transform: translate(-50%, -50%) !important;
    pointer-events: auto !important;
    overflow: visible !important;
  }
}


/* V027 registration and popup refinements. */
@media (min-width: 981px) {
  .registration-panel {
    max-height: calc(100vh - 168px);
    overflow: auto;
  }
}

.equipment-requirements {
  display: grid;
  gap: 8px;
}

.text-link-button {
  border: 0;
  background: transparent;
  color: #2d7892;
  font: inherit;
  font-weight: 900;
  text-decoration: underline;
  cursor: pointer;
  padding: 0 0 0 4px;
}

.terms-row {
  flex-wrap: wrap;
}

.terms-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.terms-modal.is-open {
  display: flex;
}

.terms-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 24, 38, 0.38);
  backdrop-filter: blur(8px);
}

.terms-modal-card {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100vw - 36px));
  max-height: min(720px, calc(100dvh - 48px));
  overflow: auto;
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.86);
  background: rgba(255,255,255,0.97);
  box-shadow: var(--shadow);
}

.terms-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.terms-modal-head h2 {
  margin: 4px 0 0;
  font-size: 24px;
}

.terms-modal-body {
  display: grid;
  gap: 10px;
  color: var(--text);
  line-height: 1.48;
}

.terms-modal-body p {
  margin: 0;
}

.terms-modal-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

@media (max-width: 980px) {
  .geofishing-boat-popup .leaflet-popup-content {
    width: min(288px, calc(100vw - 70px)) !important;
  }

  .geofishing-boat-popup .popup-prices {
    display: none;
  }

  .geofishing-boat-popup .boat-popup-card {
    padding: 13px;
  }

  .geofishing-boat-popup .boat-popup-card h3 {
    font-size: 16px;
    margin-bottom: 8px;
  }

  .geofishing-boat-popup .boat-popup-card dl {
    gap: 5px;
  }

  .geofishing-boat-popup .boat-popup-card dl div {
    grid-template-columns: 92px 1fr;
    gap: 6px;
  }

  .geofishing-boat-popup .popup-guide {
    margin-top: 8px;
    padding: 8px;
  }

  .geofishing-boat-popup .popup-photo {
    height: 105px;
    margin-bottom: 9px;
  }

  .geofishing-boat-popup .popup-text-block {
    gap: 6px;
    margin-top: 8px;
  }

  .geofishing-boat-popup .popup-description {
    padding: 7px 8px;
    font-size: 11px;
  }

  .geofishing-boat-popup .popup-button {
    height: 36px;
    margin-top: 10px;
  }

  .terms-modal {
    padding: 14px;
  }

  .terms-modal-card {
    width: calc(100vw - 24px);
    max-height: calc(100dvh - 28px);
    padding: 16px;
  }

  .terms-modal-head h2 {
    font-size: 20px;
  }
}


/* V028 mobile popup prices:
   Prices are visible again on mobile, but compact and easy to compare. */
@media (max-width: 980px) {
  .geofishing-boat-popup .popup-prices,
  .boat-card .price-row {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
    margin: 8px 0 10px !important;
  }

  .geofishing-boat-popup .popup-prices div,
  .boat-card .price-row div {
    min-height: auto !important;
    padding: 7px 6px !important;
    border-radius: 8px !important;
    text-align: center !important;
    background: rgba(247, 251, 252, 0.94) !important;
    border: 1px solid rgba(176, 196, 207, 0.55) !important;
  }

  .geofishing-boat-popup .popup-prices span,
  .boat-card .price-row span {
    display: block !important;
    font-size: 10.2px !important;
    line-height: 1.1 !important;
    letter-spacing: 0.04em !important;
    color: #496375 !important;
    font-weight: 800 !important;
  }

  .geofishing-boat-popup .popup-prices strong,
  .boat-card .price-row strong {
    display: block !important;
    margin-top: 2px !important;
    font-size: 13px !important;
    line-height: 1.15 !important;
    color: #0f2942 !important;
    font-weight: 900 !important;
  }

  .geofishing-boat-popup .popup-button,
  .boat-card .primary-btn {
    margin-top: 4px !important;
  }
}

@media (max-width: 390px) {
  .geofishing-boat-popup .popup-prices,
  .boat-card .price-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 5px !important;
  }

  .geofishing-boat-popup .popup-prices div,
  .boat-card .price-row div {
    padding: 6px 5px !important;
  }

  .geofishing-boat-popup .popup-prices strong,
  .boat-card .price-row strong {
    font-size: 12px !important;
  }
}



/* V030 legal docs: concise contract/terms content inside existing approved panel. */
.legal-docs {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.legal-docs[hidden] {
  display: none;
}

.legal-doc-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,0.96);
}

.legal-doc-card h3 {
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 1.25;
}

.legal-doc-card p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.48;
}

.legal-doc-card p:last-child {
  margin-bottom: 0;
}

.legal-doc-note {
  background: #f7fbfc;
}

.terms-modal-body h3 {
  margin: 0 0 2px;
  font-size: 17px;
  line-height: 1.28;
}

/* V036 rendisoovi vorm, kopeeritav sõnum ja makseinfo. */
.rental-request-modal {
  position: fixed;
  inset: 0;
  z-index: 1250;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.rental-request-modal.is-open {
  display: flex;
}

.rental-request-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 24, 38, 0.38);
  backdrop-filter: blur(8px);
}

.rental-request-card {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100vw - 36px));
  max-height: min(760px, calc(100dvh - 48px));
  overflow: auto;
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.86);
  background: rgba(255,255,255,0.97);
  box-shadow: var(--shadow);
}

.rental-request-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.rental-request-head h2 {
  margin: 4px 0 0;
  font-size: 24px;
}

.rental-request-form {
  display: grid;
  gap: 10px;
}

.rental-request-form label {
  color: var(--text);
  font-size: 13px;
  font-weight: 820;
}

.rental-request-form input,
.rental-request-form select,
.rental-request-form textarea {
  width: 100%;
  min-height: 42px;
  margin-top: 4px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.94);
  color: var(--text);
}

.rental-boat-summary {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid rgba(35, 72, 101, 0.14);
  border-radius: 10px;
  background: #f7fbfc;
  color: var(--text);
  line-height: 1.35;
}

.rental-boat-summary strong {
  font-size: 16px;
}

.rental-boat-summary span {
  color: var(--muted);
  font-size: 13px;
}

.rental-request-result {
  display: grid;
  gap: 10px;
  margin-top: 8px;
  padding: 14px;
  border: 1px solid rgba(45, 120, 146, 0.22);
  border-radius: 12px;
  background: #f7fbfc;
}

.rental-request-result[hidden] {
  display: none;
}

.rental-request-result h3,
.payment-info h3 {
  margin: 0;
  font-size: 17px;
}

.rental-request-result p,
.payment-info p {
  margin: 0;
  color: var(--text);
  line-height: 1.45;
}

#rentalRequestText {
  min-height: 180px;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.rental-request-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.sms-link {
  display: inline-grid;
  place-items: center;
  text-decoration: none;
}

.sms-link[aria-disabled="true"] {
  opacity: 0.52;
  pointer-events: none;
}

.copy-status {
  min-height: 18px;
  color: #2d7892 !important;
  font-weight: 760;
  font-size: 13px;
}

.payment-info {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid rgba(35, 72, 101, 0.14);
  border-radius: 10px;
  background: #fff;
}

.payment-note {
  color: var(--muted) !important;
  font-size: 12px;
}

.rental-request-footer {
  margin-top: 8px;
}

@media (max-width: 700px) {
  .rental-request-modal {
    padding: 12px;
  }

  .rental-request-card {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 24px);
    padding: 15px;
  }

  .rental-request-head h2 {
    font-size: 20px;
  }

  .rental-request-grid,
  .rental-request-actions {
    grid-template-columns: 1fr;
  }
}

.payment-note-inline {
  display: inline-block;
  color: var(--muted);
  font-size: 12px;
  margin-left: 4px;
}

/* V038: asukoha kinnituse, seadusega ette nähtud varustuse ja rendisoovi kalendri parandused. */
.location-confirm-button {
  justify-self: start;
  width: auto;
}

.picked-location.is-unconfirmed {
  border-color: rgba(185, 45, 45, 0.42);
  background: #fff1f1;
  color: #8b2424;
  font-weight: 820;
}

.picked-location.is-confirmed {
  border-color: rgba(56, 132, 88, 0.34);
  background: #f0fbf4;
  color: #215c38;
  font-weight: 820;
}

.equipment-title {
  padding: 8px 0 2px;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.request-date-picker {
  display: grid;
  gap: 8px;
}

.request-date-picker .outline-btn {
  width: fit-content;
}

.request-calendar {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(35, 72, 101, 0.14);
  border-radius: 12px;
  background: #fff;
}

.request-calendar[hidden] {
  display: none;
}

.calendar-head,
.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
  align-items: center;
}

.calendar-head {
  grid-template-columns: 42px 1fr 42px;
}

.calendar-head strong {
  text-align: center;
  color: var(--text);
}

.calendar-nav {
  min-width: 0 !important;
  width: 42px !important;
  padding: 8px 0 !important;
}

.calendar-weekdays span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

.calendar-empty {
  min-height: 36px;
}

.calendar-day {
  min-height: 36px;
  border: 1px solid rgba(56, 132, 88, 0.22);
  border-radius: 9px;
  background: #f0fbf4;
  color: #215c38;
  font-weight: 880;
  cursor: pointer;
}

.calendar-day.is-selected {
  border-color: #234865;
  background: #234865;
  color: #fff;
}

.calendar-day:disabled {
  border-color: rgba(80, 96, 112, 0.12);
  background: #eef2f4;
  color: #9aa5ad;
  cursor: not-allowed;
}

.calendar-note {
  margin: 2px 0 0;
  color: var(--muted) !important;
  font-size: 12px;
  line-height: 1.35;
}

#rentalRequestText {
  min-height: 112px;
}

.payment-copy-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 2px;
}

@media (max-width: 700px) {
  .payment-copy-actions,
  .rental-request-actions {
    grid-template-columns: 1fr;
  }
}

/* V040 mobile hero and vehicle icons.
   Keeps the confirmed v039 logic, adds type-based map icons and a desktop legend. */
.vehicle-map-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255,255,255,0.96);
  border-radius: 50%;
  box-shadow: 0 7px 16px rgba(10, 33, 52, 0.30);
  color: #fff;
  font-weight: 900;
  font-size: 12px;
  line-height: 1;
  letter-spacing: -0.03em;
}

.vehicle-map-icon span {
  display: block;
  transform: translateY(0.5px);
}

.vehicle-icon-mootorpaat { background: #1d5f95; border-radius: 50% 50% 42% 42%; }
.vehicle-icon-elektrimootoriga { background: #168277; border-radius: 8px 50% 8px 50%; }
.vehicle-icon-aerupaat { background: #9b5b1e; border-radius: 50% 18% 50% 18%; }
.vehicle-icon-kanuu { background: #7a4aa8; border-radius: 14px / 50%; }
.vehicle-icon-sup-laud { background: #d97706; border-radius: 50%; font-size: 8px; letter-spacing: 0; }
.vehicle-icon-mootorita { background: #607080; border-radius: 7px; }

.vehicle-legend {
  position: absolute;
  z-index: 430;
  top: 22px;
  right: 22px;
  display: none;
  gap: 7px;
  width: 190px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,0.82);
  border-radius: 14px;
  background: rgba(255,255,255,0.92);
  box-shadow: 0 18px 46px rgba(7, 21, 34, 0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.map-stage.map-mode .vehicle-legend {
  display: grid;
}

.map-stage.hero-mode .vehicle-legend,
.map-stage.registration-mode .vehicle-legend,
.map-stage.content-modal-mode .vehicle-legend {
  display: none;
}

.vehicle-legend h3 {
  margin: 0 0 2px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #204158;
}

.vehicle-legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  color: #24475e;
}

.vehicle-legend-icon {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-width: 1.5px;
  font-size: 9px;
  box-shadow: 0 5px 10px rgba(10, 33, 52, 0.18);
}

.vehicle-legend-icon.vehicle-icon-sup-laud {
  font-size: 6.5px;
}

@media (max-width: 980px) {
  .vehicle-legend {
    display: none !important;
  }

  .map-stage.hero-mode .search-card.landing-mode {
    top: calc(23% + 19px) !important;
    padding: 8px !important;
  }

  .map-stage.hero-mode .home-actions {
    gap: 6px !important;
    margin-top: 12px !important;
  }

  .map-stage.hero-mode .home-actions .primary-btn,
  .map-stage.hero-mode .home-actions .outline-btn {
    min-width: min(204px, calc(100vw - 96px)) !important;
    max-width: calc(100vw - 96px) !important;
    min-height: 34px !important;
    height: 34px !important;
    padding: 0 10px !important;
    border-radius: 8px !important;
    font-size: 9.6px !important;
    line-height: 1.05 !important;
    box-shadow: 0 5px 12px rgba(24,51,79,0.16) !important;
  }

  .map-stage.map-mode .boat-card:not([hidden]) {
    display: grid !important;
    position: absolute !important;
    z-index: 435 !important;
    left: 10px !important;
    right: 10px !important;
    bottom: 12px !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    grid-template-columns: 72px 1fr !important;
    gap: 10px !important;
    padding: 10px !important;
    border-radius: 14px !important;
    max-height: 34dvh !important;
    overflow: auto !important;
  }

  .map-stage.map-mode .boat-card:not([hidden]) .boat-photo {
    min-height: 72px !important;
    height: 72px !important;
    border-radius: 10px !important;
  }

  .map-stage.map-mode .boat-card:not([hidden]) .boat-info h2 {
    font-size: 15px !important;
    margin-bottom: 2px !important;
  }

  .map-stage.map-mode .boat-card:not([hidden]) .boat-info p {
    font-size: 12px !important;
    margin-bottom: 6px !important;
  }

  .map-stage.map-mode .boat-card:not([hidden]) .price-row {
    margin: 4px 0 7px !important;
  }

  .map-stage.map-mode .boat-card:not([hidden]) .secondary-btn {
    min-height: 34px !important;
    height: 34px !important;
    font-size: 10.2px !important;
  }
}

@media (max-width: 390px) {
  .map-stage.hero-mode .search-card.landing-mode {
    top: calc(22% + 19px) !important;
  }

  .map-stage.hero-mode .home-actions .primary-btn,
  .map-stage.hero-mode .home-actions .outline-btn {
    min-width: min(196px, calc(100vw - 92px)) !important;
    font-size: 9.2px !important;
  }
}

/* V041: icon legend moved into the existing upper-left help box.
   The separate right-side white legend panel is removed/hidden. */
.vehicle-legend {
  display: none !important;
}

.find-boat-hint {
  position: relative;
}

.find-boat-hint-head {
  display: grid;
  grid-template-columns: 1fr 28px;
  gap: 8px;
  align-items: start;
}

.find-boat-hint-close {
  width: 26px;
  height: 26px;
  min-width: 26px;
  min-height: 26px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(35, 72, 101, 0.16);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #234865;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.find-boat-hint-close:hover {
  background: #234865;
  color: #fff;
}

.find-boat-hint-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 8px;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid rgba(35, 72, 101, 0.10);
}

.find-boat-hint-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  color: #24475e;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.15;
  white-space: nowrap;
}

.find-boat-hint-legend .vehicle-legend-icon {
  width: 18px;
  height: 18px;
  min-width: 18px;
  border-width: 1.25px;
  font-size: 8px;
  font-style: normal;
  box-shadow: 0 4px 8px rgba(10, 33, 52, 0.14);
}

.find-boat-hint-legend .vehicle-legend-icon.vehicle-icon-sup-laud {
  font-size: 5.6px;
}

@media (max-width: 980px) {
  .map-stage.mobile-find-help-mode .find-boat-hint {
    padding: 12px !important;
  }

  .find-boat-hint-head {
    grid-template-columns: 1fr 26px;
  }

  .find-boat-hint-legend {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .find-boat-hint-legend > span {
    font-size: 10.5px;
  }
}

@media (max-width: 360px) {
  .find-boat-hint-legend {
    grid-template-columns: 1fr;
  }
}

/* V042 – premium SVG vehicle icons, style A inspired.
   The icons are inline SVGs, so no extra image files are needed. */
.vehicle-map-icon {
  width: 38px !important;
  height: 48px !important;
  min-width: 38px !important;
  display: inline-grid !important;
  place-items: center !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: inherit !important;
  font-size: 0 !important;
  line-height: 0 !important;
  letter-spacing: 0 !important;
  overflow: visible !important;
}

.vehicle-icon-svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
  filter: drop-shadow(0 6px 10px rgba(5, 24, 42, 0.28));
}

.vehicle-map-icon span {
  display: none !important;
}

.vehicle-map-icon.vehicle-legend-icon,
.find-boat-hint-legend .vehicle-legend-icon {
  width: 24px !important;
  height: 31px !important;
  min-width: 24px !important;
  border: 0 !important;
  font-size: 0 !important;
  box-shadow: none !important;
}

.vehicle-legend-icon .vehicle-icon-svg,
.find-boat-hint-legend .vehicle-legend-icon .vehicle-icon-svg {
  filter: drop-shadow(0 3px 5px rgba(5, 24, 42, 0.18));
}

.find-boat-hint {
  max-width: 395px;
}

.find-boat-hint-legend {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 6px 9px !important;
}

.find-boat-hint-legend > span {
  gap: 4px !important;
  font-size: 10.2px !important;
  line-height: 1.05 !important;
  font-weight: 850 !important;
  letter-spacing: -0.01em;
}

@media (max-width: 980px) {
  .vehicle-map-icon {
    width: 35px !important;
    height: 44px !important;
    min-width: 35px !important;
  }

  .find-boat-hint {
    max-width: min(392px, calc(100vw - 36px));
  }

  .find-boat-hint-legend {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .find-boat-hint-legend > span {
    font-size: 9.8px !important;
  }
}

@media (max-width: 360px) {
  .find-boat-hint-legend {
    grid-template-columns: 1fr !important;
  }
}


/* V044 – use the user-approved rendered PNG icons directly */
.vehicle-marker-img {
  background: transparent !important;
  border: 0 !important;
}

.vehicle-legend-icon-img {
  width: 24px;
  height: 31px;
  min-width: 24px;
  display: inline-block;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(5, 24, 42, 0.18));
}

.find-boat-hint-legend .vehicle-legend-icon-img {
  width: 24px;
  height: 31px;
  min-width: 24px;
}

@media (max-width: 980px) {
  .vehicle-legend-icon-img,
  .find-boat-hint-legend .vehicle-legend-icon-img {
    width: 23px;
    height: 30px;
    min-width: 23px;
  }
}


/* V046 – safe legend alignment only.
   Based on v044. No marker anchor, map coordinate or JS location logic changes. */
.find-boat-hint-legend {
  align-items: start !important;
}

.find-boat-hint-legend > span {
  display: grid !important;
  grid-template-columns: 24px minmax(0, 1fr) !important;
  align-items: center !important;
  min-height: 31px !important;
  column-gap: 5px !important;
}

.find-boat-hint-legend .vehicle-legend-icon-img,
.vehicle-legend-icon-img {
  width: 24px !important;
  height: 31px !important;
  min-width: 24px !important;
  display: block !important;
  object-fit: contain !important;
  justify-self: center !important;
  align-self: center !important;
  margin: 0 !important;
  line-height: 0 !important;
}

@media (max-width: 980px) {
  .find-boat-hint-legend > span {
    grid-template-columns: 23px minmax(0, 1fr) !important;
    min-height: 30px !important;
  }

  .find-boat-hint-legend .vehicle-legend-icon-img,
  .vehicle-legend-icon-img {
    width: 23px !important;
    height: 30px !important;
    min-width: 23px !important;
  }
}

/* V055 – visible icon fix: larger info icon + clean map marker rendering */
.vehicle-marker-img {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  filter: none !important;
  object-fit: contain !important;
}

.boat-meta-row {
  gap: 11px !important;
  font-size: 14px !important;
  line-height: 1.15 !important;
}

.boat-meta-icon {
  width: 34px !important;
  height: 44px !important;
  min-width: 34px !important;
  flex: 0 0 34px !important;
  object-fit: contain !important;
}

.popup-type-icon {
  width: 24px !important;
  height: 32px !important;
  min-width: 24px !important;
  flex: 0 0 24px !important;
  object-fit: contain !important;
}


/* V057 – v055 size-only adjustment.
   Only sizes changed: map marker smaller, info-board icon larger. */
.vehicle-marker-img {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  filter: none !important;
  object-fit: contain !important;
}

.boat-meta-icon,
#selectedBoatTypeIcon {
  width: 42px !important;
  height: 54px !important;
  min-width: 42px !important;
  flex: 0 0 42px !important;
  object-fit: contain !important;
  display: block !important;
}

.boat-meta-row {
  gap: 12px !important;
  align-items: center !important;
}

.popup-type-icon {
  width: 30px !important;
  height: 40px !important;
  min-width: 30px !important;
  flex: 0 0 30px !important;
  object-fit: contain !important;
}


/* V060 – mobile-only requested refinements.
   Changes only mobile ad card visibility, mobile popup centering,
   mobile help icon grid, and locate/zoom control styling. */
@media (max-width: 980px) {
  /* 1. Remove the selected-boat advertising/info card in mobile map view. */
  .map-stage.map-mode .boat-card,
  .map-stage.map-mode .boat-card:not([hidden]) {
    display: none !important;
  }

  /* 2. Center the Leaflet boat popup on mobile. */
  .map-stage.map-mode .leaflet-popup.geofishing-boat-popup,
  .map-stage.map-mode .geofishing-boat-popup.leaflet-popup {
    position: fixed !important;
    left: 50% !important;
    top: 50% !important;
    bottom: auto !important;
    right: auto !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
    z-index: 720 !important;
  }

  .map-stage.map-mode .geofishing-boat-popup .leaflet-popup-content-wrapper {
    width: min(318px, calc(100vw - 34px)) !important;
    max-height: calc(100dvh - 92px) !important;
    overflow: auto !important;
  }

  .map-stage.map-mode .geofishing-boat-popup .leaflet-popup-content {
    width: auto !important;
    max-width: none !important;
  }

  .map-stage.map-mode .geofishing-boat-popup .leaflet-popup-tip-container {
    display: none !important;
  }

  /* 3. Keep the initial help icon list in two columns on mobile. */
  .map-stage.mobile-find-help-mode .find-boat-hint-legend,
  .find-boat-hint-legend {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px 8px !important;
    align-items: start !important;
  }

  .map-stage.mobile-find-help-mode .find-boat-hint-legend > span,
  .find-boat-hint-legend > span {
    display: grid !important;
    grid-template-columns: 25px minmax(0, 1fr) !important;
    align-items: center !important;
    column-gap: 5px !important;
    min-height: 31px !important;
    font-size: 10px !important;
    line-height: 1.08 !important;
    white-space: normal !important;
  }

  .map-stage.mobile-find-help-mode .find-boat-hint-legend .vehicle-legend-icon-img,
  .find-boat-hint-legend .vehicle-legend-icon-img {
    width: 24px !important;
    height: 31px !important;
    min-width: 24px !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 !important;
  }

  /* 4. Make the locate button match the Leaflet + / - controls. */
  .leaflet-control-zoom,
  .geofishing-locate-control {
    border: 0 !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    box-shadow: var(--soft-shadow) !important;
    background: #fff !important;
  }

  .leaflet-right .leaflet-control.geofishing-locate-control {
    margin-right: 10px !important;
    margin-top: 6px !important;
  }

  .leaflet-control-zoom a,
  .geofishing-locate-button {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    display: grid !important;
    place-items: center !important;
    padding: 0 !important;
    border: 0 !important;
    background: #fff !important;
    color: var(--text) !important;
    font-size: 19px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    text-align: center !important;
    box-sizing: border-box !important;
    cursor: pointer !important;
  }

  .leaflet-control-zoom a:first-child {
    border-bottom: 1px solid rgba(15, 44, 73, 0.12) !important;
  }

  .geofishing-locate-button span {
    display: block !important;
    line-height: 1 !important;
    transform: none !important;
  }
}

@media (max-width: 360px) {
  .find-boat-hint-legend,
  .map-stage.mobile-find-help-mode .find-boat-hint-legend {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .find-boat-hint-legend > span,
  .map-stage.mobile-find-help-mode .find-boat-hint-legend > span {
    grid-template-columns: 23px minmax(0, 1fr) !important;
    font-size: 9.2px !important;
  }

  .find-boat-hint-legend .vehicle-legend-icon-img,
  .map-stage.mobile-find-help-mode .find-boat-hint-legend .vehicle-legend-icon-img {
    width: 22px !important;
    height: 29px !important;
    min-width: 22px !important;
  }
}


/* V061 – mobile-only panel, popup and locate-control refinements.
   Desktop layout and server/storage logic are unchanged. */
@media (max-width: 980px) {
  /* 1. Registration, guide and legal panels: centered, with safe screen margins. */
  .registration-panel,
  .content-panel,
  .content-panel.is-modal,
  .terms-modal-card,
  .rental-request-card {
    position: absolute !important;
    z-index: 720 !important;
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    width: min(430px, calc(100vw - 28px)) !important;
    max-width: calc(100vw - 28px) !important;
    max-height: calc(100dvh - 112px) !important;
    margin: 0 !important;
    padding: 16px !important;
    overflow: auto !important;
    transform: translate(-50%, -50%) !important;
    border-radius: 16px !important;
    box-sizing: border-box !important;
  }

  .registration-panel {
    top: calc(50% + 12px) !important;
  }

  .content-panel.is-open,
  .content-panel.is-modal.is-open,
  .registration-panel.is-open {
    transform: translate(-50%, -50%) !important;
  }

  /* 2. Boat popup: always centered on mobile, including right after publishing. */
  .leaflet-popup.geofishing-boat-popup,
  .geofishing-boat-popup.leaflet-popup,
  .map-stage.map-mode .leaflet-popup.geofishing-boat-popup,
  .map-stage.map-mode .geofishing-boat-popup.leaflet-popup {
    position: fixed !important;
    left: 50% !important;
    top: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
    z-index: 760 !important;
  }

  .geofishing-boat-popup .leaflet-popup-content-wrapper,
  .map-stage.map-mode .geofishing-boat-popup .leaflet-popup-content-wrapper {
    width: min(318px, calc(100vw - 34px)) !important;
    max-width: calc(100vw - 34px) !important;
    max-height: calc(100dvh - 94px) !important;
    overflow: auto !important;
    box-sizing: border-box !important;
  }

  .geofishing-boat-popup .leaflet-popup-content,
  .map-stage.map-mode .geofishing-boat-popup .leaflet-popup-content {
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
  }

  .geofishing-boat-popup .leaflet-popup-tip-container,
  .map-stage.map-mode .geofishing-boat-popup .leaflet-popup-tip-container {
    display: none !important;
  }

  /* 3. Locate button aligned with Leaflet + / - and drawn as a cleaner target. */
  .leaflet-right .leaflet-control-zoom,
  .leaflet-right .leaflet-control.geofishing-locate-control {
    margin-right: 10px !important;
  }

  .leaflet-right .leaflet-control.geofishing-locate-control {
    margin-top: 6px !important;
  }

  .leaflet-control-zoom,
  .geofishing-locate-control {
    width: 34px !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    background: #fff !important;
    box-shadow: var(--soft-shadow) !important;
    box-sizing: border-box !important;
  }

  .leaflet-control-zoom a,
  .geofishing-locate-button {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    display: grid !important;
    place-items: center !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    background: #fff !important;
    color: var(--text) !important;
    line-height: 1 !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }

  .geofishing-locate-button {
    position: relative !important;
    font-size: 0 !important;
  }

  .geofishing-locate-button span {
    display: none !important;
  }

  .geofishing-locate-button::before {
    content: '' !important;
    width: 18px !important;
    height: 18px !important;
    display: block !important;
    border: 2px solid var(--text) !important;
    border-radius: 50% !important;
    box-sizing: border-box !important;
  }

  .geofishing-locate-button::after {
    content: '' !important;
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    width: 5px !important;
    height: 5px !important;
    border-radius: 50% !important;
    background: var(--text) !important;
    transform: translate(-50%, -50%) !important;
  }
}

@media (max-width: 390px) {
  .registration-panel,
  .content-panel,
  .content-panel.is-modal,
  .terms-modal-card,
  .rental-request-card {
    width: calc(100vw - 20px) !important;
    max-width: calc(100vw - 20px) !important;
    max-height: calc(100dvh - 96px) !important;
    padding: 14px !important;
  }

  .geofishing-boat-popup .leaflet-popup-content-wrapper {
    width: min(300px, calc(100vw - 24px)) !important;
    max-width: calc(100vw - 24px) !important;
  }
}
