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

html { overflow-x: hidden; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow-x: hidden;
}

#header {
  background: #2c3e50;
  color: white;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-shrink: 0;
}

#header h1 {
  font-size: 1.5rem;
  font-weight: 500;
  flex-shrink: 0;
}

#header h1 a {
  transition: opacity 0.15s;
}
#header h1 a:hover {
  opacity: 0.75;
}

#header-logo {
  height: 63px;
  width: auto;
  display: block;
}

#controls {
  display: flex;
  align-items: center;
  gap: 15px;
  flex: 1;
}

#county-selector {
  display: flex;
  align-items: center;
  gap: 8px;
}

#county-selector label {
  font-size: 0.9rem;
  opacity: 0.9;
}

#county-select {
  padding: 6px 10px;
  font-size: 0.9rem;
  border: none;
  border-radius: 4px;
  background: #34495e;
  color: white;
  cursor: pointer;
}

#county-select:hover {
  background: #3d566e;
}

#search-container {
  display: flex;
  gap: 5px;
  flex: 1;
  max-width: 480px;
}

#search-input {
  padding: 8px 12px;
  font-size: 1rem;
  border: none;
  border-radius: 4px;
  flex: 1;
  min-width: 0;
}

#search-btn {
  padding: 8px 16px;
  font-size: 1rem;
  border: none;
  border-radius: 4px;
  background: #3498db;
  color: white;
  cursor: pointer;
}

#search-btn:hover {
  background: #2980b9;
}

#parcel-count {
  font-size: 0.9rem;
  opacity: 0.8;
}

#loading {
  color: #f1c40f;
  font-weight: 500;
}

#map {
  flex: 1;
  width: 100%;
}

/* Search Results Panel */
#search-results {
  position: absolute;
  top: 54px;
  right: 10px;
  width: 350px;
  max-height: 400px;
  background: white;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  z-index: 1000;
  overflow: hidden;
}

#results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  background: #2c3e50;
  color: white;
}

#close-results {
  background: none;
  border: none;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  padding: 0 5px;
}

#results-hint {
  padding: 5px 15px;
  font-size: 0.75rem;
  color: #aaa;
  background: #1a252f;
  border-bottom: 1px solid #34495e;
  font-style: italic;
}

#results-list {
  list-style: none;
  max-height: 350px;
  overflow-y: auto;
}

#results-list li {
  padding: 10px 15px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
}

#results-list li:hover {
  background: #f5f5f5;
}

#results-list .result-parcel {
  font-weight: 600;
  color: #2c3e50;
}

#results-list .result-address {
  font-size: 0.85rem;
  color: #666;
}

#results-list .result-owner {
  font-size: 0.85rem;
  color: #888;
}

/* Parcel Labels */
.parcel-label {
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  font-weight: 700;
  color: #FF8C00;
  white-space: nowrap;
  text-shadow:
    -1px -1px 0 #fff,
    1px -1px 0 #fff,
    -1px 1px 0 #fff,
    1px 1px 0 #fff,
    0 0 3px rgba(255,255,255,0.8);
}

/* Soil Labels - bold italic green */
.soil-label {
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  font-weight: 700;
  font-style: italic;
  color: #228B22;
  white-space: nowrap;
  text-shadow:
    -1px -1px 0 #fff,
    1px -1px 0 #fff,
    -1px 1px 0 #fff,
    1px 1px 0 #fff,
    0 0 3px rgba(255,255,255,0.9);
}

/* Dimension labels (site plan overlay) */
.dimension-label {
  background: none;
  border: none;
  padding: 0;
  text-align: center;
}

.dimension-label span {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: #0066cc;
  white-space: nowrap;
  text-shadow:
    -1px -1px 0 #fff,
    1px -1px 0 #fff,
    -1px 1px 0 #fff,
    1px 1px 0 #fff,
    0 0 4px rgba(255,255,255,0.9);
}

.dimension-soil-label {
  background: none;
  border: none;
  padding: 0;
  text-align: center;
}

.dimension-soil-label span {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #333;
  background: rgba(255,255,255,0.7);
  padding: 1px 4px;
  border-radius: 2px;
}

.leaflet-popup-content {
  font-size: 0.9rem;
  line-height: 1.5;
  position: relative;
  overflow-x: hidden;
  word-break: break-word;
}


.leaflet-popup-content strong {
  color: #2c3e50;
}

/* Report Button in Popup */
.report-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 8px 12px;
  background: #3498db;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
}

.report-btn:hover {
  background: #2980b9;
}

/* Report Panel */
#report-panel {
  position: absolute;
  top: 83px;
  right: 0;
  width: 400px;
  max-height: calc(100vh - 83px);
  background: white;
  border-radius: 4px 0 0 4px;
  box-shadow: -4px 4px 15px rgba(0,0,0,0.3);
  z-index: 1001;
  display: flex;
  flex-direction: column;
}

#report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  background: #1a5276;
  color: white;
  font-weight: 500;
}

#close-report {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0 5px;
  line-height: 1;
}

#report-content {
  padding: 15px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  flex: 1;
  max-height: calc(100vh - 130px);
}

#report-content h3 {
  margin: 0 0 15px 0;
  color: #2c3e50;
  border-bottom: 2px solid #3498db;
  padding-bottom: 8px;
}

#report-content h4 {
  margin: 0 0 8px 0;
  color: #2c3e50;
  font-size: 0.95rem;
}

.report-section {
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}

.report-section:last-child {
  border-bottom: none;
}

.report-section p {
  margin: 4px 0;
  font-size: 0.9rem;
}

.soil-entry {
  background: #f8f9fa;
  padding: 8px;
  border-radius: 4px;
  margin-bottom: 8px;
  font-size: 0.85rem;
}

.soil-entry small {
  color: #666;
}

.hcpa-link {
  display: block;
  text-align: center;
  padding: 10px;
  background: #27ae60;
  color: #fff !important;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.95rem;
}

.hcpa-link:hover {
  background: #219a52;
  color: #fff !important;
}

.dep-link {
  display: block;
  text-align: center;
  padding: 10px;
  background: #2563eb;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 500;
}

.dep-link:hover {
  background: #1d4ed8;
}

.dep-link-disabled {
  display: block;
  width: 100%;
  text-align: center;
  padding: 10px;
  background: #94a3b8;
  color: white;
  border: none;
  border-radius: 4px;
  font-weight: 500;
  font-size: 1rem;
  cursor: not-allowed;
  opacity: 0.7;
}

.btn-gated {
  opacity: 0.6;
  cursor: pointer;
}

.btn-gated::after {
  content: " (sign in)";
  font-size: 0.8em;
  font-style: italic;
}

.gated-note {
  font-size: 0.8em;
  color: #888;
  font-style: italic;
  margin: 2px 0 4px;
}

/* Site Plan Buttons */
.site-plan-btn {
  display: inline-block;
  padding: 8px 12px;
  margin: 4px 4px 4px 0;
  font-size: 0.85rem;
  border: none;
  border-radius: 4px;
  color: white;
  cursor: pointer;
  font-weight: 500;
}

.site-plan-btn-dims {
  background: #0066cc;
}

.site-plan-btn-dims:hover {
  background: #0052a3;
}

.site-plan-btn-svg {
  background: #7c3aed;
}

.site-plan-btn-svg:hover {
  background: #6d28d9;
}

.site-plan-btn-clear {
  background: #6b7280;
}

.site-plan-btn-clear:hover {
  background: #4b5563;
}

/* .site-plan-btn-editor defined below with full overrides */

.site-plan-info {
  font-size: 0.85rem;
  color: #666;
  margin: 4px 0;
}

.error {
  color: #e74c3c;
}

#zoom-indicator {
  position: fixed;
  bottom: 20px;
  left: 320px;
  background: rgba(44, 62, 80, 0.85);
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  z-index: 1000;
  pointer-events: none;
}

/* =====================================================
   Authentication Styles
   ===================================================== */

/* Auth Container in Header */
#help-link,
#changelog-link {
  color: rgba(255,255,255,0.75);
  font-size: 0.82rem;
  text-decoration: none;
  white-space: nowrap;
  padding: 5px 10px;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}
#help-link:hover,
#changelog-link:hover {
  color: white;
  background: rgba(255,255,255,0.12);
}

#auth-container {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 15px;
}

.auth-btn {
  padding: 8px 16px;
  font-size: 0.9rem;
  border: none;
  border-radius: 4px;
  background: #27ae60;
  color: white;
  cursor: pointer;
}

.auth-btn:hover {
  background: #219a52;
}

#user-menu {
  display: flex;
  align-items: center;
  gap: 10px;
}

#user-name {
  font-size: 0.9rem;
  opacity: 0.9;
}

.account-btn {
  padding: 6px 12px;
  font-size: 0.85rem;
  border: none;
  border-radius: 4px;
  background: #3498db;
  color: white;
  cursor: pointer;
}

.account-btn:hover {
  background: #2980b9;
}

.logout-btn {
  padding: 6px 12px;
  font-size: 0.85rem;
  border: none;
  border-radius: 4px;
  background: #e74c3c;
  color: white;
  cursor: pointer;
}

.logout-btn:hover {
  background: #c0392b;
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 4500;
}

.modal-content {
  background: white;
  width: 400px;
  max-width: 90%;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: #2c3e50;
  color: white;
  font-weight: 500;
  font-size: 1.1rem;
}

.modal-close {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.modal-close:hover {
  opacity: 0.8;
}

.modal-tabs {
  display: flex;
  border-bottom: 1px solid #eee;
}

.tab-btn {
  flex: 1;
  padding: 12px;
  border: none;
  background: #f5f5f5;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.2s;
}

.tab-btn:hover {
  background: #eee;
}

.tab-btn.active {
  background: white;
  border-bottom: 2px solid #3498db;
  font-weight: 500;
}

.tab-btn-signup {
  color: #2980b9;
  font-weight: 600;
}

.tab-btn-signup.active {
  border-bottom-color: #2980b9;
}

.modal-body {
  padding: 20px;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #2c3e50;
}

.form-group input {
  width: 100%;
  padding: 10px 12px;
  font-size: 1rem;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.form-group input:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.form-error {
  color: #e74c3c;
  font-size: 0.85rem;
  margin-bottom: 10px;
  min-height: 20px;
}

.form-submit {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  border: none;
  border-radius: 4px;
  background: #27ae60;
  color: white;
  cursor: pointer;
  font-weight: 500;
}

.form-submit:hover {
  background: #219a52;
}

.form-submit:disabled {
  background: #95a5a6;
  cursor: not-allowed;
}

.form-back {
  width: 100%;
  padding: 10px;
  font-size: 0.9rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
  color: #666;
  cursor: pointer;
  margin-top: 10px;
}

.form-back:hover {
  background: #f5f5f5;
}

.form-info {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 15px;
}

.google-btn-container {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
  min-height: 44px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: #999;
  font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid #ddd;
}

.contractor-info {
  background: #f8f9fa;
  padding: 12px;
  border-radius: 4px;
  margin-bottom: 15px;
}

.contractor-info p {
  margin: 4px 0;
  font-size: 0.9rem;
}

/* Account Panel */
#account-panel {
  position: absolute;
  top: 54px;
  right: 10px;
  width: 380px;
  max-height: calc(100vh - 74px);
  background: white;
  border-radius: 4px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  z-index: 1002;
  display: flex;
  flex-direction: column;
}

#account-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  background: #2c3e50;
  color: white;
  font-weight: 500;
}

#close-account {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0 5px;
  line-height: 1;
}

#account-content {
  padding: 15px;
  overflow-y: auto;
  flex: 1;
}

.account-section {
  margin-bottom: 20px;
}

.account-section h4 {
  margin: 0 0 10px 0;
  color: #2c3e50;
  font-size: 0.95rem;
  border-bottom: 1px solid #eee;
  padding-bottom: 5px;
}

.account-section p {
  margin: 6px 0;
  font-size: 0.9rem;
}

#activity-list {
  font-size: 0.85rem;
}

.activity-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 10px;
  background: #f0f4f8;
  border-radius: 4px;
  margin-bottom: 5px;
  cursor: pointer;
  border-left: 3px solid #27ae60;
  transition: background 0.15s;
  gap: 8px;
}

.activity-item:hover { background: #ddeeff; }

.activity-item .activity-label {
  font-size: 0.82rem;
  color: #2c3e50;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.activity-badges {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.act-badge {
  font-size: 0.7rem;
  padding: 1px 5px;
  border-radius: 3px;
  white-space: nowrap;
  font-weight: 600;
}

.act-badge.done {
  background: #d4edda;
  color: #155724;
}

.activity-ts {
  font-size: 0.7rem;
  color: #888;
  white-space: nowrap;
}

/* Map Toolbar — Layers / Legend / Street View buttons */
#map-toolbar {
  position: fixed;
  top: var(--header-h, 80px);
  left: 10px;
  z-index: 1000;
  display: flex;
  gap: 6px;
}

#map-toolbar button {
  padding: 6px 12px;
  font-size: 0.85rem;
  border: none;
  border-radius: 4px;
  background: rgba(44, 62, 80, 0.9);
  color: white;
  cursor: pointer;
  font-weight: 500;
}

#map-toolbar button:hover {
  background: rgba(44, 62, 80, 1);
}

#streetview-btn.active {
  background: #e67e22;
}

#map.streetview-mode,
#map.streetview-mode .leaflet-container,
#map.streetview-mode .leaflet-grab {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='6' r='4.5' fill='%23FFD700' stroke='%23333' stroke-width='1.5'/%3E%3Crect x='12' y='11' width='8' height='9' rx='2' fill='%23FFD700' stroke='%23333' stroke-width='1.5'/%3E%3Cline x1='14' y1='20' x2='11' y2='29' stroke='%23333' stroke-width='2.5' stroke-linecap='round'/%3E%3Cline x1='18' y1='20' x2='21' y2='29' stroke='%23333' stroke-width='2.5' stroke-linecap='round'/%3E%3Cline x1='12' y1='13' x2='5' y2='18' stroke='%23333' stroke-width='2.5' stroke-linecap='round'/%3E%3Cline x1='20' y1='13' x2='27' y2='18' stroke='%23333' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E") 16 4, crosshair !important;
}


/* Layer / Legend panels anchor */
#layer-controls {
  position: fixed;
  top: 116px;
  left: 10px;
  z-index: 1000;
}

#layer-panel {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  padding: 8px 12px;
  margin-top: 4px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

#layer-panel label {
  display: block;
  padding: 4px 0;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
}

#layer-panel label:hover {
  color: #3498db;
}

#layer-panel input[type="checkbox"] {
  margin-right: 6px;
}

/* Layer panel symbology swatches */
.lsym {
  display: inline-block;
  vertical-align: middle;
  margin-left: 5px;
}
.lsym-line {
  width: 18px;
  border-bottom: 2px solid #ccc;
}
.lsym-fill {
  width: 11px;
  height: 11px;
  border: 1.5px dashed #ccc;
  opacity: 0.85;
}
.lsym-icon {
  width: 14px;
  height: 14px;
  object-fit: contain;
}
.lsym-icon-wide {
  width: 22px;
  height: 10px;
}
.lsym-dots {
  display: inline-flex;
  gap: 2px;
  align-items: center;
  margin-left: 5px;
  vertical-align: middle;
}
.lsym-dots span {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.lsym-aerial {
  width: 11px;
  height: 11px;
  background: linear-gradient(135deg, #8BC34A 0%, #4CAF50 40%, #2196F3 100%);
  border-radius: 1px;
  opacity: 0.85;
}

/* Legend Controls */
#legend-controls {
  position: fixed;
  top: calc(var(--header-h, 80px) + 36px);
  left: 10px;
  z-index: 1000;
}

#legend-panel {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  padding: 8px 12px;
  margin-top: 4px;
  max-height: calc(100vh - 160px);
  overflow-y: auto;
  font-size: 0.8rem;
}

.legend-section {
  margin-bottom: 6px;
}

.legend-section:last-child {
  margin-bottom: 0;
}

.legend-title {
  font-weight: bold;
  margin-top: 6px;
}

.legend-title:first-child {
  margin-top: 0;
}

.legend-item {
  padding: 2px 0;
  white-space: nowrap;
}

.legend-item img {
  width: auto;
  height: 16px;
  vertical-align: middle;
  margin-right: 4px;
}

.legend-swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 4px;
}

.legend-line {
  display: inline-block;
  width: 20px;
  border-bottom: 3px solid;
  vertical-align: middle;
  margin-right: 4px;
}

/* Search icon hidden at desktop; shown via mobile media query */
#search-icon-btn { display: none; }

/* =====================================================
   Sign-in wall overlay
   ===================================================== */
#signin-wall {
  position: fixed;
  inset: 0;
  background: rgba(10, 18, 30, 0.82);
  backdrop-filter: blur(3px);
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
}

#signin-wall-box {
  background: white;
  border-radius: 8px;
  padding: 2.5rem 2rem;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

#signin-wall-box h2 {
  color: #1e3a5f;
  margin-bottom: 0.75rem;
  font-size: 1.4rem;
}

#signin-wall-box p {
  color: #555;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

#signin-wall-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

#wall-signin-btn {
  padding: 0.75rem 2rem;
  background: #27ae60;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

#wall-signin-btn:hover { background: #219a52; }

#wall-signup-btn {
  padding: 0.75rem 2rem;
  background: #1e3a5f;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

#wall-signup-btn:hover { background: #2d5a87; }

/* =====================================================
   Tablet breakpoint (≤900px)
   ===================================================== */
@media (max-width: 900px) {
  #search-input { width: 180px; }
  #report-panel, #search-results, #account-panel { width: 320px; }
  #county-selector label { display: none; }
  button, .site-plan-btn { min-height: 40px; }
}

#mobile-fab { display: none; }
#report-close-mobile { display: none; }

/* =====================================================
   Mobile breakpoint (≤600px)
   ===================================================== */
@media (max-width: 600px) {
  /* Header layout */
  #header { padding: 8px 12px; flex-wrap: wrap; gap: 6px; }
  #header h1 { font-size: 1.1rem; flex-shrink: 0; }
  #controls { flex-wrap: wrap; gap: 8px; flex: 1; min-width: 0; }
  #county-selector label { display: none; }
  #county-select { max-width: 140px; }
  #parcel-count { display: none; }
  #help-link, #changelog-link { display: none; }
  #search-btn { display: none; }
  #user-name { display: none; }

  /* Search icon — shown on mobile; bar hidden until toggled */
  #search-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    cursor: pointer;
  }
  #search-container { display: none; }
  #search-container.search-active {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 3000;
    background: #2c3e50;
    padding: 8px;
    gap: 6px;
  }
  #search-container.search-active #search-input {
    flex: 1;
    width: auto;
  }

  /* Full-screen panels */
  #report-panel,
  #search-results,
  #account-panel {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    border-radius: 0;
    z-index: 2500;
  }
  #report-content { max-height: calc(100dvh - 56px - 48px) !important; }
  #account-content { max-height: calc(100dvh - 56px) !important; }
  #results-list { max-height: calc(100dvh - 70px); }

  /* Touch targets */
  button, .site-plan-btn, #search-btn,
  #map-toolbar button { min-height: 44px; font-size: 1rem; }


  /* Hide zoom-level debug indicator */
  #zoom-indicator { display: none; }

  /* Auth modal nearly full-width */
  .modal-content { width: 95%; max-width: 95%; }

  /* ── Mobile FAB ── */
  #map-toolbar { display: none; }

  #mobile-fab {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    position: fixed;
    bottom: 24px;
    right: 16px;
    z-index: 1100;
  }

  #mobile-fab-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(44, 62, 80, 0.95);
    color: white;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #mobile-fab-menu {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    margin-bottom: 10px;
    min-width: 140px;
  }

  #mobile-fab-menu.open { display: flex; }

  #mobile-fab-menu button {
    background: rgba(44, 62, 80, 0.95);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.95rem;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    min-height: 44px;
  }

  #mobile-fab-menu button:hover { background: rgba(44, 62, 80, 1); }

  /* ── Report panel mobile close bar ── */
  #report-close-mobile {
    display: block;
    margin-top: auto;
    width: 100%;
    background: #1a5276;
    color: white;
    border: none;
    padding: 14px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    min-height: 48px;
    flex-shrink: 0;
  }
}

/* =====================================================
   Siteplan editor button — primary CTA in report (overrides base .site-plan-btn)
   ===================================================== */
.site-plan-btn-editor {
  background: #0d7453;
  font-size: 1rem;
  padding: 10px 16px;
  display: block;
  width: 100%;
  text-align: center;
  margin-bottom: 2px;
}

.site-plan-btn-editor:hover { background: #0a5c41; }

.site-plan-btn-tanks {
  background: none;
  border: 1px solid #0d7453;
  color: #0d7453;
  display: block;
  width: 100%;
  text-align: center;
  font-size: 0.85rem;
  text-decoration: none;
  margin-top: 4px;
}
.site-plan-btn-tanks:hover { background: #f0faf6; }

/* =====================================================
   Street View embedded overlay
   ===================================================== */
#streetview-overlay {
  position: fixed;
  inset: 0;
  z-index: 6000;
  background: #000;
}

#streetview-pano {
  width: 100%;
  height: 100%;
}

#streetview-overlay-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 6001;
  background: rgba(44, 62, 80, 0.92);
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 8px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

#streetview-overlay-close:hover {
  background: rgba(44, 62, 80, 1);
}

/* Quick & dirty collapsible */
.siteplan-quick-dirty {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 0.85rem;
  color: #555;
}

.siteplan-quick-dirty summary {
  cursor: pointer;
  font-size: 0.82rem;
  color: #777;
  user-select: none;
}

.siteplan-quick-dirty summary:hover { color: #444; }

/* =====================================================
   Survey modal
   ===================================================== */
.survey-q { margin-bottom: 14px; }
.survey-label { display: block; font-size: 0.88rem; font-weight: 600; color: #222; margin-bottom: 5px; }
.survey-radios { display: flex; flex-wrap: wrap; gap: 10px; }
.survey-radios label { font-size: 0.88rem; color: #333; display: flex; align-items: center; gap: 4px; cursor: pointer; }
.survey-ta { width: 100%; box-sizing: border-box; border: 1px solid #ccc; border-radius: 4px; padding: 7px 9px; font-size: 0.88rem; font-family: inherit; resize: vertical; }
.survey-ta:focus { outline: none; border-color: #1e3a5f; }

/* =====================================================
   Main-app one-time tip bubbles
   ===================================================== */
.main-app-tip {
  position: fixed;
  background: #2c3e50;
  color: #fff;
  border-radius: 6px;
  padding: 8px 12px 8px 12px;
  font-size: 0.82rem;
  line-height: 1.4;
  max-width: 240px;
  z-index: 3500;
  box-shadow: 0 4px 16px rgba(0,0,0,0.35);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.main-app-tip span { flex: 1; }

.main-app-tip button {
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  min-height: unset;
  flex-shrink: 0;
}

.main-app-tip[data-arrow="top"]::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 16px;
  border: 7px solid transparent;
  border-top: 0;
  border-bottom-color: #2c3e50;
}

.main-app-tip[data-arrow="bottom"]::after {
  content: "";
  position: absolute;
  bottom: -7px;
  left: 16px;
  border: 7px solid transparent;
  border-bottom: 0;
  border-top-color: #2c3e50;
}

#restart-banner {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 99999;
  background: #b45309;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}
#restart-banner button {
  background: none;
  border: none;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  opacity: 0.8;
  flex-shrink: 0;
}
#restart-banner button:hover { opacity: 1; }

/* OTP Registration UI */
.role-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.role-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: border-color 0.15s, background 0.15s;
}

.role-option:hover {
  border-color: #3498db;
  background: #f0f7ff;
}

.role-option input[type="radio"] {
  margin: 0;
  accent-color: #3498db;
}

.otp-code-field {
  width: 100%;
  font-size: 22px;
  letter-spacing: 4px;
  text-align: center;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-sizing: border-box;
}

/* EULA overlay */
.eula-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.eula-box {
  background: #fff;
  border-radius: 8px;
  padding: 24px;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}

.eula-title {
  margin: 0 0 12px;
  font-size: 16px;
  flex-shrink: 0;
}

.eula-body {
  flex: 1;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.7;
  color: #444;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 12px;
  margin-bottom: 16px;
  min-height: 120px;
  max-height: 260px;
}

.eula-body p {
  margin: 0 0 10px;
}

.eula-body p:last-child {
  margin-bottom: 0;
}

.eula-initials-input {
  text-transform: uppercase;
  width: 100px;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}
