* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; height: 100dvh; font-family: system-ui, -apple-system, sans-serif; }

#map { width: 100%; height: 100%; height: 100dvh; z-index: 0; }

/* ========== Auth Screens ========== */
.auth-screen {
    position: fixed; inset: 0; z-index: 2000;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #1565c0, #0d47a1);
}
.auth-box {
    background: #fff; border-radius: 12px; padding: 32px;
    width: 340px; box-shadow: 0 8px 32px rgba(0,0,0,.3);
    text-align: center;
}
.auth-box h1 { font-size: 24px; margin-bottom: 8px; }
.auth-box p { font-size: 13px; color: #666; margin-bottom: 16px; }
.auth-box input {
    display: block; width: 100%; padding: 10px 12px; margin-bottom: 10px;
    border: 1px solid #ccc; border-radius: 6px; font-size: 14px; font-family: inherit;
}
.auth-box button {
    width: 100%; padding: 10px; background: #1976d2; color: #fff;
    border: none; border-radius: 6px; font-size: 15px; cursor: pointer;
    margin-top: 4px;
}
.auth-box button:hover { background: #1565c0; }

.form-status { margin-top: 10px; font-size: 13px; min-height: 18px; }
.form-status.error { color: #c62828; }
.form-status.success { color: #2e7d32; }

/* ========== Change Password Modal ========== */
.modal-overlay {
    position: fixed; inset: 0; z-index: 2500;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,.6);
}
.modal-box {
    background: #fff; border-radius: 12px; padding: 28px;
    width: 360px; box-shadow: 0 8px 32px rgba(0,0,0,.3);
}
.modal-box h2 { margin-bottom: 6px; font-size: 18px; }
.modal-box p { font-size: 13px; color: #666; margin-bottom: 14px; }
.modal-box input[type="text"],
.modal-box input[type="password"] {
    display: block; width: 100%; padding: 10px 12px; margin-bottom: 10px;
    border: 1px solid #ccc; border-radius: 6px; font-size: 14px; font-family: inherit;
}
.modal-box button {
    width: 100%; padding: 10px; background: #1976d2; color: #fff;
    border: none; border-radius: 6px; font-size: 15px; cursor: pointer;
}
.modal-box button:hover { background: #1565c0; }

/* ========== User Menu (top-right, collapsible) ========== */
#user-bar {
    position: fixed; top: 12px; right: 12px; z-index: 1100;
    background: #fff; border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,.25); font-size: 13px;
}
#user-display {
    display: block; padding: 8px 14px; cursor: pointer;
    font-weight: 600; user-select: none; white-space: nowrap;
}
#user-display:hover { background: #f5f5f5; border-radius: 8px; }
#user-menu {
    display: flex; flex-direction: column; border-top: 1px solid #eee;
}
#user-menu.hidden { display: none; }
#user-bar button {
    background: none; border: none; border-radius: 0;
    padding: 8px 14px; cursor: pointer; font-size: 13px;
    text-align: left; white-space: nowrap;
}
#user-bar button:hover { background: #f5f5f5; }
#user-bar button:last-child { border-radius: 0 0 8px 8px; }

/* Filter toggle (mobile only) — replaced by toolbar */
#filter-toggle { display: none; }

/* Mobile bottom toolbar — hidden on desktop */
#mobile-toolbar { display: none; }

/* Filter bar */
#filter-bar {
    position: fixed;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    gap: 6px;
    align-items: center;
    background: #fff;
    padding: 6px 10px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,.25);
    font-size: 13px;
}

#filter-bar select,
#filter-bar input[type="date"] {
    padding: 5px 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 13px;
    font-family: inherit;
    background: #fff;
}

#filter-bar select { max-width: 140px; }
#filter-bar input[type="date"] { width: 130px; }

#clear-filters {
    background: none;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 4px 8px;
    font-size: 14px;
    cursor: pointer;
    color: #888;
}
#clear-filters:hover { background: #f5f5f5; color: #333; }

/* Toggle button */
#toggle-panel {
    position: fixed;
    top: 56px;
    right: 12px;
    z-index: 1000;
    background: #1976d2;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
#toggle-panel:hover { background: #1565c0; }

/* Pin mode button */
#toggle-pin-mode {
    position: fixed;
    top: 56px;
    right: 90px;
    z-index: 1000;
    background: #FF5722;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
#toggle-pin-mode:hover { background: #E64A19; }
#toggle-pin-mode.active { background: #BF360C; box-shadow: 0 0 0 3px rgba(255,87,34,.5); }

/* Locate button */
#locate-btn {
    position: fixed;
    bottom: 24px;
    right: 12px;
    z-index: 1000;
    background: #fff;
    color: #333;
    border: none;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    font-size: 22px;
    line-height: 40px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
#locate-btn:hover { background: #f5f5f5; }
#locate-btn.locating { color: #1976d2; animation: pulse 1s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

/* Upload panel */
#panel {
    position: fixed;
    top: 100px;
    right: 12px;
    z-index: 1000;
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    width: 300px;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,.25);
}
#panel.hidden { display: none; }

#panel h2 { margin-bottom: 14px; font-size: 18px; }

#panel label {
    display: block;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 600;
    color: #555;
}

#panel input[type="text"],
#panel input[type="file"],
#panel select,
#panel textarea {
    display: block;
    width: 100%;
    margin-top: 4px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}

#panel button[type="submit"] {
    width: 100%;
    padding: 10px;
    background: #1976d2;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    margin-top: 4px;
}
#panel button[type="submit"]:hover { background: #1565c0; }
#panel button[type="submit"]:disabled { background: #90caf9; cursor: wait; }

#status {
    margin-top: 10px;
    font-size: 13px;
    min-height: 20px;
}
#status.error { color: #c62828; }
#status.success { color: #2e7d32; }

.hidden { display: none !important; }

/* Fish marker icons */
.fish-marker-wrapper {
    background: none !important;
    border: none !important;
}
.fish-icon {
    width: 40px;
    height: 20px;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    filter: drop-shadow(1px 1px 1px rgba(255,255,255,.8));
}

/* Leaflet popup overrides */
.catch-popup img {
    max-width: 240px;
    max-height: 180px;
    border-radius: 6px;
    margin-bottom: 6px;
}
.catch-popup h3 { font-size: 14px; margin-bottom: 4px; }
.catch-popup .meta { font-size: 12px; color: #666; margin-bottom: 2px; }
.catch-popup .popup-actions {
    display: flex;
    gap: 6px;
    margin-top: 6px;
}
.catch-popup .edit-btn {
    display: inline-block;
    padding: 3px 10px;
    background: #1976d2;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
}
.catch-popup .edit-btn:hover { background: #1565c0; }
.catch-popup .delete-btn {
    display: inline-block;
    margin-top: 6px;
    padding: 3px 10px;
    background: #ef5350;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
}
.catch-popup .delete-btn:hover { background: #c62828; }

/* Edit panel */
#edit-panel {
    position: fixed;
    top: 100px;
    right: 12px;
    z-index: 1000;
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    width: 300px;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,.25);
}
#edit-panel.hidden { display: none; }
#edit-panel h2 { margin-bottom: 14px; font-size: 18px; }
#edit-panel label {
    display: block;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 600;
    color: #555;
}
#edit-panel input[type="text"],
#edit-panel input[type="file"],
#edit-panel select,
#edit-panel textarea {
    display: block;
    width: 100%;
    margin-top: 4px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}
#edit-panel select[multiple] {
    min-height: 80px;
}
#edit-submit-btn {
    width: 100%;
    padding: 10px;
    background: #1976d2;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    margin-top: 4px;
}
#edit-submit-btn:hover { background: #1565c0; }
#edit-submit-btn:disabled { background: #90caf9; cursor: wait; }
#edit-cancel-btn {
    width: 100%;
    padding: 10px;
    background: #eee;
    color: #333;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    margin-top: 6px;
}
#edit-cancel-btn:hover { background: #ddd; }
#edit-status {
    margin-top: 10px;
    font-size: 13px;
    min-height: 20px;
}
#edit-status.error { color: #c62828; }
#edit-status.success { color: #2e7d32; }

/* Review panel */
#review-panel {
    position: fixed;
    top: 100px;
    right: 12px;
    z-index: 1000;
    background: #fff;
    border-radius: 10px;
    padding: 16px;
    width: 340px;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,.25);
}
#review-panel.hidden { display: none; }
#review-panel h2 { margin-bottom: 12px; font-size: 18px; }

#review-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

.review-card {
    display: flex;
    gap: 10px;
    padding: 8px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #eee;
}
.review-thumb {
    width: 72px;
    height: 54px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}
.review-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.review-species-row {
    display: flex;
    align-items: center;
    gap: 6px;
}
.review-species {
    flex: 1;
    padding: 5px 6px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 13px;
    font-family: inherit;
}
.ai-confidence {
    font-size: 11px;
    font-weight: 600;
    color: #2e7d32;
    white-space: nowrap;
}
.ai-confidence.ai-none {
    color: #999;
}
.review-name {
    padding: 4px 6px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 13px;
    font-family: inherit;
    width: 100%;
}

#review-actions {
    display: flex;
    gap: 6px;
}
#review-confirm-btn {
    flex: 1;
    padding: 10px;
    background: #2e7d32;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
}
#review-confirm-btn:hover { background: #1b5e20; }
#review-confirm-btn:disabled { background: #a5d6a7; cursor: wait; }
#review-cancel-btn {
    padding: 10px 16px;
    background: #eee;
    color: #333;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
}
#review-cancel-btn:hover { background: #ddd; }
#review-status {
    margin-top: 8px;
    font-size: 13px;
    min-height: 20px;
}
#review-status.error { color: #c62828; }
#review-status.success { color: #2e7d32; }

/* Pin panel */
#pin-panel {
    position: fixed;
    top: 100px;
    right: 12px;
    z-index: 1000;
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    width: 300px;
    box-shadow: 0 4px 20px rgba(0,0,0,.25);
}
#pin-panel.hidden { display: none; }
#pin-panel h2 { margin-bottom: 14px; font-size: 18px; }
#pin-panel label {
    display: block;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 600;
    color: #555;
}
#pin-panel input[type="text"],
#pin-panel textarea {
    display: block;
    width: 100%;
    margin-top: 4px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}
#pin-submit-btn {
    width: 100%;
    padding: 10px;
    background: #FF5722;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    margin-top: 4px;
}
#pin-submit-btn:hover { background: #E64A19; }
#pin-cancel-btn {
    width: 100%;
    padding: 10px;
    background: #eee;
    color: #333;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    margin-top: 6px;
}
#pin-cancel-btn:hover { background: #ddd; }

/* ========== Side Panels (Admin, Groups) ========== */
.side-panel {
    position: fixed; top: 0; left: 0; z-index: 1500;
    width: 340px; height: 100vh;
    background: #fff; box-shadow: 4px 0 20px rgba(0,0,0,.2);
    overflow-y: auto; padding: 20px;
}
.side-panel.hidden { display: none; }
.side-panel-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 16px;
}
.side-panel-header h2 { font-size: 18px; }
.close-btn {
    background: none; border: none; font-size: 24px; cursor: pointer;
    color: #666; padding: 0 4px;
}
.close-btn:hover { color: #333; }

.side-panel h3 { font-size: 14px; margin: 16px 0 8px; color: #555; }
.side-panel label {
    display: block; margin-bottom: 10px; font-size: 13px; font-weight: 600; color: #555;
}
.side-panel input, .side-panel select {
    display: block; width: 100%; padding: 8px; margin-top: 4px; margin-bottom: 8px;
    border: 1px solid #ccc; border-radius: 6px; font-size: 13px; font-family: inherit;
}
.side-panel button[type="submit"],
.side-panel button.panel-action-btn {
    width: 100%; padding: 8px; background: #1976d2; color: #fff;
    border: none; border-radius: 6px; font-size: 14px; cursor: pointer;
    margin-top: 4px;
}
.side-panel button[type="submit"]:hover,
.side-panel button.panel-action-btn:hover { background: #1565c0; }

/* Admin user rows */
.admin-user-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 0; border-bottom: 1px solid #eee; font-size: 13px;
}
.admin-user-actions { display: flex; gap: 4px; }
.admin-user-actions button {
    padding: 3px 8px; border: 1px solid #ccc; border-radius: 4px;
    background: #fff; font-size: 12px; cursor: pointer;
}
.admin-user-actions button:hover { background: #f5f5f5; }
.admin-user-actions .danger-btn { color: #c62828; border-color: #e57373; }
.admin-user-actions .danger-btn:hover { background: #ffebee; }
.admin-user-meta { font-size: 11px; color: #999; margin-top: 2px; }
.disabled-user { opacity: 0.5; }

/* Group rows */
.group-row {
    padding: 10px; margin-bottom: 6px; border-radius: 8px;
    border: 1px solid #eee; cursor: pointer; transition: background .15s;
}
.group-row:hover { background: #f5f5f5; }
.group-row-name { display: block; font-weight: 600; font-size: 14px; }
.group-row-meta { display: block; font-size: 12px; color: #888; margin-top: 2px; }

/* Group detail */
.group-member-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 6px 0; border-bottom: 1px solid #f0f0f0; font-size: 13px;
}
.group-member-row button {
    padding: 2px 8px; border: 1px solid #ccc; border-radius: 4px;
    background: #fff; font-size: 12px; cursor: pointer; margin-left: 4px;
}
.group-member-row button:hover { background: #f5f5f5; }

#group-invite-section {
    display: flex; gap: 6px; margin: 10px 0;
}
#group-invite-section input { flex: 1; margin-bottom: 0; }
#group-invite-section button {
    padding: 6px 12px; background: #1976d2; color: #fff;
    border: none; border-radius: 6px; font-size: 13px; cursor: pointer; white-space: nowrap;
}
#group-invite-section button:hover { background: #1565c0; }

.group-detail-actions {
    display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px;
}
.group-detail-actions button {
    padding: 6px 12px; border: 1px solid #ccc; border-radius: 6px;
    background: #fff; font-size: 13px; cursor: pointer;
}
.group-detail-actions button:hover { background: #f5f5f5; }

/* Dropdown menus */
.dropdown { position: relative; }
.dropdown-menu {
    position: absolute; bottom: 100%; left: 0; z-index: 10;
    background: #fff; border: 1px solid #ddd; border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,.15); min-width: 160px;
    margin-bottom: 4px;
}
.dropdown-menu.hidden { display: none; }
.dropdown-menu button {
    display: block; width: 100%; padding: 8px 14px; border: none !important;
    background: none; text-align: left; font-size: 13px; cursor: pointer;
    border-radius: 0 !important; margin: 0 !important;
}
.dropdown-menu button:hover { background: #f5f5f5 !important; }
.dropdown-menu button:first-child { border-radius: 6px 6px 0 0 !important; }
.dropdown-menu button:last-child { border-radius: 0 0 6px 6px !important; }

.danger-btn { color: #c62828 !important; border-color: #e57373 !important; }
.danger-btn:hover { background: #ffebee !important; }

.share-link-row { display: flex; gap: 4px; }
.share-link-row input { flex: 1; margin-bottom: 0 !important; }
.share-link-row button {
    padding: 6px 10px; border: 1px solid #ccc; border-radius: 6px;
    background: #fff; cursor: pointer; font-size: 14px;
}
.share-link-row button:hover { background: #f5f5f5; }

.full-width { width: 100%; }

/* ========== Toast Notifications ========== */
#toast-container {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
    z-index: 3000; display: flex; flex-direction: column; gap: 8px; align-items: center;
    pointer-events: none;
}
.toast {
    background: #333; color: #fff; padding: 10px 20px; border-radius: 8px;
    font-size: 14px; box-shadow: 0 4px 12px rgba(0,0,0,.3);
    animation: toastIn .3s ease, toastOut .3s ease 2.7s forwards;
    pointer-events: auto;
}
.toast.error { background: #c62828; }
.toast.success { background: #2e7d32; }
@keyframes toastIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; } }

/* ========== Custom Dialog ========== */
.dialog-box { text-align: left; }
.dialog-box p { font-size: 14px; margin-bottom: 14px; }
.dialog-box input[type="text"],
.dialog-box input[type="password"] {
    display: block; width: 100%; padding: 10px 12px; margin-bottom: 12px;
    border: 1px solid #ccc; border-radius: 6px; font-size: 14px; font-family: inherit;
}
.dialog-actions { display: flex; gap: 8px; justify-content: flex-end; }
.dialog-actions button {
    padding: 8px 18px; border: none; border-radius: 6px;
    font-size: 14px; cursor: pointer;
}
#dialog-cancel { background: #eee; color: #333; }
#dialog-cancel:hover { background: #ddd; }
#dialog-ok { background: #1976d2; color: #fff; }
#dialog-ok:hover { background: #1565c0; }

/* ========== Location Row ========== */
#location-row {
    display: flex; align-items: center; gap: 6px;
    margin-bottom: 12px; font-size: 13px;
}

#location-status {
    flex: 1; font-size: 13px; color: #888;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#location-status.location-set { color: #2e7d32; font-weight: 600; }
#location-status.location-error { color: #c62828; }
#get-gps-btn, #use-map-btn,
#pin-get-gps-btn, #pin-use-map-btn {
    padding: 6px 10px; border: 1px solid #ccc; border-radius: 6px;
    background: #fff; font-size: 13px; cursor: pointer; white-space: nowrap;
}
#get-gps-btn:hover, #use-map-btn:hover,
#pin-get-gps-btn:hover, #pin-use-map-btn:hover { background: #f5f5f5; }
#use-map-btn.active, #pin-use-map-btn.active { background: #e3f2fd; border-color: #1976d2; color: #1976d2; }

#pin-location-row {
    display: flex; align-items: center; gap: 6px;
    margin-bottom: 12px; font-size: 13px;
}
#pin-location-status {
    flex: 1; font-size: 13px; color: #888;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#pin-location-status.location-set { color: #2e7d32; font-weight: 600; }
#pin-location-status.location-error { color: #c62828; }

/* ========== Quick Species Buttons ========== */
#quick-species {
    display: flex; gap: 6px; margin-bottom: 12px;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
#quick-species::-webkit-scrollbar { display: none; }
.quick-species-btn {
    padding: 6px 14px; border: 2px solid transparent; border-radius: 20px;
    font-size: 13px; font-weight: 600; cursor: pointer;
    white-space: nowrap; flex-shrink: 0;
    opacity: 0.85; transition: opacity .15s, border-color .15s;
}
.quick-species-btn:hover { opacity: 1; }
.quick-species-btn.selected { border-color: #333; opacity: 1; }

/* ========== Mobile Responsive ========== */
@media (max-width: 768px) {
    /* Hide desktop-only buttons on mobile */
    #filter-toggle { display: none !important; }
    #toggle-panel { display: none; }
    #toggle-pin-mode { display: none; }
    #locate-btn { display: none; }

    /* Mobile bottom toolbar */
    #mobile-toolbar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1001;
        background: #fff;
        border-top: 1px solid #ddd;
        padding: 2px 0 2px 0;
        justify-content: space-around;
        align-items: center;
    }
    #mobile-toolbar button {
        background: none;
        border: none;
        font-size: 22px;
        padding: 6px 16px;
        cursor: pointer;
        border-radius: 8px;
        min-height: 40px;
        min-width: 44px;
    }
    #mobile-toolbar button:active { background: #e3f2fd; }

    /* Map: fill available space */
    #map { height: 100dvh; }

    /* User bar: top-right, compact */
    #user-bar { top: 8px; right: 4px; font-size: 12px; }
    #user-display { padding: 6px 10px; }

    /* Filter bar: above toolbar */
    #filter-bar {
        top: auto;
        bottom: 52px;
        left: 8px;
        right: 8px;
        transform: none;
        max-width: none;
        flex-wrap: wrap;
        font-size: 13px;
        padding: 10px;
        gap: 6px;
        display: none;
    }
    #filter-bar.mobile-open { display: flex; }
    #filter-bar select, #filter-bar input[type="date"] {
        font-size: 13px;
        padding: 8px;
        min-height: 40px;
        flex: 1 1 45%;
    }
    #clear-filters { min-height: 40px; min-width: 40px; }

    /* Panels: full width */
    #panel, #edit-panel, #review-panel, #pin-panel {
        width: calc(100vw - 16px);
        right: 8px; left: 8px;
        top: 44px;
        max-height: calc(100dvh - 100px);
        overflow-y: auto;
    }
    .side-panel { width: 100vw; border-radius: 0; }

    /* Touch targets */
    #get-gps-btn, #use-map-btn,
    #pin-get-gps-btn, #pin-use-map-btn { min-height: 44px; min-width: 44px; font-size: 14px; }
    .quick-species-btn { min-height: 44px; padding: 8px 16px; font-size: 14px; }
    #upload-species, #upload-group { min-height: 44px; font-size: 14px; }
    #submit-btn { min-height: 48px; font-size: 16px; }
    #pin-submit-btn, #pin-cancel-btn,
    #edit-submit-btn, #edit-cancel-btn { min-height: 44px; font-size: 15px; }
    .catch-popup img { max-width: 200px; max-height: 150px; }

    /* Toast above toolbar */
    #toast-container { bottom: 56px; }
}
