/* The look both sites share: flat surfaces, hairlines, 10 to 16 px corners, one accent, Inter.
   Loaded last, over each page's own styles, for the class names the two pages have in common
   (pop-ups, forms, the legend, the map controls). Colours come from the page's variables:
   --bg, --card-bg, --fill, --border, --text-main, --text-muted, --accent, --accent-bg, --btn-text, --shadow.
   What only one site has stays in that site's styles. */
body { font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font-family: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Pop-ups */
.modal-overlay { background: rgba(8, 12, 18, 0.55); backdrop-filter: none; -webkit-backdrop-filter: none; }
.modal { background: var(--bg); border: none; border-radius: 16px; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: 0 12px 40px var(--shadow); }
.modal h2 { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.01em; }
.modal-close, .modal-header > button, .modal > div:first-child > button:last-child {
    border: none; background: none; border-radius: 10px; color: var(--text-muted); font-size: 1.5rem; line-height: 1; cursor: pointer;
}
.modal-close:active, .modal-header > button:active { background: var(--fill); }
@media (max-width: 768px) {
    .modal-overlay .modal { border-radius: 16px 16px 0 0; }
    .modal-overlay .modal::before { width: 36px; background: var(--border); }
}

/* Forms */
.form-group label { text-transform: none; letter-spacing: 0; font-size: 0.82rem; font-weight: 600; color: var(--text-muted); }
.form-group input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]), .form-group select, .form-group textarea, .form-control {
    border: 1px solid var(--border); border-radius: 10px; min-height: 44px; background: var(--bg); color: var(--text-main);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus, .form-control:focus {
    outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg);
}
.checkbox-group input[type="checkbox"] { accent-color: var(--accent); }
.flag-reason-btn { border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--text-main); font-weight: 500; }
.flag-reason-btn:hover, .flag-reason-btn:active { border-color: var(--accent); background: var(--accent-bg); }

/* The disclaimer: plain headings, no shouting */
.disclaimer-section { border-bottom-color: var(--border); margin-bottom: 1.1rem; }
.disclaimer-section h3 { color: var(--text-main); font-size: 0.95rem; font-weight: 700; text-transform: none; letter-spacing: -0.005em; margin-bottom: 0.4rem; }
.disclaimer-section p, .disclaimer-section ul { font-size: 0.88rem; line-height: 1.5; }
.disclaimer-link { color: var(--accent); font-family: inherit; font-weight: 600; }

/* Map furniture */
.leaflet-touch .leaflet-bar, .leaflet-bar, .leaflet-control-zoom { border: none !important; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 10px var(--shadow) !important; }
.leaflet-bar a, .leaflet-control-zoom a { background: var(--bg) !important; color: var(--text-main) !important; border: none !important; border-bottom: 1px solid var(--border) !important; border-radius: 0 !important; }
.leaflet-bar a:last-child { border-bottom: none !important; }
.btn-locate { border-radius: 12px; border: none; background: var(--bg); backdrop-filter: none; box-shadow: 0 2px 10px var(--shadow); }
/* "Clear saved data", under the privacy text; not on a first visit, when nothing is saved yet */
.btn-clear-saved { min-height: 44px; margin-top: 0.5rem; padding: 0 0.9rem; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--text-main); font-family: inherit; font-weight: 600; font-size: 0.85rem; cursor: pointer; }
#disclaimerModal.first-visit .btn-clear-saved { display: none; }
/* The disclaimer's second button, beside Accept */
.btn-decline { flex: 0 0 auto; min-height: 50px; padding: 0 1rem; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); color: var(--text-main); font-family: inherit; font-weight: 600; font-size: 0.95rem; cursor: pointer; }
.toast { position: fixed; opacity: 0; transition: 0.3s; z-index: 3000; max-width: 90vw; padding: 0.75rem 1.25rem; border-radius: 12px; border: 1px solid var(--border); background: var(--bg); color: var(--text-main); box-shadow: 0 4px 20px var(--shadow); backdrop-filter: none; font-weight: 500; }
.toast.show { opacity: 1; }
/* Where it sits on a wide screen; phones get it at the top (css/mobile.css) */
@media (min-width: 769px) {
    .toast { bottom: 2rem; left: 50%; transform: translateX(-50%) translateY(100px); }
    .toast.show { transform: translateX(-50%) translateY(0); }
}
.toast.success { border-color: var(--success, var(--border)); }
.toast.error { background: linear-gradient(var(--danger-bg, transparent), var(--danger-bg, transparent)), var(--bg); border-color: var(--danger); color: var(--danger); }
.legend { background: var(--bg); border: none; border-radius: 14px; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: 0 8px 30px var(--shadow); }
.legend-title { text-transform: none; letter-spacing: 0; font-size: 0.85rem; font-weight: 700; color: var(--text-main); }
.legend-item:hover { background: var(--fill); }

/* A marker's card: the Leaflet popup on a computer, the sheet on a phone */
.leaflet-popup-content-wrapper { background: var(--bg); border: none; border-radius: 14px; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: 0 8px 30px var(--shadow); }
.leaflet-popup-tip { background: var(--bg); border: none; }
.detail-sheet { background: var(--bg); border: none; border-radius: 16px 16px 0 0; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: 0 -8px 30px var(--shadow); }
.popup-title { font-family: inherit; font-weight: 700; letter-spacing: -0.01em; }

/* A pop-up puts the focus on its close button when it opens: show that quietly, not as a box */
.modal-close:focus-visible, .modal-header > button:focus-visible, .modal > div:first-child > button:last-child:focus-visible,
.bar-sheet-close:focus-visible { outline: none; background: var(--fill); }

/* The page is the app: two fingers zoom the map, never the page. Without this a pinch on a button, a
   sheet or its dimmed backdrop zooms the whole page, and the map (which takes every touch itself)
   leaves no way to pinch back out. */
html { touch-action: pan-x pan-y; }
