@import url('https://fonts.googleapis.com/css2?family=Geist:wght@100..900&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --font:      'Geist', 'DM Sans', system-ui, -apple-system, sans-serif;
  --top:       64px;
  --banner-h:  38px;
  --sidebar-w: 276px;
  --offset:    calc(var(--top) + var(--banner-h));

  --black:   #0D0D0D;
  --white:   #FFFFFF;
  --bg:      #F0EEE9;
  --surface: #FFFFFF;
  --border:  rgba(0,0,0,0.07);
  --shadow:  rgba(0,0,0,0.10);
  --text:    #0D0D0D;
  --muted:   #5F5F5F;
  --subtle:  #9B9B9B;
  --red:     #C8102E;
  --green:   #00794A;

  --c-koelte: #0D9488;
  --c-water:  #0566C8;
  --c-park:   #147A37;

  --radius:    8px;
  --radius-lg: 16px;
}

html, body {
  height: 100%;
  overflow: hidden;
  font-family: var(--font);
  font-size: 13px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ── Heat plan banner ────────────────────────────────────────────────────── */
#heat-banner {
  position: fixed;
  top: var(--top);
  left: 0; right: 0;
  height: var(--banner-h);
  z-index: 490;
  display: flex;
  align-items: center;
  transition: background 0.3s;
}

.banner-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 0 20px;
}

.heat-banner--active  { background: linear-gradient(90deg, #7B2D00, #C8102E 40%, #C8561E); }
.heat-banner--inactive { background: rgba(0,0,0,0.48); }

.banner-pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  flex-shrink: 0;
  animation: banner-pulse 2s ease-in-out infinite;
}
.heat-banner--inactive .banner-pulse { animation: none; background: rgba(255,255,255,0.4); }

@keyframes banner-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.5); opacity: 0.7; }
}

.banner-text {
  flex: 1;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.95);
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.banner-toggle-btn {
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.24);
  border-radius: 5px;
  color: rgba(255,255,255,0.80);
  font-family: var(--font);
  font-size: 10.5px;
  font-weight: 500;
  padding: 3px 10px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.12s;
  white-space: nowrap;
}
.banner-toggle-btn:hover { background: rgba(255,255,255,0.24); }

/* ── Topbar ──────────────────────────────────────────────────────────────── */
#topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--top);
  background: var(--black);
  z-index: 500;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  margin-left: auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-mark {
  background: #FFFFFF;
  border-radius: 7px;
  padding: 4px 7px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo-mark img { height: 28px; width: auto; display: block; }

.logo-text { display: flex; flex-direction: column; gap: 1px; }
.logo-org  { font-size: 9.5px; font-weight: 400; color: rgba(255,255,255,0.36); letter-spacing: 0.07em; text-transform: uppercase; }
.logo-title { font-size: 14.5px; font-weight: 600; color: #FFFFFF; letter-spacing: -0.025em; }

/* ── Search ──────────────────────────────────────────────────────────────── */
#search-wrap {
  flex: 1;
  min-width: 0;
  max-width: 360px;
  position: relative;
}

#search-input {
  width: 100%;
  height: 34px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 17px;
  color: rgba(255,255,255,0.90);
  font-family: var(--font);
  font-size: 12.5px;
  padding: 0 14px 0 36px;
  outline: none;
  transition: background 0.12s, border-color 0.12s;
  -webkit-appearance: none;
  letter-spacing: 0.01em;
}
#search-input::placeholder { color: rgba(255,255,255,0.30); }
#search-input:focus { background: rgba(255,255,255,0.11); border-color: rgba(255,255,255,0.20); }
#search-input::-webkit-search-cancel-button { opacity: 0.4; }

.search-icon {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: rgba(255,255,255,0.34);
}

#search-results {
  position: absolute;
  top: calc(100% + 7px);
  left: 0; right: 0;
  background: var(--surface);
  border: 1px solid rgba(0,0,0,0.07);
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06), 0 20px 48px rgba(0,0,0,0.10);
  overflow: hidden;
  z-index: 600;
}
#search-results[hidden] { display: none; }

.sr-item {
  padding: 9px 16px;
  cursor: pointer;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  transition: background 0.1s;
}
.sr-item:last-child { border-bottom: none; }
.sr-item:hover { background: var(--bg); }
.sr-item--local { border-left: 2px solid var(--c-koelte); }
.sr-name { font-size: 13px; font-weight: 500; letter-spacing: -0.01em; color: var(--text); }
.sr-sub  { font-size: 11px; color: var(--muted); margin-top: 1px; }

/* ── Topbar controls ─────────────────────────────────────────────────────── */
.controls { display: flex; align-items: center; gap: 5px; }

.ctrl-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 13px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 7px;
  color: rgba(255,255,255,0.72);
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  white-space: nowrap;
}
.ctrl-btn:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.18); color: #fff; }
.ctrl-btn.active { background: #FFFFFF; border-color: #FFFFFF; color: var(--black); }
.ctrl-btn.icon-only { padding: 0 10px; }

.tips-btn {
  background: rgba(13,148,136,0.28);
  border-color: rgba(13,148,136,0.45);
  color: #5EEAD4;
}
.tips-btn:hover { background: rgba(13,148,136,0.38); border-color: rgba(13,148,136,0.60); color: #99F6E4; }

.lang-btn {
  min-width: 42px;
  justify-content: center;
  font-weight: 600;
  letter-spacing: 0.04em;
  font-size: 11px;
}

.mobile-only { display: none; }
@media (max-width: 768px) { .mobile-only { display: flex; } }

/* ── Map ─────────────────────────────────────────────────────────────────── */
#map {
  position: fixed;
  top: var(--offset);
  left: var(--sidebar-w);
  right: 0;
  bottom: 0;
  z-index: 0;
}

@media (max-width: 768px) {
  #map { left: 0; }
}

/* ── Loading bar ─────────────────────────────────────────────────────────── */
#loader {
  position: fixed;
  top: var(--offset); left: 0; right: 0;
  height: 2px; z-index: 600;
  background: linear-gradient(90deg, transparent, var(--green), #34d399, var(--green), transparent);
  background-size: 300% 100%;
  animation: slide 1.8s ease infinite;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
#loader.on { opacity: 1; }
@keyframes slide { 0%{background-position:100% 0} 100%{background-position:-100% 0} }

/* ── Sidebar ─────────────────────────────────────────────────────────────── */
#sidebar {
  position: fixed;
  top: var(--offset);
  left: 0;
  width: var(--sidebar-w);
  bottom: 0;
  z-index: 440;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}
#sidebar::-webkit-scrollbar { width: 3px; }
#sidebar::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.08); border-radius: 2px; }

/* Mobile sidebar */
@media (max-width: 768px) {
  #sidebar {
    transform: translateX(calc(-1 * var(--sidebar-w)));
    transition: transform 0.26s cubic-bezier(0.2,0,0,1);
    box-shadow: 4px 0 24px rgba(0,0,0,0.14);
    z-index: 460;
  }
  body.sidebar-open #sidebar { transform: translateX(0); }
}

#sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 455;
}
@media (max-width: 768px) {
  body.sidebar-open #sidebar-backdrop { display: block; }
}

/* ── Sidebar sections ────────────────────────────────────────────────────── */
.sidebar-section {
  padding: 10px 0 4px;
  border-bottom: 1px solid var(--border);
}
.sidebar-section:last-child { border-bottom: none; }

.sidebar-section-title {
  padding: 0 14px 6px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: rgba(0,0,0,0.30);
}

.sidebar-spacer { flex: 1; min-height: 12px; }

/* ── Category chips ──────────────────────────────────────────────────────── */
.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 2px 14px 8px;
}

.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  white-space: nowrap;
  --cat-color: var(--c-koelte);
}
.cat-chip:hover {
  border-color: var(--cat-color);
  color: var(--cat-color);
}
.cat-chip.active {
  background: var(--cat-color);
  border-color: var(--cat-color);
  color: #fff;
}

.cat-chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  opacity: 0.85;
}
.cat-chip.active .cat-chip-dot { opacity: 1; background: rgba(255,255,255,0.85) !important; }

/* ── Layer rows ──────────────────────────────────────────────────────────── */
.layer-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  cursor: pointer;
  transition: background 0.1s;
  user-select: none;
}
.layer-row:hover { background: rgba(0,0,0,0.025); }
.layer-row + .layer-row { border-top: 1px solid rgba(0,0,0,0.04); }

.l-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; transition: opacity 0.2s; }
.layer-row:not(.on) .l-dot { opacity: 0.20; }

.l-name { flex: 1; font-size: 12.5px; font-weight: 500; letter-spacing: -0.01em; color: var(--text); transition: color 0.15s; }
.layer-row:not(.on) .l-name { color: var(--muted); }

.l-count { font-size: 11px; font-weight: 500; color: var(--subtle); font-variant-numeric: tabular-nums; min-width: 24px; text-align: right; }
.layer-row.on .l-count { color: var(--green); font-weight: 600; }

.l-sw {
  width: 26px; height: 15px;
  background: rgba(0,0,0,0.13);
  border-radius: 8px;
  position: relative;
  flex-shrink: 0;
  transition: background 0.2s;
}
.l-sw::after {
  content: '';
  position: absolute;
  width: 11px; height: 11px;
  border-radius: 50%;
  top: 2px; left: 2px;
  background: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.18);
  transition: transform 0.2s cubic-bezier(0.2,0,0,1);
}
.layer-row.on .l-sw { background: var(--green); }
.layer-row.on .l-sw::after { transform: translateX(11px); }

/* ── Koelteplaats sub-controls ───────────────────────────────────────────── */
#koelte-controls { padding: 0 0 4px; }

.koelte-search-wrap { position: relative; padding: 4px 14px 2px; }
.koelte-search-icon {
  position: absolute;
  left: 24px; top: 50%;
  transform: translateY(-30%);
  pointer-events: none;
  color: var(--subtle);
}
#koelte-search {
  width: 100%;
  height: 30px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: var(--font);
  font-size: 12px;
  padding: 0 10px 0 28px;
  outline: none;
  transition: border-color 0.12s;
  -webkit-appearance: none;
}
#koelte-search::placeholder { color: var(--subtle); }
#koelte-search:focus { border-color: var(--c-koelte); }
#koelte-search::-webkit-search-cancel-button { opacity: 0.4; cursor: pointer; }

/* ── Filter chips ────────────────────────────────────────────────────────── */
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px 14px 8px;
}
.detail-chips { padding: 8px 0 4px; }

.filter-chip {
  padding: 3px 8px;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  white-space: nowrap;
  line-height: 1.4;
}
.filter-chip:not(:disabled):hover { border-color: var(--c-koelte); color: var(--c-koelte); }
.filter-chip.active { background: var(--c-koelte); border-color: var(--c-koelte); color: #fff; }
.filter-chip.on  { background: #ECFDF5; border-color: #6EE7B7; color: #065F46; }
.filter-chip.on:hover { background: #D1FAE5; border-color: var(--c-koelte); }
.filter-chip.off { background: transparent; border-color: var(--border); color: var(--subtle); cursor: default; text-decoration: line-through; text-decoration-color: rgba(0,0,0,0.18); }

/* ── Heat overlay controls ───────────────────────────────────────────────── */
.heat-dot { background: linear-gradient(135deg, #4EB87A 0%, #F0C040 50%, #C8102E 100%) !important; }
#heat-row:not(.on) .heat-dot { opacity: 0.22; }

.heat-legend { display: flex; align-items: center; gap: 7px; padding: 2px 14px 8px; }
.heat-legend[hidden] { display: none; }
.heat-gradient { flex: 1; height: 4px; border-radius: 2px; background: linear-gradient(to right, #4EB87A, #A8C96D, #F0C040, #F07030, #C8102E); }
.heat-label { font-size: 9.5px; letter-spacing: 0.02em; color: var(--muted); }

/* ── Sidebar contact ─────────────────────────────────────────────────────── */
.sidebar-contact { padding: 10px 14px 16px; }

.contact-text {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 8px;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  color: var(--c-koelte);
  text-decoration: none;
  margin-bottom: 6px;
}
.contact-link:hover { color: #0F766E; text-decoration: underline; }

.contact-emergency {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
}
.contact-emergency strong { color: var(--red); }

.sidebar-attribution {
  font-size: 10px;
  color: var(--subtle);
  margin-top: 8px;
  letter-spacing: 0.02em;
}

/* ── Bottom sheet ────────────────────────────────────────────────────────── */
#sheet {
  position: fixed;
  bottom: 0;
  left: var(--sidebar-w);
  right: 0;
  z-index: 450;
  background: var(--surface);
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -1px 0 rgba(0,0,0,0.06), 0 -4px 40px rgba(0,0,0,0.08);
  max-height: 55vh;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.26s cubic-bezier(0.2,0,0,1);
}
#sheet.open { transform: translateY(0); }

@media (max-width: 768px) {
  #sheet { left: 0; }
}

.sheet-handle {
  width: 32px; height: 3px;
  background: rgba(0,0,0,0.12);
  border-radius: 2px;
  margin: 12px auto 0;
  flex-shrink: 0;
}

.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px 10px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.sheet-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 2px 8px;
  border-radius: 5px;
  margin-bottom: 4px;
}

.sheet-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#sheet-close {
  background: rgba(0,0,0,0.06);
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 5px;
  flex-shrink: 0;
  line-height: 0;
  border-radius: 50%;
  transition: background 0.12s, color 0.12s;
}
#sheet-close:hover { background: rgba(0,0,0,0.10); color: var(--text); }

.sheet-body { overflow-y: auto; flex: 1; padding: 12px 20px 24px; }
.sheet-body::-webkit-scrollbar { width: 3px; }
.sheet-body::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.10); border-radius: 2px; }

/* ── Tags ────────────────────────────────────────────────────────────────── */
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px; border-radius: 5px; border: 1px solid transparent;
  font-size: 11px; font-weight: 500; line-height: 1.4; white-space: nowrap;
}
.tag-dot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.tag-row { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.tag--open   { background: rgba(0,121,74,0.09);  color: #00794A; border-color: rgba(0,121,74,0.18); }
.tag--closed { background: rgba(200,16,46,0.08); color: #B0102A; border-color: rgba(200,16,46,0.14); }
.tag--open .tag-dot   { background: #00794A; }
.tag--closed .tag-dot { background: #C8102E; }
.tag--category { font-weight: 500; }
.tag--inactive { background: rgba(156,163,175,0.12); color: #6B7280; border-color: rgba(156,163,175,0.3); font-weight: 500; }

/* ── Detail: hours left, photo right, photo matches hours height ─────────── */
/* old formatting where the pictures were weird and cropped, change to fit dimensions, and just make bigger.*/
.detail-media-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
  margin-bottom: 10px;
}

/*.detail-media-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 10px;
}*/

.detail-hours-col {
  flex: 1;
  min-width: 0;
}

/*.detail-photo-wrap {
  width: 100%;
}

.detail-photo {
  width: 100%;
  height: auto;
  border-radius: 10px;
  display: block;
}
*/

/* continuation of explanation from a couple dozen lines above.*/
.detail-photo-wrap {
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg);
  display: flex;
}

.detail-photo {
  height: 100%;
  width: auto;
  max-width: 160px;
  display: block;
  object-fit: cover;
}

/* ── Detail: opening hours ───────────────────────────────────────────────── */
.hours-wrap {
  margin-bottom: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.hours-status {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  font-size: 12px;
  border-bottom: 1px solid var(--border);
}
.hours-status--open   { background: rgba(0,121,74,0.07); }
.hours-status--closed { background: rgba(200,16,46,0.05); }
.hours-status--unknown { background: var(--bg); color: var(--muted); font-style: italic; border-bottom: none; }

.hours-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.hours-status--open   .hours-dot { background: #00794A; }
.hours-status--closed .hours-dot { background: #C8102E; }
.hours-status--unknown .hours-dot { background: var(--subtle); }
.hours-status--open span:not(.hours-dot) { color: #065F46; }
.hours-status--closed span:not(.hours-dot) { color: #991B1B; }

.hours-table { padding: 6px 0; }

.hours-row {
  display: flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 4px;
  margin: 1px 4px;
}
.hours-row--today { background: rgba(13,148,136,0.08); }
.hours-row--today .hours-day { color: var(--c-koelte); font-weight: 700; }

.hours-day  { font-size: 11.5px; font-weight: 500; color: var(--muted); width: 28px; flex-shrink: 0; }
.hours-time { font-size: 12px; font-weight: 500; color: var(--text); }
.hours-time--closed { color: var(--subtle); font-style: italic; }

.hours-note {
  font-size: 11.5px;
  color: var(--muted);
  background: var(--bg);
  border-radius: var(--radius);
  padding: 8px 11px;
  margin-bottom: 8px;
  line-height: 1.5;
}

/* ── Detail: secondary info row ──────────────────────────────────────────── */
.detail-secondary-info {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 4px 0 8px;
  border-top: 1px solid var(--border);
  margin-top: 2px;
}

.secondary-pill {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  background: var(--bg);
  border-radius: 4px;
  padding: 2px 8px;
  border: 1px solid var(--border);
}
.secondary-pill::before {
  content: "✓ ";
  color: var(--green);
  font-weight: 700;
}

/* ── Detail: amenities + notes ───────────────────────────────────────────── */
.detail-notes {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  padding: 8px 0 8px;
  border-top: 1px solid var(--border);
}

.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

.btn-website {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px;
  background: var(--c-koelte); color: #fff;
  border: none; border-radius: var(--radius);
  font-family: var(--font); font-size: 13px; font-weight: 500;
  cursor: pointer; text-decoration: none;
  transition: background 0.12s; line-height: 1;
}
.btn-website:hover { background: #0F766E; }

.btn-directions {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px;
  background: var(--black); color: #fff;
  border: none; border-radius: var(--radius);
  font-family: var(--font); font-size: 13px; font-weight: 500;
  cursor: pointer; text-decoration: none;
  transition: background 0.12s; line-height: 1;
}
.btn-directions:hover { background: #2A2A2A; }

/* ── Sheet: property grid ────────────────────────────────────────────────── */
.prop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.prop-cell { background: var(--bg); border-radius: var(--radius); padding: 9px 12px; }
.prop-cell.full { grid-column: 1 / -1; }
.prop-label { font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(0,0,0,0.34); margin-bottom: 3px; }
.prop-value { font-size: 12.5px; font-weight: 500; color: var(--text); line-height: 1.4; }

/* ── Sheet: nearby list ──────────────────────────────────────────────────── */
.nearby-summary { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }

.nearby-list { list-style: none; }

@keyframes slideIn { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: translateX(0); } }

.nearby-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 8px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  cursor: pointer; border-radius: var(--radius);
  margin: 0 -8px;
  opacity: 0;
  animation: slideIn 0.20s ease forwards;
  transition: background 0.1s;
}
.nearby-item:hover { background: var(--bg); }
.nearby-item:last-child { border-bottom: none; }

.ni-dot  { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.ni-left { flex: 1; overflow: hidden; display: flex; flex-direction: column; gap: 1px; }
.ni-name { font-weight: 500; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ni-type { font-size: 11px; color: var(--muted); }
.ni-dist { font-size: 12px; font-weight: 600; flex-shrink: 0; }

.ni-bar-wrap { height: 2px; background: rgba(0,0,0,0.07); border-radius: 1px; margin-top: 4px; overflow: hidden; }
.ni-bar-fill { height: 100%; border-radius: 1px; transition: width 0.5s cubic-bezier(0.2,0,0,1); }

/* ── Buurt detail ────────────────────────────────────────────────────────── */
.buurt-score-row { display: flex; align-items: baseline; justify-content: space-between; padding: 4px 0 10px; border-bottom: 1px solid var(--border); margin-bottom: 10px; }
.buurt-score-label { font-size: 11px; color: var(--muted); font-weight: 500; }
.buurt-score-val   { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }

.buurt-pills { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
.buurt-pill  { flex: 1 1 calc(33% - 6px); min-width: 68px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 5px 8px; }
.bp-label { font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 2px; }
.bp-val   { font-size: 13px; font-weight: 700; color: var(--text); }
.radar-wrap { padding: 4px 0 6px; }

/* ── Leaflet overrides ───────────────────────────────────────────────────── */
.leaflet-control-zoom { border: none !important; box-shadow: none !important; margin-right: 14px !important; margin-bottom: 14px !important; }
.leaflet-control-zoom a { background: var(--surface) !important; border: 1px solid rgba(0,0,0,0.08) !important; color: var(--text) !important; width: 32px !important; height: 32px !important; line-height: 32px !important; font-size: 17px !important; font-weight: 300 !important; box-shadow: 0 1px 4px rgba(0,0,0,0.07) !important; }
.leaflet-control-zoom a:hover { background: var(--bg) !important; color: var(--green) !important; }
.leaflet-control-zoom-in  { border-radius: var(--radius) var(--radius) 0 0 !important; }
.leaflet-control-zoom-out { border-radius: 0 0 var(--radius) var(--radius) !important; }
.leaflet-control-attribution { background: rgba(255,255,255,0.85) !important; font-size: 10px !important; color: var(--subtle) !important; border-radius: 6px 0 0 0 !important; backdrop-filter: blur(4px) !important; }
.leaflet-control-attribution a { color: var(--muted) !important; }
.leaflet-popup-content-wrapper { background: var(--surface) !important; border: 1px solid rgba(0,0,0,0.07) !important; border-radius: 12px !important; color: var(--text) !important; box-shadow: 0 4px 24px rgba(0,0,0,0.10) !important; padding: 0 !important; }
.leaflet-popup-content { margin: 0 !important; }
.leaflet-popup-tip { background: var(--surface) !important; }
.popup-box  { padding: 11px 14px; }
.popup-name { font-size: 13px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 2px; }
.popup-sub  { font-size: 11px; color: var(--muted); }

/* ── Hover card ──────────────────────────────────────────────────────────── */
#hover-card {
  position: fixed;
  z-index: 800;
  pointer-events: none;
  background: rgba(13,13,13,0.92);
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 10px 14px 11px;
  min-width: 150px;
  max-width: 230px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.28);
  opacity: 0;
  transform: translateY(4px) scale(0.97);
  transition: opacity 0.12s ease, transform 0.12s ease;
}
#hover-card.visible { opacity: 1; transform: translateY(0) scale(1); }
.hc-accent  { height: 2px; border-radius: 1px; margin-bottom: 7px; }
.hc-name    { font-size: 12px; font-weight: 600; color: #fff; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hc-sub     { font-size: 10px; color: rgba(255,255,255,0.42); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── User location marker ────────────────────────────────────────────────── */
.user-marker-icon { background: none !important; border: none !important; }
.user-dot  { position: absolute; width: 14px; height: 14px; left: 7px; top: 7px; background: var(--green); border: 2.5px solid #fff; border-radius: 50%; box-shadow: 0 2px 8px rgba(0,121,74,0.48); z-index: 2; }
.user-pulse { position: absolute; width: 28px; height: 28px; left: 0; top: 0; background: rgba(0,121,74,0.18); border-radius: 50%; animation: pulse-ring 2s ease-out infinite; z-index: 1; }
@keyframes pulse-ring { 0%{transform:scale(0.65);opacity:0.9} 100%{transform:scale(2.6);opacity:0} }

/* ── Tips page ───────────────────────────────────────────────────────────── */
#tips-page {
  position: fixed;
  inset: 0;
  z-index: 700;
  background: var(--bg);
  transform: translateX(100%);
  transition: transform 0.30s cubic-bezier(0.2,0,0,1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  pointer-events: none;
}
#tips-page.open { transform: translateX(0); pointer-events: auto; }

.tips-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: var(--top);
  background: var(--black);
  flex-shrink: 0;
  gap: 12px;
}

.tips-back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 7px;
  color: rgba(255,255,255,0.75);
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 500;
  padding: 0 12px;
  height: 34px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.tips-back-btn:hover { background: rgba(255,255,255,0.13); color: #fff; }

.tips-page-title {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.02em;
}

.tips-page-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 0 40px;
}
.tips-page-body::-webkit-scrollbar { width: 3px; }
.tips-page-body::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius: 2px; }

/* Tips hero */
.tp-hero {
  background: linear-gradient(135deg, #134E4A, #0F766E 50%, #0D9488);
  padding: 40px 28px 32px;
  color: white;
}
.tp-hero-title { font-size: 32px; font-weight: 800; letter-spacing: -0.04em; line-height: 1.1; margin-bottom: 8px; }
.tp-hero-sub   { font-size: 14px; opacity: 0.78; font-weight: 400; }

/* Heat plan explainer */
.tp-heatplan-box {
  background: white;
  margin: 16px 16px 0;
  border-radius: 12px;
  padding: 16px 18px;
  border-left: 3px solid var(--c-koelte);
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.tp-heatplan-title { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 5px; }
.tp-heatplan-body  { font-size: 12.5px; color: var(--muted); line-height: 1.7; }

/* Tips grid */
.tp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 16px 16px 0;
}
@media (max-width: 600px) { .tp-grid { grid-template-columns: 1fr; } }

.tp-card {
  background: white;
  border-radius: 12px;
  padding: 16px 16px 18px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  border: 1px solid var(--border);
}
.tp-card-icon  { font-size: 24px; margin-bottom: 10px; }
.tp-card-title { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 6px; letter-spacing: -0.01em; }
.tp-card-body  { font-size: 12px; color: var(--muted); line-height: 1.7; }

/* Emergency callout */
.tp-emergency {
  margin: 16px 16px 0;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: 12px;
  padding: 18px 18px 20px;
}
.tp-emergency-icon  { font-size: 24px; margin-bottom: 8px; }
.tp-emergency-title { font-size: 14px; font-weight: 700; color: #991B1B; margin-bottom: 7px; }
.tp-emergency-body  { font-size: 12.5px; color: #7F1D1D; line-height: 1.7; }

/* Disclaimer */
.tp-disclaimer {
  margin: 16px 16px 0;
  font-size: 11px;
  color: var(--subtle);
  line-height: 1.65;
  padding: 12px 14px;
  background: white;
  border-radius: 8px;
  border: 1px solid var(--border);
}

/* ── Contact page ─────────────────────────────────────────────────────────── */
#contact-page {
  position: fixed; inset: 0; z-index: 600;
  background: var(--surface);
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
  pointer-events: none;
  display: flex; flex-direction: column;
}
#contact-page.open { transform: translateX(0); pointer-events: auto; }

.contact-page-btn {
  width: 100%;
  justify-content: center;
  gap: 7px;
  background: #1a1a2e;
  /* #0D9488 */
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 12.5px;
  font-weight: 600;
  margin-top: 4px;
  cursor: pointer;
  transition: opacity 0.15s;
}
.contact-page-btn:hover { opacity: 0.88; }

/* Contact page cards */
.cp-card {
  margin: 0 16px 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px 18px;
}
.cp-card--highlight {
  background: #EFF9F8;
  border-color: #99D6D0;
}
.cp-card-heading {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 14px;
}
.cp-card-icon { font-size: 18px; line-height: 1; }
.cp-card-title { font-size: 15px; font-weight: 700; color: var(--text); letter-spacing: -0.02em; }
.cp-card-body {
  font-size: 13px; color: var(--muted); line-height: 1.65;
  margin: 0 0 14px; padding: 0;
}
.cp-row {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}
.cp-row:first-of-type { border-top: none; }
.cp-row-label {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600; color: var(--subtle);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.cp-row-icon { font-size: 12px; line-height: 1; }
.cp-row-value {
  font-size: 13.5px; color: var(--text); line-height: 1.55;
  display: flex; flex-direction: column; gap: 2px;
}
.cp-link {
  color: var(--teal); text-decoration: none; font-weight: 500;
}
.cp-link:hover { text-decoration: underline; }
.cp-sub {
  font-size: 11.5px; color: var(--muted);
}
