/* ========================================
   MOBILE STYLES - MineMarket
   Breakpoints: 1200px → 360px
   Auto-extracted and combined from main.css
   ======================================== */

/* Mobile-only line breaks — hidden on desktop */
.mobile-br{display:none}

/* ----- Map Popup Card Styling ----- */
/* Override Leaflet default popup styles to match listing cards */
.leaflet-popup-content-wrapper {
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
}

.leaflet-popup-content {
  margin: 0 !important;
  width: auto !important;
}

.leaflet-popup-tip-container {
  display: none !important;
}

.leaflet-popup-close-button {
  display: none !important;
}

/* MapLibre GL JS popup overrides (mirrors Leaflet styles above) */
.maplibregl-popup-content {
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
}
.maplibregl-popup-tip {
  display: none !important;
}
.maplibregl-popup-close-button {
  display: none !important;
}

/* Popup card hover effects */
.map-popup-card button:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

/* ----- Hide Map Controls When Modals Are Open ----- */
/* Hide mobile map controls when any modal is visible (using :has selector) */
body:has(.modal-overlay.active) .mobile-layer-toggle,
body:has(.modal-overlay.active) .mobile-back-to-list,
body:has(.modal-overlay.active) .mobile-view-toggle,
body:has(.modal-overlay[style*="flex"]) .mobile-layer-toggle,
body:has(.modal-overlay[style*="flex"]) .mobile-back-to-list,
body:has(.modal-overlay[style*="flex"]) .mobile-view-toggle {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* ----- Safe Area (iPhone X+ notch support) ----- */
@supports (padding: env(safe-area-inset-top)) {
  /* Ensure content doesn't hide behind notch or home indicator */
  body {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }

  header {
    padding-top: max(12px, env(safe-area-inset-top));
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }

  .site-footer {
    padding-bottom: max(16px, env(safe-area-inset-bottom));
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }

  .modal {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }

  .mobile-nav {
    padding-top: max(20px, env(safe-area-inset-top));
    padding-bottom: max(20px, env(safe-area-inset-bottom));
  }

  /* Fixed elements need safe area awareness */
  .notification-dropdown {
    top: max(70px, calc(60px + env(safe-area-inset-top))) !important;
  }
}

/* ----- 1200px and below ----- */
@media (max-width: 1200px) {
  /* Dashboard */
  .dashboard-grid {
    grid-template-columns: 250px 1fr;
  }
}

/* ----- 1100px and below ----- */
@media (max-width: 1100px) {
  .explore-listings-grid{grid-template-columns:repeat(2,1fr)}
}

/* ----- 1024px and below ----- */
@media (max-width: 1024px) {
  .news-grid{grid-template-columns:repeat(2,1fr)}
  .news-featured-card{grid-template-columns:1fr}
  .news-featured-image{height:200px}
}

/* ----- 900px and below ----- */
@media (max-width: 900px) {
  /* Header & Navigation */
  header{flex-wrap:wrap;gap:10px;padding:12px 16px}
  header nav{display:none}
  .hamburger{display:flex}
  .mobile-nav-overlay,.mobile-nav{display:block}
  .auth-buttons{display:none}
  .brand-logo{width:45px;height:45px}
  .brand-text-title{font-size:1.2rem}
  .brand-text-sub{font-size:.7rem}

  /* Insight Panel */
  .insight-body{flex-direction:column;height:auto;max-height:80vh}
  .insight-content{border-right:none;border-bottom:1px solid var(--border);max-height:50vh}
  .insight-chat{width:100%;height:clamp(180px, 30vh, 300px)}

  /* Grids */
  .mm-ir-snapshot-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .mm-ir-grid-2{grid-template-columns:minmax(0,1fr)}
  .kpi-row{grid-template-columns:repeat(2,1fr)}

  /* Explore Layout */
  .explore-layout{flex-direction:column;height:auto}
  .explore-listings-panel{width:100%;min-width:auto;max-height:none;overflow:visible}
  .explore-map-panel{min-height:200px;height:clamp(220px, 38vh, 420px);order:-1}

  /* Dashboard & Listings */
  .dashboard-grid{grid-template-columns:1fr}
  .dashboard-left-column{display:none}
  .list-mine-grid{grid-template-columns:1fr}
}

/* ----- 800px and below ----- */
@media (max-width: 800px) {
  .recommended-card{flex-direction:column}
  .recommended-card-image{width:100%;height:180px;min-height:180px}
  .recommended-card-content{padding:20px}
  .recommended-card-stats{flex-wrap:wrap;gap:16px}
}

/* ----- 768px and below ----- */
@media (max-width: 768px) and (orientation: landscape) {
  .modal {
    max-height: 85vh !important;
  }
  .explore-map-panel {
    height: 55vh !important;
    min-height: 150px !important;
  }
}

@media (max-width: 768px) {
  /* Grids */
  .listings-grid{grid-template-columns:1fr}
  .detailed-grid{grid-template-columns:1fr}
  .news-grid{grid-template-columns:1fr!important}
  .listings{grid-template-columns:repeat(auto-fill,minmax(280px,1fr))!important;gap:16px!important}

  /* Footer */
  .footer-content{display:flex;flex-wrap:wrap;gap:6px}
  .footer-divider{display:none}

  /* Ticker */
  .commodity-ticker-section{padding:10px 12px}
  .ticker-header{padding-right:12px}
  .ticker-item{padding:5px 10px;gap:6px}
  .ticker-track{animation-duration:20s}

  /* Dashboard */
  #dashboard>div:last-child{grid-template-columns:1fr!important}
  #dashboard>div[style*="grid-template-columns: 2fr 1fr"]{display:block!important}
  #dashboard .dashboard-stats{grid-template-columns:repeat(2,1fr)!important}
  #dashboard>div>div:last-child{margin-top:20px}
  .dashboard-grid{display:block!important}
  .dashboard-grid>div:last-child{margin-top:20px}
  .quick-actions-grid{grid-template-columns:repeat(2,1fr)!important}

  /* Profile */
  #profile>div{grid-template-columns:1fr!important}
  #profile>div>div[style*="grid-template-columns: 1fr 2fr"]{display:block!important}
  #profile .card{margin-bottom:16px}
  #profile div[style*="grid-template-columns: repeat(3, 1fr)"],
  #profile div[style*="grid-template-columns: repeat(4, 1fr)"]{grid-template-columns:1fr!important}
  .profile-grid{display:block!important}
  .profile-grid>.card:first-child{margin-bottom:16px}
  .profile-grid>div[style*="grid-template-columns: repeat(2, 1fr)"]{display:block!important}
  .profile-grid>div[style*="grid-template-columns: repeat(2, 1fr)"]>div{margin-bottom:0!important}
  .profile-grid>div[style*="grid-template-columns: repeat(2, 1fr)"]>div>.card{margin-bottom:20px!important}

  /* Forms */
  .field-row,div[style*="grid-template-columns: 1fr 1fr"]{grid-template-columns:1fr!important;display:grid!important}
  #edit-listing-modal div[style*="grid-template-columns: 1fr 1fr"]{grid-template-columns:1fr!important}
  input[type=text],input[type=email],input[type=password],input[type=number],input[type=tel],input[type=url],select,textarea{font-size:16px!important}

  /* Analyzer/Insight Report Form - Mobile Compact Single-Screen Layout */
  .insight-input-tabs{display:none!important}
  .insight-form-row{flex-direction:column!important;align-items:stretch!important;gap:14px!important}
  .insight-panel[data-tab-panel]{display:block!important;width:100%!important}
  .insight-or-divider{display:none!important}
  .insight-desktop-generate{display:none!important}
  .insight-mobile-email-section{display:block!important;margin-top:14px!important}
  #detailed-report-section{display:none!important}
  .insight-disclaimer-desktop{display:none!important}
  .insight-disclaimer-mobile{display:block!important}
  .insight-profile-subtitle{display:none!important}
  .insight-placeholder-desktop{display:none!important}
  .insight-placeholder-mobile{display:block!important}
  .fixed-chat-box{display:none!important}

  /* About page - mobile layout */
  #about [style*="grid-template-columns: repeat(auto-fit, minmax(300px"]{grid-template-columns:1fr!important;gap:16px!important;margin-bottom:20px!important}
  #about [style*="grid-template-columns: 1fr 350px"]{grid-template-columns:1fr!important;gap:16px!important;margin-bottom:20px!important}
  #about [style*="grid-template-columns: 1fr 350px"] > div:first-child{padding:24px!important}
  #about [style*="grid-template-columns: 1fr 350px"] > div:first-child h2{margin-bottom:16px!important;font-size:1.3rem!important}
  #about [style*="grid-template-columns: 1fr 350px"] > div:last-child{width:100%!important;max-width:100%!important;min-height:auto!important;height:auto!important;border-radius:16px;overflow:hidden}
  #about [style*="grid-template-columns: 1fr 350px"] > div:last-child img{width:100%!important;height:auto!important;min-height:auto!important;display:block!important;object-fit:cover;object-position:center top;aspect-ratio:4/5}
  #about [style*="padding: 32px"]{padding:20px!important}
  #about [style*="padding: 40px"]{padding:20px!important}
  #about [style*="text-align: center; margin-bottom: 48px"]{margin-bottom:24px!important}
  #about h1{font-size:1.6rem!important}
  #about h3[style*="font-size: 1.4rem"]{font-size:1.15rem!important}
  /* Testimonials - compact on mobile */
  .review-card{padding:0 10px!important}
  .review-card p[style*="font-size: 1.15rem"]{font-size:0.95rem!important;line-height:1.6!important;margin-bottom:16px!important}
  .review-card [style*="font-size: 2.5rem"]{font-size:1.8rem!important;margin-bottom:10px!important}
  /* Hide overlay arrows on mobile — use dots to navigate */
  .reviews-carousel > button[onclick*="moveReviewCarousel"]{display:none!important}
  /* Dots fix */
  .review-dot{width:8px!important;height:8px!important}
  #about [style*="margin-top: 24px; display: flex; gap: 16px"]{gap:10px!important;flex-wrap:wrap}
  #about [style*="margin-top: 24px; display: flex; gap: 16px"] a{padding:8px 12px!important;font-size:0.85rem!important}
  .explore-subtitle-desktop{display:none!important}
  .explore-subtitle-mobile{display:block!important}

  .mobile-br{display:inline!important}

  /* Admin platform stats - compact 2x2 grid */
  #admin-platform-stats-skeleton,#admin-platform-stats-content{grid-template-columns:repeat(2,1fr)!important;gap:8px!important}
  #admin-platform-stats-content > div,#admin-platform-stats-skeleton > div{padding:8px!important}
  #admin-platform-stats-content > div > div:first-child{font-size:1.2rem!important}
  #admin-platform-stats-content > div > div:last-child{font-size:0.65rem!important}
  #admin-platform-stats-card{margin-bottom:12px!important}
  #admin-platform-stats-card > div{padding:10px!important}
  /* Activity summary compact */
  #activity-summary-stats > div,#activity-summary-skeleton > div{padding:8px!important}
  #activity-summary-stats > div > div:first-child{font-size:1.2rem!important}
  #activity-summary-content{padding:10px!important}

  /* Remove gap — hide site footer on mobile, show hamburger */
  .site-footer{display:none!important}
  .pull-to-refresh{display:none!important}
  .list-intro-desktop{display:none!important}
  .list-intro-mobile{display:block!important}
  #analyzer{padding-bottom:0!important;margin-bottom:0!important}
  body.analyzer-active{overflow:hidden!important;height:100vh!important}
  body.analyzer-active #main-content{overflow:hidden!important;height:calc(100vh - 60px)!important}

  /* Mobile hamburger button - top left */
  .mobile-hamburger-btn{display:flex!important;flex-direction:column;justify-content:center;gap:4px;position:fixed;top:14px;left:12px;z-index:1001;background:none;border:none;padding:8px;cursor:pointer;-webkit-tap-highlight-color:transparent}
  .mobile-hamburger-btn span{display:block;width:20px;height:2px;background:var(--text,#fff);border-radius:1px;transition:all 0.2s}

  /* Hamburger menu footer links */
  .mobile-nav-footer-links{padding:12px 16px;border-top:1px solid var(--border,#333);margin-top:8px}
  .mobile-nav-footer-title{font-size:0.7rem;font-weight:600;color:var(--muted,#888);text-transform:uppercase;letter-spacing:0.5px;margin-bottom:6px;padding:0 8px}
  .mobile-nav-footer-links a{display:block;padding:8px;font-size:0.85rem;color:var(--text,#fff);text-decoration:none;border-radius:6px;transition:background 0.15s}
  .mobile-nav-footer-links a:active{background:rgba(215,181,109,0.1)}
  .mobile-nav-footer-copy{font-size:0.7rem;color:var(--muted,#666);text-align:center;padding:12px 0 4px;margin-top:8px;border-top:1px solid var(--border,#333)}
  /* Compact the analyzer section to fit one screen */
  #analyzer .section-header{margin-bottom:8px!important;padding:0!important}
  #analyzer .section-title{font-size:1.2rem!important;margin-bottom:2px!important}
  #analyzer .section-intro{font-size:0.8rem!important;margin:0!important}
  #analyzer .card{padding:12px!important}
  #analyzer .card-header{padding:0 0 8px 0!important;margin-bottom:8px!important}
  #analyzer .card-title{font-size:0.95rem!important}
  #analyzer .field-group{margin-bottom:8px!important;padding:0!important}
  #analyzer .field-label{font-size:0.7rem!important;margin-bottom:3px!important}
  #analyzer .field-input,#analyzer .field-select{padding:8px 10px!important;font-size:0.85rem!important;min-height:36px!important}
  #analyzer #analysis-form .field-group{margin-top:8px!important}
  .insight-mobile-email-section .field-input{margin-bottom:8px!important}
  .insight-mobile-email-section .btn{padding:12px!important;font-size:0.9rem!important}
  #analyzer .analyzer-grid{gap:0!important}

  /* Email prompt bottom sheet on mobile */
  #email-prompt-modal .modal{position:fixed!important;bottom:0!important;left:0!important;right:0!important;top:auto!important;max-width:100%!important;width:100%!important;border-radius:16px 16px 0 0!important;margin:0!important;animation:slideUp 0.3s ease-out!important}
  @keyframes slideUp{from{transform:translateY(100%)}to{transform:translateY(0)}}

  /* Modals */
  .modal{max-width:95vw!important;margin:10px}
  #advertise-modal .modal-body>div>div{padding:12px!important}

  /* View Toggle - 44px touch targets */
  .view-toggle-btn{min-height:44px;padding:12px 16px}

  /* Insight Modal - 44px touch targets & readability */
  .insight-watchlist-star{width:44px;height:44px}
  .insight-action-btn{min-height:44px}
  .insight-modal [style*="font-size: 0.65rem"]{font-size:0.75rem!important}
  button[onclick="downloadInsightReport()"]{display:none}
  #insight-modal-project{text-transform:capitalize}

  /* Insight Modal Header - keep actions beside title */
  #insight-modal .modal-header{display:flex!important;flex-wrap:nowrap!important;justify-content:space-between!important;align-items:flex-start!important;border-bottom:none!important}
  #insight-modal .insight-scroll-progress{display:none!important}
  #insight-modal .insight-swipe-indicator{display:none!important}
  #insight-modal .modal-header-content{flex:1;min-width:0}
  #insight-modal .modal-header-actions{flex-shrink:0!important;display:flex!important;align-items:center!important;gap:4px!important}
  #insight-modal .modal-header h3{white-space:nowrap!important}

  /* Mobile: Hide desktop actions, show overflow menu */
  .insight-desktop-actions{display:none!important}
  .insight-mobile-actions{display:block!important}

  /* Snapshot insights - tighter mobile layout */
  .snapshot-insights{padding:16px;gap:10px}
  .snapshot-card{padding:12px 14px;border-radius:8px}
  .snapshot-card:hover{transform:none}
  .snapshot-card-content{font-size:0.9rem;line-height:1.5}

  /* Watchlist disclaimer - hide on mobile */
  .watchlist-disclaimer-desktop{display:none!important}

  /* List Project sidebar - hide on mobile */
  .list-mine-sidebar{display:none!important}

  /* Wizard mobile optimizations */
  .wizard-progress{margin-bottom:12px!important;padding-bottom:8px!important}
  .wizard-steps{gap:4px}
  .wizard-step-num{width:24px;height:24px;font-size:0.7rem}
  .wizard-step-label{font-size:0.55rem;max-width:45px;overflow:hidden;text-overflow:ellipsis}
  #list-mine .field-group{margin-bottom:8px!important}
  #list-mine .form-section{margin-bottom:10px!important}
  #list-mine .form-section-title{margin-bottom:8px!important;padding-bottom:6px!important;font-size:0.85rem!important}
  #list-mine .field-label{font-size:0.75rem!important;margin-bottom:3px!important}
  .wizard-nav{flex-direction:column;gap:8px;margin-top:8px!important;padding-top:8px!important}
  .wizard-nav .btn{width:100%;min-width:auto}
  .wizard-nav-final{flex-direction:column-reverse}
  .wizard-back-btn{order:2}

  /* Insight Tabs - scroll indicator */
  .insight-tabs{position:relative}
  .insight-tabs::after{
    content:"→";
    position:absolute;
    right:8px;
    top:50%;
    transform:translateY(-50%);
    color:var(--accent, #d4a853);
    font-size:1rem;
    opacity:0.7;
    pointer-events:none;
    animation:scrollHint 1.5s ease-in-out infinite
  }
  @keyframes scrollHint{
    0%,100%{transform:translateY(-50%) translateX(0);opacity:0.7}
    50%{transform:translateY(-50%) translateX(4px);opacity:1}
  }

  /* Insight Overflow Menu */
  #insight-overflow-dropdown button:active{background:var(--border)!important}

  /* Filters */
  .explore-filters{padding:12px!important}
  .explore-filters>div{flex-wrap:wrap!important}
  .filter-select{min-width:120px!important;flex:1 1 calc(50% - 8px)!important}

  /* Typography */
  .section-title{font-size:1.5rem}

  /* Notification Dropdown - responsive sizing */
  .notification-dropdown{
    position:fixed!important;
    top:clamp(55px, 10vw, 70px)!important;
    right:clamp(5px, 2vw, 10px)!important;
    left:auto!important;
    width:clamp(260px, 80vw, 320px)!important;
    max-width:calc(100vw - 20px)!important;
    max-height:400px!important;
    transform:none!important
  }

  /* Vendor Listings */
  #vendor-listings .listing-manage-card,
  .listing-manage-card{flex-direction:column!important}
  .listing-manage-card>div:first-child{width:100%!important;height:150px!important}

  /* Buyer */
  #buyer-watchlist-preview{grid-template-columns:1fr!important}
  #buyer-info-pack-tracking>div{flex-direction:column!important;align-items:flex-start!important;gap:12px!important}

  /* Photos */
  #edit-photos-grid{grid-template-columns:repeat(auto-fill,minmax(100px,1fr))!important}

  /* User Type - 3x2 grid */
  .user-type-grid{grid-template-columns:repeat(3,1fr)!important;gap:6px!important}
  .user-type-btn{padding:8px 4px!important;min-height:50px!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important}
  .user-type-icon{font-size:1.2rem!important}
  .user-type-label{font-size:.65rem!important;line-height:1.2!important}

  /* About */
  .about-founder-grid{grid-template-columns:1fr!important;padding:24px!important;gap:32px!important}
  .about-founder-grid>div:last-child{order:-1}
}

/* ----- 700px and below ----- */
@media (max-width: 700px) {
  .field-row,.field-row-3{grid-template-columns:1fr}
  .tenement-input-row .tenement-id,
  .tenement-input-row .tenement-type{flex:1 1 100%}
  .modal-grid{grid-template-columns:1fr}
  .user-type-grid{grid-template-columns:repeat(3,1fr)!important}
}

/* ----- 600px and below ----- */
@media (max-width: 600px) {
  /* .news-grid already 1 column from 768px */
  .explore-listings-grid{grid-template-columns:1fr}
  .explore-kpis{flex-wrap:wrap}
  .explore-filters{flex-direction:column}
  .explore-filters .filter-select,.explore-filters .filter-input{width:100%}
  .photo-preview-grid{grid-template-columns:repeat(2,1fr)}
}

/* ----- 500px and below ----- */
@media (max-width: 500px) {
  .recommended-section{padding:16px}
  .recommended-card-footer{flex-direction:column;align-items:flex-start;gap:12px}
  .recommended-header{flex-direction:column;align-items:flex-start;gap:4px}
}

/* ----- 480px and below ----- */
@media (max-width: 480px) {
  /* Header & Branding */
  body{padding:8px}
  header{padding:10px!important;gap:8px!important}
  .brand-logo{width:36px!important;height:36px!important}
  .brand-text-title{font-size:1rem!important}
  .brand-text-sub{display:none!important}
  .dark-mode-toggle{width:38px;height:38px;font-size:1.1rem}
  .hamburger{width:38px;height:38px}

  /* Layout */
  .section{padding:0 4px}
  .card{padding:12px;border-radius:8px}

  /* Dashboard */
  #dashboard .dashboard-stats{grid-template-columns:1fr!important;gap:8px!important}
  .dashboard-stats .card{padding:12px!important}
  .dashboard-stats .card div:first-child{font-size:1.5rem!important}

  /* Snapshot Grid - single column on small phones */
  .mm-ir-snapshot-grid{grid-template-columns:1fr!important}

  /* Listings */
  .listings{grid-template-columns:1fr!important}
  .listing-card{margin-bottom:12px;border:none!important;box-shadow:0 0 12px rgba(212,168,83,0.25),0 0 4px rgba(212,168,83,0.15)!important}
  .listing-header,.listing-body{padding:12px!important}
  .listing-footer{padding:12px!important;flex-wrap:wrap!important;gap:8px!important}

  /* Filters */
  .filter-select{flex:1 1 100%!important;min-width:100%!important}

  /* Buttons & Modals */
  .btn{padding:10px 16px;font-size:.9rem}
  .modal{margin:5px!important;max-height:95vh!important}
  .modal-header,.modal-body{padding:12px 16px!important}

  /* Notifications */
  .notification-item{padding:10px 12px!important}
  .notification-text{font-size:.85rem!important}

  /* User Type Grid - already set to 2 columns at 700px */

  /* Profile */
  #analysis-form .field-row{gap:12px!important}
  #profile .card[style*="text-align: center"]{padding:20px 12px!important}
  #profile-avatar{width:80px!important;height:80px!important;font-size:2.5rem!important}
  #profile-edit-mode input,#profile-view-mode>div{padding:10px 12px!important}

  /* Typography */
  .section-title{font-size:1.3rem!important}
  .section-intro{font-size:.85rem!important}

  /* Watchlist & News */
  #watchlist .listings{gap:12px!important}
  .news-card{padding:12px!important}
  .news-featured-card{flex-direction:column!important}
  .news-featured-card>div:first-child{height:180px!important;width:100%!important}

  /* Forms & Modals */
  #list-mine .card{padding:16px!important}
  #contact-modal .modal-body>div>div{padding:12px!important}
  #edit-listing-form>div{padding-bottom:16px!important;margin-bottom:16px!important}

  /* Settings */
  .settings-tabs{flex-wrap:wrap!important;gap:4px!important}
  .settings-tab{flex:1 1 auto!important;padding:8px 12px!important;font-size:.8rem!important}

  /* Footer */
  .site-footer{padding:16px 12px!important}
  .footer-link{font-size:.75rem!important}

  /* Recommendations & Vendor */
  .recommended-grid{gap:12px!important}
  .listing-manage-card{padding:12px!important}
  .listing-manage-info h4{font-size:1rem!important}
  #vendor-listings>.card>div:nth-child(2)>div{flex-direction:column!important;gap:8px!important}
}

/* ----- 360px and below ----- */
@media (max-width: 360px) {
  body{padding:4px}
  header{padding:8px!important}
  .brand-text-title{font-size:.9rem!important}
  .modal{margin:2px!important}

  /* Touch targets - maintain 44px minimum for accessibility */
  .btn{padding:12px 16px!important;font-size:.85rem!important;min-height:44px!important}
  .nav-btn,.mobile-nav-btn{min-height:44px!important}
  .filter-select,.field-input,.field-select{min-height:44px!important}
  .hamburger{min-width:44px!important;min-height:44px!important}
  .dark-mode-toggle{min-width:44px!important;min-height:44px!important}

  /* User type - keep 3 columns, tighten */
  .user-type-grid{grid-template-columns:repeat(3,1fr)!important;gap:4px!important}
  .user-type-btn{min-height:44px!important;padding:6px 4px!important}
  .user-type-icon{font-size:1rem!important}
  .user-type-label{font-size:.6rem!important}
}

/* ========================================
   MOBILE INSIGHT REQUEST MODAL
   ======================================== */
.mobile-insight-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 10000;
  padding: 20px;
  overflow-y: auto;
}
.mobile-insight-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}
.mobile-insight-modal-content {
  background: var(--card-bg, #1a1a1a);
  border-radius: 20px;
  width: 100%;
  max-width: 400px;
  position: relative;
  border: 1px solid rgba(212, 175, 55, 0.2);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.mobile-insight-step {
  padding: 32px 24px;
}
.mobile-insight-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--muted, #888);
  font-size: 24px;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
}
.mobile-insight-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.mobile-insight-back {
  position: absolute;
  top: 16px;
  left: 16px;
  background: none;
  border: none;
  color: var(--accent, #d4af37);
  font-size: 20px;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
}
.mobile-insight-back:hover {
  background: rgba(212, 175, 55, 0.1);
}
.mobile-insight-header {
  text-align: center;
  margin-bottom: 24px;
}
.mobile-insight-icon {
  font-size: 48px;
  margin-bottom: 16px;
}
.mobile-insight-icon.mobile-insight-success {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #34d399, #10b981);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #fff;
}
.mobile-insight-header h2 {
  color: #fff;
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0 0 8px;
}
.mobile-insight-header p {
  color: var(--muted, #888);
  font-size: 0.9rem;
  margin: 0;
}
.mobile-insight-header span {
  color: var(--accent, #d4af37);
  font-weight: 600;
}
.mobile-insight-question {
  color: var(--muted, #888);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  text-align: center;
}
.mobile-insight-user-types {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.mobile-insight-type-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px 12px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.mobile-insight-type-btn:hover,
.mobile-insight-type-btn:focus {
  background: rgba(212, 175, 55, 0.1);
  border-color: rgba(212, 175, 55, 0.3);
}
.mobile-insight-type-btn.selected {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--accent, #d4af37);
}
.mobile-insight-type-btn .type-icon {
  font-size: 28px;
}
.mobile-insight-type-btn .type-label {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
}
.mobile-insight-type-btn .type-desc {
  color: var(--muted, #888);
  font-size: 0.7rem;
  line-height: 1.3;
}
.mobile-insight-email-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.mobile-insight-email-input {
  width: 100%;
  padding: 16px 20px;
  font-size: 16px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 12px;
  background: #fff;
  color: #1a1a1a;
  outline: none;
  transition: all 0.2s;
}
.mobile-insight-email-input:focus {
  border-color: var(--accent, #d4af37);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}
.mobile-insight-email-input::placeholder {
  color: #999;
}
.mobile-insight-privacy {
  text-align: center;
  color: var(--muted, #888);
  font-size: 0.8rem;
  margin: 0;
}
.mobile-insight-submit-btn {
  width: 100%;
  padding: 16px;
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a1a;
  background: linear-gradient(135deg, #d4af37, #f0d060);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.mobile-insight-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.3);
}
.mobile-insight-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.mobile-insight-confirm-email {
  text-align: center;
  color: var(--accent, #d4af37);
  font-size: 0.9rem;
  margin-bottom: 24px;
}
.mobile-insight-done-btn {
  width: 100%;
  padding: 16px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.mobile-insight-done-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Form fields */
.mobile-insight-field {
  margin-bottom: 16px;
}
.mobile-insight-field-label {
  display: block;
  color: var(--muted, #888);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.mobile-insight-text-input {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 12px;
  background: #fff;
  color: #1a1a1a;
  outline: none;
  transition: all 0.2s;
}
.mobile-insight-text-input:focus {
  border-color: var(--accent, #d4af37);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}
.mobile-insight-text-input::placeholder {
  color: #999;
}

/* Region toggle */
.mobile-insight-region-toggle {
  display: flex;
  gap: 12px;
}
.mobile-insight-region-btn {
  flex: 1;
  padding: 14px 16px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted, #888);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.mobile-insight-region-btn:hover {
  background: rgba(212, 175, 55, 0.1);
  border-color: rgba(212, 175, 55, 0.2);
}
.mobile-insight-region-btn.active {
  color: #fff;
  background: rgba(212, 175, 55, 0.2);
  border-color: var(--accent, #d4af37);
}

/* Confetti celebration */
.mobile-insight-confetti {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 10;
}
.confetti-piece {
  position: absolute;
  width: 10px;
  height: 10px;
  top: -20px;
  animation: confetti-fall 3s ease-out forwards;
}
.confetti-piece.gold { background: linear-gradient(135deg, #d4af37, #f0d060); }
.confetti-piece.diamond {
  background: linear-gradient(135deg, #e8f4f8, #a8d8ea, #fff);
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}
.confetti-piece.sparkle {
  background: radial-gradient(circle, #fff 0%, #d4af37 50%, transparent 70%);
  border-radius: 50%;
}
.confetti-piece.star {
  background: #d4af37;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
.confetti-piece.gem {
  background: linear-gradient(135deg, #60a5fa, #a78bfa, #f472b6);
  clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
}

@keyframes confetti-fall {
  0% {
    transform: translateY(0) rotate(0deg) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateY(400px) rotate(720deg) scale(0.5);
    opacity: 0;
  }
}

/* Hide on desktop */
@media (min-width: 769px) {
  .mobile-insight-modal {
    display: none !important;
  }
  .insight-input-tabs {
    display: none !important;
  }
  .mobile-hamburger-btn {
    display: none !important;
  }
}

/* Gold glow on listing cards - all screen sizes */
.listing-card{box-shadow:0 0 12px rgba(212,168,83,0.25),0 0 4px rgba(212,168,83,0.15)!important}

/* ========================================
   SCANNER - Mobile Responsive
   ======================================== */

@media (max-width: 768px) {
  /* Location input - full width */
  #scanner-location {
    min-width: 100% !important;
    width: 100% !important;
  }

  /* Radius slider */
  #scanner-radius {
    width: 160px !important;
  }

  /* Controls row - stack vertically */
  #scanner .filter-pill-wrap {
    flex-direction: column !important;
    gap: 10px !important;
  }

  /* Results grid - single column */
  #scanner-cards {
    grid-template-columns: 1fr !important;
  }

  /* Map height */
  #scanner-map {
    height: 300px !important;
  }

  /* Filter toolbar - wrap tighter */
  #scanner-filter-toolbar {
    gap: 6px !important;
    padding: 8px !important;
  }
  #scanner-filter-toolbar select,
  #scanner-filter-toolbar input {
    font-size: 0.78rem !important;
    padding: 4px 6px !important;
  }

  /* Cluster insights panel */
  #scanner-cluster-panel {
    width: 100vw !important;
    max-width: 100vw !important;
  }

  /* Scanner brief modal content */
  #scanner-brief-modal > div {
    width: 95vw !important;
    max-width: 95vw !important;
    margin: 20px auto !important;
    padding: 16px !important;
  }
}

@media (max-width: 480px) {
  /* Filter toolbar - vertical stack on small phones */
  #scanner-filter-toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  #scanner-filter-toolbar select,
  #scanner-filter-toolbar input {
    width: 100% !important;
  }
  #scanner-filter-toolbar button {
    margin-left: 0 !important;
    width: 100% !important;
  }

  /* Map even smaller */
  #scanner-map {
    height: 250px !important;
  }

  /* Scanner card padding */
  .scanner-card {
    padding: 12px !important;
  }

  /* Scan button full width */
  #scanner-run-btn {
    width: 100% !important;
  }

  /* Radius slider */
  #scanner-radius {
    width: 120px !important;
  }

  /* Report tabs responsive */
  .report-tab {
    flex: 1 !important;
    text-align: center !important;
    padding: 12px 16px !important;
    font-size: 0.95rem !important;
  }
}
