
.app-shell { display:grid; grid-template-columns: 280px minmax(0,1fr); min-height: calc(100vh - 73px); }
.sidebar {
  position: sticky;
  top: 73px;
  align-self: start;
  height: calc(100vh - 73px);
  padding: 18px;
  border-right: 1px solid var(--line);
  background: rgba(5,22,18,.72);
  backdrop-filter: blur(16px);
}
.sidebar-user { padding: 16px; margin-bottom: 14px; }
.sidebar-user h3 { margin: 0 0 4px; }
.side-nav { display:grid; gap:8px; }
.side-nav a, .side-nav button {
  display:flex;
  align-items:center;
  gap:10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(255,255,255,.88);
  font-weight: 850;
  cursor: pointer;
}
.side-nav a.active, .side-nav a:hover, .side-nav button:hover {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.12);
}
.app-main { padding: 22px; min-width: 0; }
.app-top { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:18px; }
.app-top h1 { margin:0; font-size: clamp(2rem, 4vw, 3.6rem); letter-spacing:-.06em; line-height:1; }
.grid { display:grid; gap:16px; }
.dashboard-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
.content-grid { grid-template-columns: minmax(0,1.25fr) minmax(300px,.75fr); }
.card { padding:18px; }
.stat strong { display:block; color:var(--brand); font-size:2rem; }
.list { display:grid; gap:10px; }
.item { display:flex; justify-content:space-between; gap:12px; border-bottom:1px solid var(--line); padding:12px 0; }
.item:last-child{border-bottom:0;}
.item span { color:var(--muted); font-size:.88rem; }
.map-card { padding:0; overflow:hidden; min-height:520px; }
.map-head { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:16px; }
.map-canvas { height:470px; background: linear-gradient(135deg, rgba(122,201,67,.22), rgba(20,80,67,.72)), url("https://images.unsplash.com/photo-1448375240586-882707db888b?auto=format&fit=crop&w=1600&q=80") center/cover; position:relative; }
.pin { position:absolute; width:18px; height:18px; border-radius:50%; background:var(--brand); box-shadow:0 0 0 8px rgba(122,201,67,.22); }
.pin.one { left:30%; top:35%; } .pin.two { left:64%; top:50%; } .pin.three { left:50%; top:68%; }
.form-grid { display:grid; gap:12px; }
.form-grid input, .form-grid select, .form-grid textarea {
  width:100%;
  border:1px solid rgba(255,255,255,.18);
  border-radius:14px;
  background:rgba(255,255,255,.08);
  color:#fff;
  padding:13px 14px;
}
@media (max-width: 980px) {
  .app-shell { grid-template-columns:1fr; }
  .sidebar { position:relative; top:auto; height:auto; border-right:0; border-bottom:1px solid var(--line); }
  .side-nav { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .dashboard-grid,.content-grid { grid-template-columns:1fr; }
}
@media (max-width: 560px) {
  .app-main{padding:14px;}
  .side-nav{grid-template-columns:1fr;}
  .app-top{flex-direction:column;}
}

#full-map {
  height: 640px;
  width: 100%;
  filter: saturate(.85) brightness(.88);
}
@media (max-width: 700px) {
  #full-map { height: 520px; }
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(5,22,18,.66);
  border-bottom: 1px solid var(--line);
}
.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.9);
  font-size: .78rem;
  font-weight: 850;
}
.marker-dot {
  width: 11px;
  height: 11px;
  display: inline-block;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(255,255,255,.08);
}
.marker-dot.my { background: #7ac943; }
.marker-dot.public { background: #2f80ed; }
.marker-dot.community { background: #56ccf2; }
.marker-dot.rare { background: #f2c94c; }
.marker-dot.group { background: #7ac943; }
.marker-dot.alert { background: #eb5757; }
.map-legend-full {
  border-top: 1px solid var(--line);
}
.custom-pin {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,.92);
  box-shadow: 0 0 0 6px rgba(122,201,67,.18), 0 8px 18px rgba(0,0,0,.38);
}
.custom-pin.my { background: #7ac943; }
.custom-pin.public { background: #2f80ed; }
.custom-pin.community { background: #56ccf2; }
.custom-pin.rare { background: #f2c94c; }
.custom-pin.group { background: #bb6bd9; }
.custom-pin.alert { background: #eb5757; }
@media (max-width: 560px) {
  .map-legend { gap: 6px; padding: 8px; }
  .map-legend span { font-size: .72rem; padding: 6px 8px; }
}

/* Compact mobile web-app dashboard */
@media (max-width: 980px) {
  .app-shell { display: block; }
  .sidebar {
    position: relative !important;
    top: auto !important;
    height: auto !important;
    padding: 12px !important;
    border-right: 0 !important;
    border-bottom: 1px solid var(--line);
  }
  .sidebar > .brand {
    margin-bottom: 10px;
  }
  .sidebar-user {
    padding: 12px !important;
    margin-bottom: 10px !important;
  }
  .sidebar-user h3 { font-size: 1rem; }
  .sidebar-user p { font-size: .85rem; margin-bottom: 0; }
  .side-nav {
    display: flex !important;
    gap: 8px !important;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
  }
  .side-nav a, .side-nav button {
    flex: 0 0 auto;
    min-width: auto;
    white-space: nowrap;
    padding: 10px 12px !important;
    font-size: .9rem;
    scroll-snap-align: start;
  }
  .app-main { padding: 14px !important; }
  .app-top {
    flex-direction: row !important;
    align-items: center !important;
  }
  .app-top h1 {
    font-size: clamp(1.85rem, 8vw, 2.6rem) !important;
  }
}
@media (max-width: 560px) {
  .sidebar {
    padding: 10px !important;
  }
  .sidebar .brand .logo {
    width: 34px;
    height: 34px;
  }
  .sidebar-user {
    display: none;
  }
  .side-nav a, .side-nav button {
    font-size: .82rem;
    padding: 8px 10px !important;
  }
  .app-top {
    align-items: flex-start !important;
    gap: 8px !important;
  }
  .app-top .pill {
    font-size: .68rem;
    padding: 5px 8px;
  }
  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .card { padding: 14px !important; }
  #full-map { height: 440px !important; }
  .map-card { min-height: auto !important; }
}

/* Dashboard real map + signed-in mobile fixes */
#dashboard-map {
  height: 470px;
  width: 100%;
  filter: saturate(.85) brightness(.88);
  background: #17352f;
}
.dashboard-legend {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(5,22,18,.66);
}
.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.9);
  font-size: .78rem;
  font-weight: 850;
}
.marker-dot {
  width: 11px;
  height: 11px;
  display: inline-block;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(255,255,255,.08);
}
.marker-dot.my { background: #7ac943; }
.marker-dot.public { background: #2f80ed; }
.marker-dot.community { background: #56ccf2; }
.marker-dot.rare { background: #f2c94c; }
.marker-dot.group { background: #7ac943; }
.marker-dot.alert { background: #eb5757; }
.custom-pin {
  width: 18px;
  height: 18px;
  display: block;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,.92);
  box-shadow: 0 0 0 6px rgba(122,201,67,.18), 0 8px 18px rgba(0,0,0,.38);
}
.custom-pin.my { background: #7ac943; }
.custom-pin.public { background: #2f80ed; }
.custom-pin.community { background: #56ccf2; }
.custom-pin.rare { background: #f2c94c; }
.custom-pin.group { background: #bb6bd9; }
.custom-pin.alert { background: #eb5757; }

@media (max-width: 560px) {
  #dashboard-map {
    height: 360px !important;
  }
  .map-head {
    align-items: center;
  }
  .map-head .btn {
    width: auto;
    min-width: 88px;
    padding: 10px 12px;
  }
  .map-legend {
    gap: 6px;
    padding: 8px;
  }
  .map-legend span {
    font-size: .7rem;
    padding: 6px 7px;
  }
}

/* Phase 2 complete additions */
.filter-row,.quick-row{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}
.filter-chip{border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.08);color:#fff;border-radius:999px;padding:8px 10px;font-weight:850;cursor:pointer}
.filter-chip.active{background:var(--brand);color:var(--brand-dark)}
.split-grid{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(300px,.85fr);gap:16px}
.find-card-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:14px}
.find-card{padding:14px;border:1px solid var(--line);border-radius:18px;background:rgba(255,255,255,.07)}
.find-thumb{height:130px;border-radius:14px;margin-bottom:12px;background:linear-gradient(135deg,rgba(122,201,67,.22),rgba(20,80,67,.72)),url("https://images.unsplash.com/photo-1470114716159-e389f8712fda?auto=format&fit=crop&w=900&q=80") center/cover}
.notice{padding:12px 14px;border-radius:16px;background:rgba(122,201,67,.12);border:1px solid rgba(122,201,67,.25);color:var(--muted)}
.alert-card{border-left:4px solid #eb5757}.rare-card{border-left:4px solid #f2c94c}.group-card{border-left:4px solid #bb6bd9}
#dashboard-map,#full-map,#caution-map{min-height:420px;width:100%;background:#17352f}
@media(max-width:800px){.split-grid{grid-template-columns:1fr}.find-card-grid{grid-template-columns:1fr}}
@media(max-width:560px){.filter-row{flex-wrap:nowrap;overflow-x:auto;padding-bottom:4px}.filter-chip{flex:0 0 auto;font-size:.78rem}}

.sync-status{display:grid;gap:8px}
.sync-row{display:flex;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid var(--line)}
.sync-row:last-child{border-bottom:0}
.sync-row strong{color:#fff}.sync-row span{color:var(--muted);text-align:right}
@media(max-width:560px){#dashboard-map,#full-map{min-height:360px!important}.dashboard-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}

/* Cleaner dashboard ad placement */
.dashboard-side-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, .65fr);
  gap: 16px;
}
.dashboard-side-pair .ad-slot {
  width: 100%;
  margin: 0;
  min-height: 180px;
}
.dashboard-side-pair .ad-slot ins {
  min-height: 120px;
}
.dashboard-top-ad {
  display: none !important;
}
@media (max-width: 900px) {
  .dashboard-side-pair {
    grid-template-columns: 1fr;
  }
  .dashboard-side-pair .ad-slot {
    min-height: 100px;
  }
}

/* Keep the dashboard ad compact beside Recent Finds */
.dashboard-side-pair .ad-slot {
  min-height: 110px !important;
  max-height: 180px;
}
@media (max-width: 900px) {
  .dashboard-side-pair .ad-slot {
    min-height: 80px !important;
  }
}

/* Phase 3 dashboard/privacy polish */
.welcome-card {
  padding: 18px;
  margin-bottom: 16px;
}
.welcome-card h2 {
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  margin: 0 0 6px;
}
.welcome-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.activity-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.activity-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.07);
}
.activity-card strong {
  display: block;
  color: #fff;
  font-size: 1.05rem;
}
.activity-card span {
  color: var(--muted);
  font-size: .86rem;
}
.privacy-badge {
  background: rgba(255,255,255,.12);
  color: #fff;
}
.privacy-note {
  border-left: 4px solid var(--brand);
}
.settings-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.settings-toggle:last-child {
  border-bottom: 0;
}
.switch {
  width: 52px;
  height: 30px;
  border-radius: 999px;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.18);
  position: relative;
  flex: 0 0 auto;
}
.switch::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  left: 4px;
  top: 3px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
}
.switch.on::after {
  left: 24px;
}
.species-strip {
  display: grid;
  gap: 10px;
}
.species-row {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.species-row:last-child {
  border-bottom: 0;
}
.species-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(122,201,67,.16);
  font-size: 1.35rem;
}
@media (max-width: 900px) {
  .activity-grid {
    grid-template-columns: 1fr;
  }
  .welcome-actions .btn {
    width: 100%;
  }
}

/* Phase 4 pages */
.page-grid{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(300px,.8fr);gap:16px}
.library-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:14px}
.library-card{padding:14px;border:1px solid var(--line);border-radius:18px;background:rgba(255,255,255,.07)}
.library-hero{height:130px;border-radius:14px;margin-bottom:12px;background:linear-gradient(135deg,rgba(122,201,67,.22),rgba(20,80,67,.72)),url("https://images.unsplash.com/photo-1470114716159-e389f8712fda?auto=format&fit=crop&w=900&q=80") center/cover}
.timeline{display:grid;gap:10px}.timeline-item{padding:12px 0 12px 16px;border-left:3px solid var(--brand)}
.timeline-item strong{display:block;color:#fff}.timeline-item span{color:var(--muted);font-size:.88rem}
.impact-number{font-size:clamp(2rem,5vw,3.4rem);color:var(--brand);line-height:1;font-weight:950}
.safe-alert{border-left:4px solid #eb5757}.impact-progress{height:14px;border-radius:999px;background:rgba(255,255,255,.1);overflow:hidden;border:1px solid var(--line)}
.impact-progress span{display:block;height:100%;width:18%;background:linear-gradient(90deg,var(--brand),#97d56a)}
@media(max-width:900px){.page-grid{grid-template-columns:1fr}}

.capture-preview{width:100%;min-height:180px;border:1px solid var(--line);border-radius:18px;background:rgba(255,255,255,.06);display:grid;place-items:center;overflow:hidden;color:var(--muted)}
.capture-preview img{width:100%;max-height:360px;object-fit:cover;display:block}
.audio-meter{height:10px;border-radius:999px;overflow:hidden;background:rgba(255,255,255,.12);border:1px solid var(--line)}
.audio-meter span{display:block;width:0%;height:100%;background:linear-gradient(90deg,var(--brand),#97d56a);transition:width .12s linear}
.recording-dot{display:inline-flex;width:10px;height:10px;border-radius:50%;background:#eb5757;animation:pulse-record 1.2s infinite}
@keyframes pulse-record{0%{box-shadow:0 0 0 0 rgba(235,87,87,.6)}70%{box-shadow:0 0 0 10px rgba(235,87,87,0)}100%{box-shadow:0 0 0 0 rgba(235,87,87,0)}}
.identify-mode-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.identify-mode-grid .btn{width:100%}
.find-card img.find-img{width:100%;height:150px;object-fit:cover;border-radius:14px;margin-bottom:12px;background:rgba(255,255,255,.06)}
.find-detail{position:fixed;inset:0;z-index:9999;display:none;padding:18px;background:rgba(0,0,0,.72);backdrop-filter:blur(12px);place-items:center}
.find-detail.open{display:grid}.find-detail-card{width:min(680px,100%);max-height:90vh;overflow:auto;padding:20px}
.find-detail-card img{width:100%;max-height:420px;object-fit:contain;border-radius:18px;background:rgba(255,255,255,.06)}
.empty-action{display:grid;gap:12px;place-items:start}
@media(max-width:560px){.identify-mode-grid{grid-template-columns:1fr}.capture-preview{min-height:150px}}

.identify-step-actions{display:grid;gap:10px;margin-top:14px}
.identify-primary-action{font-size:1.05rem!important;min-height:58px}
.analysis-steps{display:grid;gap:10px;margin-top:12px}
.analysis-step{padding:10px 12px;border:1px solid var(--line);border-radius:14px;background:rgba(255,255,255,.06);color:var(--muted);font-weight:800}
.analysis-step.done{color:#fff;border-color:rgba(122,201,67,.35);background:rgba(122,201,67,.12)}

.result-card{padding:14px;border:1px solid var(--line);border-radius:18px;background:rgba(255,255,255,.07)}
.result-card h3{margin:0 0 6px}
.result-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px}
.result-actions .btn{flex:1 1 160px}
.analysis-step.done{color:#fff!important;border-color:rgba(122,201,67,.35)!important;background:rgba(122,201,67,.12)!important}

/* Hard fix: Identify + My Finds */
.hard-identify-grid{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(300px,.9fr);gap:16px}
.hard-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:12px 0}
.hard-actions .btn{width:100%}
.hard-preview{min-height:240px;border:1px solid var(--line);border-radius:18px;background:rgba(255,255,255,.06);display:grid;place-items:center;overflow:hidden;color:var(--muted);text-align:center;padding:12px}
.hard-preview img{width:100%;max-height:430px;object-fit:contain;border-radius:14px}
.hard-preview audio{width:100%}
.big-identify{font-size:1.06rem!important;min-height:58px;width:100%}
.analysis-box{display:none;gap:9px;margin-top:12px}
.analysis-box.open{display:grid}
.analysis-box div{padding:10px 12px;border-radius:14px;border:1px solid var(--line);background:rgba(255,255,255,.06);color:var(--muted);font-weight:800}
.analysis-box div.done{background:rgba(122,201,67,.12);border-color:rgba(122,201,67,.35);color:#fff}
.result-card{padding:14px;border:1px solid var(--line);border-radius:18px;background:rgba(255,255,255,.07)}
.result-card h3{margin:0 0 6px}
.result-buttons{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px}
.result-buttons .btn{flex:1 1 150px}
.find-card img.find-img{width:100%;height:160px;object-fit:cover;border-radius:14px;margin-bottom:12px;background:rgba(255,255,255,.06)}
.find-detail{position:fixed;inset:0;z-index:9999;display:none;padding:18px;background:rgba(0,0,0,.72);backdrop-filter:blur(12px);place-items:center}
.find-detail.open{display:grid}
.find-detail-card{width:min(680px,100%);max-height:90vh;overflow:auto;padding:20px}
.find-detail-card img{width:100%;max-height:420px;object-fit:contain;border-radius:18px;background:rgba(255,255,255,.06)}
@media(max-width:850px){.hard-identify-grid{grid-template-columns:1fr}.hard-actions{grid-template-columns:1fr}}

/* Identify visible result fix */
#analysis-box.finished{display:none!important}
#result-area.result-ready{margin-top:14px}
.result-card.visible-result{border:2px solid rgba(122,201,67,.45);background:rgba(122,201,67,.10)}
.result-card.visible-result h3{font-size:1.7rem;margin-bottom:8px}
#result-buttons.force-visible{display:grid!important;grid-template-columns:1fr;gap:10px;margin-top:14px}
#result-buttons.force-visible .btn{width:100%;min-height:54px}
@media(min-width:700px){#result-buttons.force-visible{grid-template-columns:repeat(2,minmax(0,1fr))}}

.result-upgrade-card{padding:16px;border:1px solid rgba(122,201,67,.38);border-radius:20px;background:rgba(122,201,67,.10)}
.result-upgrade-card h3{margin:0 0 4px;font-size:clamp(1.45rem,3vw,2.1rem)}
.result-scientific{font-style:italic;color:var(--muted)}
.confidence-row{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:center;margin:14px 0}
.confidence-bar{height:12px;border-radius:999px;border:1px solid var(--line);background:rgba(255,255,255,.10);overflow:hidden}
.confidence-bar span{display:block;height:100%;width:0%;background:linear-gradient(90deg,var(--brand),#97d56a)}
.result-mini-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:12px}
.result-mini{padding:10px 12px;border-radius:14px;border:1px solid var(--line);background:rgba(255,255,255,.06)}
.result-mini strong{display:block;color:#fff}.result-mini span{color:var(--muted);font-size:.86rem}
.report-box{margin-top:12px;padding:12px;border-radius:14px;background:rgba(255,255,255,.06);border:1px solid var(--line)}
#result-buttons.force-visible{display:grid!important;grid-template-columns:1fr;gap:10px;margin-top:14px}
#result-buttons.force-visible .btn{width:100%;min-height:54px}
@media(min-width:700px){#result-buttons.force-visible{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.result-mini-grid{grid-template-columns:1fr}}

.clean-progress-wrap{display:none;margin-top:14px;padding:14px;border:1px solid var(--line);border-radius:18px;background:rgba(255,255,255,.06)}
.clean-progress-wrap.open{display:block}
.clean-progress-label{display:flex;justify-content:space-between;gap:10px;color:#fff;font-weight:850;margin-bottom:10px}
.clean-progress-bar{height:14px;border-radius:999px;background:rgba(255,255,255,.12);overflow:hidden;border:1px solid var(--line)}
.clean-progress-bar span{display:block;height:100%;width:0%;background:linear-gradient(90deg,var(--brand),#97d56a);transition:width .3s ease}
#analysis-box{display:none!important}
.result-upgrade-card.clean{padding:18px;border:1px solid rgba(122,201,67,.42);border-radius:22px;background:rgba(122,201,67,.10)}
.result-upgrade-card.clean h3{margin:6px 0 4px;font-size:clamp(1.55rem,4vw,2.25rem)}
.result-summary{margin-top:12px;padding:12px;border-radius:16px;background:rgba(255,255,255,.06);border:1px solid var(--line)}
#result-buttons.force-visible{display:grid!important;grid-template-columns:1fr;gap:10px;margin-top:14px}
#result-buttons.force-visible .btn{width:100%;min-height:54px}
@media(min-width:700px){#result-buttons.force-visible{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* My Finds management */
.find-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:12px}
.find-actions .btn{width:100%}
.find-select{width:100%;border:1px solid var(--line);border-radius:14px;background:rgba(255,255,255,.08);color:#fff;padding:11px 12px;margin-top:8px}
.visibility-badge{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:999px;border:1px solid var(--line);font-size:.78rem;font-weight:900;color:#fff;background:rgba(255,255,255,.08)}
.visibility-private{background:rgba(122,201,67,.12)}
.visibility-public{background:rgba(47,128,237,.16)}
.visibility-community{background:rgba(155,81,224,.16)}
.visibility-review{background:rgba(242,201,76,.16)}
@media(max-width:560px){.find-actions{grid-template-columns:1fr}}

.success-note{margin-top:12px;padding:12px;border-radius:16px;border:1px solid rgba(122,201,67,.35);background:rgba(122,201,67,.12);font-weight:850;color:#fff}
.map-empty-state{height:420px;display:grid;place-items:center;text-align:center;padding:24px;border:1px solid var(--line);border-radius:22px;background:rgba(255,255,255,.06)}
.map-toolbar{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px}
.map-toolbar .btn.active{background:var(--brand);color:#102215}
.pin-popup-img{width:160px;max-height:120px;object-fit:cover;border-radius:12px;margin-bottom:8px}

/* Force remove old demo/fake map pins */
.fake-map,.demo-map,.sample-pin,.pin.one,.pin.two,.pin.three,.random-pin,.demo-pin{display:none!important}
#full-map .fake-map,#full-map .sample-pin,#full-map .demo-pin{display:none!important}

.fake-map,.demo-map,.sample-pin,.pin.one,.pin.two,.pin.three,.random-pin,.demo-pin{display:none!important}

.fake-map,.demo-map,.sample-pin,.pin.one,.pin.two,.pin.three,.random-pin,.demo-pin{display:none!important}

/* Map always visible */
.map-stage{position:relative;min-height:520px;border-radius:22px;overflow:hidden;border:1px solid var(--line)}
#full-map{height:520px;width:100%;display:block!important}
.map-empty-overlay{
  position:absolute;
  z-index:500;
  inset:auto 16px 16px 16px;
  padding:16px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.18);
  background:rgba(3,31,27,.90);
  backdrop-filter:blur(12px);
  text-align:center;
  box-shadow:0 12px 32px rgba(0,0,0,.28);
}
.map-empty-overlay[hidden]{display:none!important}
.map-location-note{font-size:.84rem;color:var(--muted);margin-top:8px}
@media(max-width:560px){
  .map-stage,#full-map{min-height:460px;height:460px}
  .map-empty-overlay{inset:auto 10px 10px 10px}
}


/* Current-location display and dashboard/map synchronization */
.current-location-dot{width:20px;height:20px;display:block;border-radius:50%;background:#2f80ed;border:4px solid #fff;box-shadow:0 0 0 7px rgba(47,128,237,.24),0 5px 16px rgba(0,0,0,.38);animation:wildpins-location-pulse 2.2s ease-out infinite}
@keyframes wildpins-location-pulse{0%{box-shadow:0 0 0 0 rgba(47,128,237,.42),0 5px 16px rgba(0,0,0,.38)}70%{box-shadow:0 0 0 14px rgba(47,128,237,0),0 5px 16px rgba(0,0,0,.38)}100%{box-shadow:0 0 0 0 rgba(47,128,237,0),0 5px 16px rgba(0,0,0,.38)}}
.current-location-accuracy{stroke:#2f80ed;stroke-width:2;fill:#2f80ed;fill-opacity:.12}
.marker-dot.location{background:#2f80ed;border:2px solid #fff;box-shadow:0 0 0 3px rgba(47,128,237,.22)}
.map-current-location-row{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 14px;margin:10px 0;padding:9px 12px;border:1px solid rgba(255,255,255,.12);border-radius:14px;background:rgba(255,255,255,.05)}
.map-current-location-row>span{display:inline-flex;align-items:center;gap:7px;color:#fff;font-weight:800;font-size:.82rem}
.map-location-status{margin:8px 0;color:var(--muted);font-size:.82rem}
.map-location-status[data-state="success"]{color:#bce9ff}.map-location-status[data-state="error"]{color:#ffd1c9}.map-location-status[data-state="loading"]{color:#fff}
.map-head-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px}.map-locate-button{margin-left:auto}
@media(max-width:560px){.map-toolbar{align-items:stretch}.map-locate-button{width:100%;margin-left:0}.map-head-actions{width:100%;justify-content:flex-start}.map-head-actions .btn{flex:1 1 auto}.map-current-location-row{align-items:flex-start}}


/* Shared backend caution alerts */
.caution-page-grid{grid-template-columns:minmax(0,1fr) minmax(320px,.9fr);align-items:start}
.caution-form{display:grid;gap:12px;margin-top:16px}
.caution-form label{display:grid;gap:7px;color:#fff;font-weight:850}
.caution-form input,.caution-form select,.caution-form textarea{width:100%;border:1px solid var(--line);border-radius:14px;background:rgba(255,255,255,.08);color:#fff;padding:12px;font:inherit}
.caution-form option{color:#111}.caution-form textarea{resize:vertical;min-height:100px}
.caution-presets{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:14px}
.caution-presets button{border:1px solid var(--line);border-radius:14px;background:rgba(255,255,255,.07);color:#fff;padding:11px;text-align:left;font-weight:850;cursor:pointer}
.caution-presets button.selected{border-color:rgba(122,201,67,.7);background:rgba(122,201,67,.18)}
.caution-alert-item{display:grid;grid-template-columns:40px 1fr;gap:10px;padding:12px;border:1px solid var(--line);border-radius:15px;background:rgba(255,255,255,.06)}
.caution-alert-item+.caution-alert-item{margin-top:8px}.caution-alert-icon{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;background:rgba(255,152,0,.18)}
.caution-alert-item strong,.caution-alert-item span,.caution-alert-item small{display:block}.caution-alert-item span,.caution-alert-item small{color:var(--muted);margin-top:3px}.caution-alert-item p{margin:7px 0 0;color:#fff}
#caution-submit-status[data-state="success"]{color:#bff2d6}#caution-submit-status[data-state="error"]{color:#ffd1c9}#caution-submit-status[data-state="loading"]{color:#fff}
@media(max-width:900px){.caution-page-grid{grid-template-columns:1fr}}@media(max-width:520px){.caution-presets{grid-template-columns:1fr}}


/* High-visibility safety actions */
.btn.caution{
  background:linear-gradient(135deg,#ff453a,#c81d25);
  color:#fff;
  border:1px solid rgba(255,255,255,.38);
  box-shadow:0 8px 22px rgba(200,29,37,.34),inset 0 1px 0 rgba(255,255,255,.22);
  font-weight:900;
}
.btn.caution:hover,.btn.caution:focus-visible{
  background:linear-gradient(135deg,#ff6259,#e12632);
  box-shadow:0 10px 28px rgba(200,29,37,.5),0 0 0 3px rgba(255,69,58,.18);
}
.btn.caution:disabled{opacity:.68;box-shadow:none}
.caution-presets button.selected{border-color:rgba(255,69,58,.9);background:rgba(255,69,58,.2);box-shadow:0 0 0 2px rgba(255,69,58,.12)}
.find-photo-loading{width:100%;height:160px;border-radius:14px;margin-bottom:12px;display:grid;place-items:center;background:linear-gradient(110deg,rgba(255,255,255,.05) 25%,rgba(255,255,255,.14) 45%,rgba(255,255,255,.05) 65%);background-size:220% 100%;animation:wildpins-photo-loading 1.3s linear infinite;color:var(--muted);font-weight:800;text-align:center;padding:12px}
@keyframes wildpins-photo-loading{to{background-position:-220% 0}}


/* Web location selector */
.manual-location-dot{width:22px;height:22px;display:block;border-radius:50%;background:#8b5cf6;border:4px solid #fff;box-shadow:0 0 0 7px rgba(139,92,246,.24),0 5px 16px rgba(0,0,0,.38)}
.location-modal{position:fixed;inset:0;z-index:99999;display:none;place-items:center;padding:18px;background:rgba(4,8,14,.78);backdrop-filter:blur(7px)}
.location-modal.open{display:grid}
.location-dialog{position:relative;width:min(620px,100%);max-height:min(760px,92vh);overflow:auto;padding:24px;border:1px solid rgba(255,255,255,.14)}
.location-dialog-close{position:absolute;right:14px;top:14px;border:0;background:transparent;color:#fff;font-size:1.1rem;cursor:pointer;padding:8px}
.location-current-box{display:grid;gap:4px;margin:16px 0;padding:12px 14px;border:1px solid rgba(255,255,255,.12);border-radius:12px;background:rgba(255,255,255,.05)}
.location-current-box span{font-size:.78rem;color:var(--muted)}
.location-search-form{display:grid;grid-template-columns:1fr auto;gap:10px}.location-search-form input{min-width:0}
.location-results{display:grid;gap:8px;margin:10px 0 16px}
.location-result{display:grid;gap:4px;width:100%;text-align:left;padding:12px 14px;border-radius:12px;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.055);color:#fff;cursor:pointer}
.location-result:hover,.location-result:focus-visible{border-color:var(--accent);background:rgba(0,210,137,.1)}
.location-result span{font-size:.76rem;color:var(--muted)}
.location-dialog-actions{display:flex;gap:10px;flex-wrap:wrap;margin:12px 0}
.web-location-card{display:grid;gap:10px}.web-location-value{font-weight:800;color:#fff}.web-location-note{font-size:.82rem;color:var(--muted);line-height:1.5}
@media(max-width:560px){.location-search-form{grid-template-columns:1fr}.location-dialog-actions .btn{width:100%}}

/* Per-find location confirmation shown after AI identification */
.find-location-choice{margin-top:14px;padding:16px;border-radius:18px;border:1px solid rgba(76,160,255,.45);background:rgba(33,98,170,.16)}
.find-location-choice-head{display:flex;align-items:flex-start;gap:12px}.find-location-choice-head h3{margin:0 0 5px;font-size:1.1rem}.find-location-choice-head p{margin:0;color:var(--muted,#b5c0cf);line-height:1.45}
.find-location-choice-icon{display:grid;place-items:center;flex:0 0 42px;width:42px;height:42px;border-radius:50%;background:rgba(76,160,255,.2);font-size:1.25rem}
.find-location-selected{display:grid;gap:3px;margin-top:12px;padding:10px 12px;border-radius:12px;background:rgba(255,255,255,.06)}.find-location-selected span{font-size:.78rem;color:var(--muted,#b5c0cf)}.find-location-selected strong{overflow-wrap:anywhere}
.find-location-choice-actions{display:flex;gap:9px;flex-wrap:wrap;margin-top:13px}.find-location-choice-actions .btn{flex:1 1 175px}
@media(max-width:560px){.find-location-choice-actions .btn{width:100%;flex-basis:100%}}


/* Editable per-find locations */
.find-location-line{display:flex;align-items:flex-start;gap:7px;margin:8px 0 2px;padding:9px 10px;border-radius:12px;background:rgba(47,128,237,.10);border:1px solid rgba(47,128,237,.25);color:#d9efff;font-size:.84rem;line-height:1.35;overflow-wrap:anywhere}
.find-location-line span:first-child{flex:0 0 auto}


/* Private map marker clarity: current location is a blue target; wildlife is shown as pin-shaped markers. */
.wildlife-map-icon{background:transparent!important;border:0!important}
.wildlife-map-pin{position:relative;width:30px;height:30px;display:grid;place-items:center;border-radius:50% 50% 50% 0;transform:rotate(-45deg);border:3px solid rgba(255,255,255,.96);box-shadow:0 5px 13px rgba(0,0,0,.42),0 0 0 3px rgba(255,255,255,.12)}
.wildlife-map-pin.my{background:#7ac943}
.wildlife-map-pin.public{background:#ff9f43}
.wildlife-map-pin.community{background:#56ccf2}
.wildlife-map-pin.rare{background:#f2c94c;color:#182018}
.wildlife-map-pin.alert{background:#eb5757}
.wildlife-map-pin-symbol{display:grid;place-items:center;width:24px;height:24px;transform:rotate(45deg);font-size:13px;font-weight:1000;line-height:1;color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.45)}
.wildlife-map-pin.rare .wildlife-map-pin-symbol{color:#182018;text-shadow:none}
.pin-popup-kind{display:inline-flex;margin:0 0 7px;padding:4px 8px;border-radius:999px;font-size:.69rem;font-weight:950;text-transform:uppercase;letter-spacing:.06em;color:#102014;background:#7ac943}
.pin-popup-kind.public{background:#ff9f43;color:#241405}
.pin-popup-kind.community{background:#56ccf2;color:#08202a}
.pin-popup-kind.rare{background:#f2c94c;color:#242009}
.pin-popup-kind.alert{background:#eb5757;color:#fff}
.marker-dot.public{background:#ff9f43}


/* Community ownership, map key, and sighting metadata */
.wildlife-map-pin.community{background:#ff9f43}
.pin-popup-kind.community{background:#ff9f43;color:#241405}
.marker-dot.community{background:#ff9f43}
.full-map-key{align-items:center;border:1px solid rgba(255,255,255,.12);border-radius:14px;margin:10px 0 12px}
.map-key-title{font-size:.82rem;color:#fff;margin-right:2px}
.legend-wildlife-pin{width:18px;height:18px;display:inline-grid;place-items:center;border-radius:50% 50% 50% 0;transform:rotate(-45deg);border:2px solid #fff;box-shadow:0 3px 7px rgba(0,0,0,.32);font-style:normal;font-size:8px;color:#fff}
.legend-wildlife-pin::first-letter{transform:rotate(45deg)}
.legend-wildlife-pin.my{background:#7ac943}.legend-wildlife-pin.community{background:#ff9f43}.legend-wildlife-pin.rare{background:#f2c94c;color:#1d1d13}.legend-wildlife-pin.alert{background:#eb5757}
.pin-popup-card{min-width:210px;max-width:270px}.pin-popup-photo{margin-bottom:8px}.pin-photo-status{padding:12px;border-radius:10px;background:#eef2f1;color:#40504c;font-size:.76rem;font-weight:700}.pin-photo-caption{display:block;margin:4px 0 8px;color:#50625c;font-size:.69rem;line-height:1.3}.pin-photo-caption.reference{color:#8a5a11}.pin-popup-meta{display:grid;gap:4px;margin-top:7px}.pin-popup-meta small{display:block}.pin-date-note{color:#6a7672;line-height:1.3}
@media(max-width:560px){.full-map-key{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.full-map-key .map-key-title{grid-column:1/-1}.full-map-key span{border-radius:12px;white-space:normal;line-height:1.2}}

/* Signed-in Explore access */
.dashboard-explore-card{margin-bottom:16px}
.dashboard-explore-card .activity-grid{grid-template-columns:repeat(4,minmax(0,1fr));margin-top:14px}
.dashboard-explore-card .activity-card{display:flex;flex-direction:column;gap:4px;text-decoration:none;color:inherit;cursor:pointer}
.dashboard-explore-card .activity-card:hover{border-color:rgba(122,201,67,.5);background:rgba(122,201,67,.08)}
@media(max-width:900px){.dashboard-explore-card .activity-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.dashboard-explore-card .map-head{align-items:flex-start}.dashboard-explore-card .map-head .btn{width:100%;text-align:center}.dashboard-explore-card .activity-grid{grid-template-columns:1fr}}


/* V36 protected-area type badges on the wildlife map */
.map-key-divider{flex-basis:100%;padding-top:4px!important;border:0!important;background:transparent!important;color:#cfe4d7!important;font-size:.72rem!important;font-weight:950!important;text-transform:uppercase;letter-spacing:.06em}
.legend-protected-badge{width:26px;height:20px;display:inline-grid;place-items:center;border-radius:7px;border:1px solid rgba(255,255,255,.85);box-shadow:0 3px 7px rgba(0,0,0,.28);font-style:normal;font-size:.58rem;font-weight:1000;line-height:1;color:#fff}
.legend-protected-badge.national-park{background:#2e7d32}
.legend-protected-badge.nature-reserve{background:#43a047}
.legend-protected-badge.wildlife-refuge{background:#0288d1}
.legend-protected-badge.nature-preserve{background:#7e57c2}
.legend-protected-badge.conservation-area{background:#8d6e63}
.legend-protected-badge.protected-area{background:#d64545}
.protected-area-map-icon{background:transparent!important;border:0!important}
.protected-map-badge{width:32px;height:24px;display:grid;place-items:center;border-radius:8px;border:2px solid #fff;box-shadow:0 4px 10px rgba(0,0,0,.42);font-size:.62rem;font-weight:1000;line-height:1;color:#fff}
.protected-map-badge.national-park{background:#2e7d32}
.protected-map-badge.nature-reserve{background:#43a047}
.protected-map-badge.wildlife-refuge{background:#0288d1}
.protected-map-badge.nature-preserve{background:#7e57c2}
.protected-map-badge.conservation-area{background:#8d6e63}
.protected-map-badge.state-park{background:#558b2f}
.protected-map-badge.protected-area{background:#d64545}
.protected-area-popup{display:grid;gap:6px;min-width:190px;max-width:260px}
.protected-area-popup>strong{font-size:1rem}
.protected-area-popup>small{color:#5f6e67;line-height:1.35}
.protected-popup-badge{display:inline-flex;width:max-content;align-items:center;border-radius:999px;padding:4px 7px;color:#fff;font-size:.66rem;font-weight:950}
.protected-popup-badge.national-park{background:#2e7d32}
.protected-popup-badge.nature-reserve{background:#43a047}
.protected-popup-badge.wildlife-refuge{background:#0288d1}
.protected-popup-badge.nature-preserve{background:#7e57c2}
.protected-popup-badge.conservation-area{background:#8d6e63}
.protected-popup-badge.state-park{background:#558b2f}
.protected-popup-badge.protected-area{background:#d64545}
@media(max-width:560px){.full-map-key .map-key-divider{grid-column:1/-1}}
