/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --brand:      #e63946;
  --brand-dark: #c1121f;
  --bg-dark:    #1a1a2e;
  --bg-card:    #ffffff;
  --text:       #1a1a2e;
  --text-muted: #6b7280;
  --border:     #e5e7eb;
  --pill-active-bg:   #e63946;
  --pill-active-text: #ffffff;
  --shadow-sm:  0 1px 3px rgba(0,0,0,.12);
  --shadow-md:  0 4px 16px rgba(0,0,0,.18);
  --shadow-lg:  0 8px 32px rgba(0,0,0,.24);
  --radius:     12px;
  --radius-sm:  8px;
  --transition: 0.22s ease;
}

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  color: var(--text);
  background: var(--bg-dark);
}

/* ── Map ── */
#map {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ── Header Overlay (top-left) ── */
#header-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg-dark);
  color: #ffffff;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 10px 14px;
  box-shadow: var(--shadow-md);
}

#header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

#site-name {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}

#beta-badge {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1a1a2e;
  background: #f0c040;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1.4;
}

#stat-bar {
  margin-top: 4px;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.65);
  display: flex;
  gap: 6px;
  align-items: center;
}

.stat-sep { opacity: 0.4; }

/* ── Stat BHK filter pills ── */
#stat-filter {
  display: flex;
  gap: 4px;
  margin-top: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
#stat-filter::-webkit-scrollbar { display: none; }

.stat-pill {
  padding: 3px 9px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.22);
  background: transparent;
  color: rgba(255,255,255,0.6);
  font-size: 0.7rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.stat-pill:hover { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.9); }
.stat-pill.active {
  background: rgba(255,255,255,0.18);
  color: #fff;
  border-color: rgba(255,255,255,0.5);
}

/* ── User Badge ── */
#user-badge {
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
}

#user-initial {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0;
}

/* ── User Profile Modal ── */
#user-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 490;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
#user-modal-backdrop.hidden { display: none; }

#user-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 500;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 32px 24px 24px;
  width: min(300px, calc(100vw - 40px));
  text-align: center;
}
#user-modal.hidden { display: none; }

#user-modal-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

#btn-user-modal-close {
  position: absolute;
  top: -20px;
  right: -12px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--text-muted);
  padding: 4px 8px;
}

#user-modal-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

#user-modal-inner #user-display-name {
  max-width: 240px;
  font-size: 0.9rem;
  margin-bottom: 2px;
}

#user-modal-inner .btn-sign-out {
  margin-top: 14px;
  width: 100%;
}

#user-display-name {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.user-meta {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.btn-sign-out {
  width: 100%;
  padding: 6px 0;
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition);
}
.btn-sign-out:hover { background: #f9fafb; }

/* ── Privacy Policy Modal ── */
#privacy-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 500;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
#privacy-backdrop.hidden { display: none; }

#privacy-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 501;
  width: min(92vw, 540px);
  max-height: 82vh;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#privacy-modal-inner {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
#privacy-modal.hidden { display: none; }

#privacy-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
#privacy-modal-title {
  font-size: 1.05rem;
  font-weight: 700;
}
#btn-privacy-close {
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px 6px;
  line-height: 1;
}
#btn-privacy-close:hover { color: var(--text); }

#privacy-modal-body {
  padding: 16px 20px 24px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  line-height: 1.65;
  font-size: 0.875rem;
  color: var(--text);
}
#privacy-modal-body h3 {
  font-size: 0.875rem;
  font-weight: 700;
  margin: 18px 0 6px;
  color: var(--text);
}
#privacy-modal-body h3:first-of-type { margin-top: 4px; }
#privacy-modal-body p { margin-bottom: 8px; color: var(--text-muted); }
#privacy-modal-body ul {
  margin: 6px 0 10px 18px;
  color: var(--text-muted);
}
#privacy-modal-body ul li { margin-bottom: 4px; }
#privacy-modal-body strong { color: var(--text); }
.privacy-updated {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 14px !important;
}

/* ── Inline link style (used in auth note + privacy modal) ── */
.inline-link {
  color: var(--brand);
  text-decoration: none;
  font-weight: 500;
}
.inline-link:hover { text-decoration: underline; }

/* ── Privacy footer (fixed bottom-right) ── */
#privacy-footer {
  position: fixed;
  bottom: 8px;
  right: 12px;
  z-index: 99;
  font-size: 0.7rem;
}
#privacy-footer .inline-link {
  color: rgba(255,255,255,0.45);
  font-weight: 400;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
#privacy-footer .inline-link:hover { color: rgba(255,255,255,0.8); }

/* ── Hook Bar (inside header overlay) ── */
#hook-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  background: rgba(249,115,22,0.15);
  border: 1px solid rgba(249,115,22,0.35);
  border-radius: 6px;
  padding: 5px 6px 5px 10px;
  overflow: hidden;
}

#hook-bar-text {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

#hook-bar-text strong {
  color: #fb923c;
  font-weight: 700;
}

#hook-learn-btn {
  background: #f97316;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s;
}

#hook-learn-btn:hover { background: #ea6c0a; }

/* ── Pin CTA (bottom-center) ── */
#pin-cta-wrap {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
}

/* ── Search Bar (hidden by default) ── */
#search-bar-wrap {
  position: fixed;
  top: 136px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 8px 12px;
  width: min(420px, calc(100vw - 24px));
}

#search-bar-wrap.hidden { display: none; }

#locality-search {
  flex: 1;
  border: none;
  outline: none;
  font-size: 0.95rem;
  color: var(--text);
  background: transparent;
}

#btn-search-cancel {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--text-muted);
  padding: 2px 4px;
  line-height: 1;
}

/* ── Location permission nudge ── */
#location-prompt {
  position: fixed;
  top: 150px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 12px 14px;
  width: min(400px, calc(100vw - 24px));
  border-left: 3px solid #4285F4;
}

#location-prompt.hidden { display: none; }

#location-prompt-icon { font-size: 1.3rem; flex-shrink: 0; margin-top: 1px; }

#location-prompt-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

#location-prompt-text strong {
  font-size: 0.85rem;
  color: var(--text);
}

#location-prompt-text span {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

#btn-location-dismiss {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.9rem;
  flex-shrink: 0;
  padding: 0 2px;
}

/* ── Map action buttons ── */
/* ── Rent Range Legend ── */
#rent-legend {
  position: fixed;
  left: 12px;
  bottom: 28px;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 8px;
  padding: 7px 10px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.legend-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
}
.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

#map-actions {
  position: fixed;
  right: 12px;
  bottom: 120px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#map-actions button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: #fff;
  box-shadow: var(--shadow-md);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

#map-actions button:hover { background: #f0f0f0; }

#btn-locate { color: #4285F4; }

/* ── Buttons ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--brand);
  color: #ffffff;
  border: none;
  border-radius: 50px;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: background var(--transition), transform 0.1s;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}

.btn-primary:hover  { background: var(--brand-dark); }
.btn-primary:active { transform: scale(0.97); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-full { width: 100%; }

.btn-text {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.875rem;
  cursor: pointer;
  padding: 8px 0;
  text-decoration: underline;
  -webkit-tap-highlight-color: transparent;
}

/* ── Google Sign-in Button ── */
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 14px 20px;
  background: #fff;
  border: 1.5px solid #dadce0;
  border-radius: 50px;
  font-size: 0.975rem;
  font-weight: 600;
  color: #3c4043;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s, background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.btn-google:hover  { box-shadow: var(--shadow-md); background: #f8f9fa; }
.btn-google:active { background: #f1f3f4; }

.google-logo {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ── Auth Sheet ── */
#auth-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 300;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
#auth-backdrop.hidden { display: none; }

#auth-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 400;
  background: var(--bg-card);
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: var(--shadow-lg);
  padding: 0 24px 44px;
  transform: translateY(0);
  transition: transform var(--transition);
  text-align: center;
}
#auth-sheet.hidden {
  transform: translateY(100%);
  pointer-events: none;
  display: block !important;
}
#auth-sheet.truly-hidden { display: none !important; }

#auth-sheet-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 8px;
}

#auth-icon {
  font-size: 2.2rem;
  margin: 12px 0 6px;
}

#auth-heading {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 6px;
}

#auth-copy {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  max-width: 280px;
  line-height: 1.5;
}

#auth-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 14px;
  margin-bottom: 6px;
  max-width: 260px;
  line-height: 1.5;
}

/* ── Backdrop ── */
#sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 300;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  transition: opacity var(--transition);
}

#sheet-backdrop.hidden { display: none; }

/* ── Bottom Sheet ── */
#rent-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 400;
  background: var(--bg-card);
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 20px 40px;
  transform: translateY(0);
  transition: transform var(--transition);
}

#rent-sheet.hidden {
  transform: translateY(100%);
  pointer-events: none;
  display: block !important;
}
#rent-sheet.truly-hidden { display: none !important; }

#sheet-handle {
  width: 40px;
  height: 4px;
  background: var(--border);
  border-radius: 4px;
  margin: 12px auto 4px;
}

#sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 16px;
}

#sheet-header h2 {
  font-size: 1.15rem;
  font-weight: 700;
}

#btn-sheet-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  -webkit-tap-highlight-color: transparent;
}

/* ── Form ── */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.required { color: var(--brand); }
.optional  { color: var(--text-muted); font-weight: 400; font-size: 0.8rem; }

.form-group input[type="number"],
.form-group input[type="text"] {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  color: var(--text);
  outline: none;
  transition: border-color var(--transition);
  background: #fafafa;
  -webkit-appearance: none;
}

.form-group input:focus {
  border-color: var(--brand);
  background: #fff;
}

/* hide number spinners */
.form-group input[type="number"]::-webkit-inner-spin-button,
.form-group input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; }
.form-group input[type="number"] { -moz-appearance: textfield; }

/* ── Pill Group ── */
.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  padding: 8px 16px;
  border-radius: 50px;
  border: 1.5px solid var(--border);
  background: #fafafa;
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}

.pill:hover  { border-color: var(--brand); color: var(--brand); }
.pill.active {
  background: var(--pill-active-bg);
  border-color: var(--pill-active-bg);
  color: var(--pill-active-text);
  font-weight: 600;
}

/* ── Comparison Widget ── */
.comparison-widget {
  margin-top: 8px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.45;
  transition: opacity 0.2s;
}
.comparison-widget.ok   { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.comparison-widget.high { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.comparison-widget.low  { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }

/* ── Form error ── */
#form-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.875rem;
  margin-bottom: 16px;
}
#form-error.hidden { display: none; }

/* ── About Sheet ── */
#about-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 450;
}
#about-backdrop.hidden { display: none; }

#about-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 460;
  background: var(--bg-card);
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: var(--shadow-lg);
  padding: 0 20px 40px;
  transform: translateY(0);
  transition: transform var(--transition);
}

#about-sheet.hidden {
  transform: translateY(100%);
  pointer-events: none;
  display: block !important;
}
#about-sheet.truly-hidden { display: none !important; }

#about-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0 12px;
}

#about-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

#btn-about-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--text-muted);
  padding: 4px;
}

/* Card swiper */
#card-swiper { overflow: hidden; padding-bottom: 8px; }

#card-track {
  display: flex;
  transition: transform 0.3s ease;
}

.how-card {
  min-width: 100%;
  padding: 8px 4px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

.how-card-icon {
  font-size: 2.8rem;
  line-height: 1;
}

.how-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.how-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 320px;
}

/* Feature list card */
.how-card-features {
  list-style: none;
  text-align: left;
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.how-card-features li {
  display: flex;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.4;
  align-items: flex-start;
}

.how-card-features li span:first-child {
  font-size: 1.05rem;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Live stats card */
.how-card-stats {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin: 4px 0 8px;
}

.how-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.how-stat-item strong {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--brand);
  line-height: 1;
}

.how-stat-item span {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.3;
}

#card-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 4px 0 16px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: background 0.2s;
}

.dot.active { background: var(--brand); }

#card-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.card-nav-btn {
  flex: 1;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 1rem;
  cursor: pointer;
  color: var(--text);
  transition: background 0.15s;
}

.card-nav-btn:hover { background: #f5f5f5; }
.card-nav-btn:disabled { opacity: 0.35; cursor: default; }

/* ── Toast ── */
#toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 600;
  background: var(--bg-dark);
  color: #fff;
  padding: 10px 22px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.4s;
  white-space: nowrap;
}
#toast.hidden      { opacity: 0; display: block !important; pointer-events: none; }
#toast.truly-hidden { display: none !important; }

/* ── Share Panel ── */
#share-panel {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
#share-panel.hidden { display: none; }

#share-inner {
  background: #fff;
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 480px;
  padding: 32px 24px 44px;
  text-align: center;
}

#share-icon { font-size: 2.5rem; margin-bottom: 8px; }

#share-text {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 24px;
}

#share-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.btn-share {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 50px;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.btn-share:active { opacity: 0.8; }

.btn-whatsapp { background: #25d366; color: #fff; }
.btn-copy     { background: var(--bg-dark); color: #fff; }

/* ── Info Window ── */
.iw-wrap {
  padding: 4px 2px;
  min-width: 180px;
}
.iw-locality {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.iw-rent {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--brand);
  margin-bottom: 4px;
}
.iw-meta {
  font-size: 0.8rem;
  color: var(--text);
  margin-bottom: 2px;
}
.iw-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── Vote Buttons (inside info window) ── */
.iw-votes {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  align-items: center;
  border-top: 1px solid var(--border);
  padding-top: 10px;
  flex-wrap: wrap;
}

.iw-share-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 11px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: #fafafa;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.iw-share-btn:hover {
  background: #f0f0f0;
  color: var(--text);
}

.vote-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 13px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: #fafafa;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}

.vote-btn:hover               { border-color: #10b981; color: #059669; background: #f0fdf4; }
.vote-btn--active             { background: #f0fdf4; border-color: #10b981; color: #059669; font-weight: 700; }
.vote-btn--down:hover         { border-color: #f87171; color: #dc2626; background: #fef2f2; }
.vote-btn--down-active        { background: #fef2f2; border-color: #f87171; color: #dc2626; font-weight: 700; }

/* Credibility badge */
.iw-cred {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  margin-top: 6px;
  margin-bottom: 2px;
}
.iw-cred--verified { background: #f0fdf4; color: #15803d; }
.iw-cred--disputed { background: #fff7ed; color: #c2410c; }

/* Anonymous note */
.iw-anon {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 8px;
  opacity: 0.65;
}

/* ── Utility ── */
.hidden { display: none !important; }

/* ── Desktop tweaks ── */
@media (min-width: 640px) {
  #header-overlay {
    top: 12px;
    left: 12px;
    right: auto;
    border-radius: var(--radius);
    min-width: 160px;
  }

  #search-bar-wrap {
    top: 12px;
  }

  #location-prompt {
    top: 80px;
  }

  #rent-sheet {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: 480px;
    border-radius: var(--radius) var(--radius) 0 0;
  }
  #rent-sheet.hidden {
    transform: translateX(-50%) translateY(100%);
  }
  #auth-sheet {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: 420px;
  }
  #auth-sheet.hidden {
    transform: translateX(-50%) translateY(100%);
  }
  #pin-cta-wrap { bottom: 36px; }
}
