/* KAGN home/hub page styles — extracted verbatim from index.html's inline
   <style> block (2026-06-12 monolith split, Task 6). Design tokens live in
   tokens.css (the single :root token source — never add tokens here). */

        /* Explorer hub mode — hide pack-browser UI when on Explorer */
        /* Hub owns the primary actions (Identify hero + chips) and the
           bottom nav covers Journal / Log Trip / Community. The old
           quick-actions row and the AI Identify FAB are redundant
           everywhere now — hide them globally, not just on the hub. */
        .quick-actions,
        .fab-identify {
            display: none !important;
        }
        /* Hub view also hides the classic species browser; browse view
           (?view=browse) keeps it visible. */
        body.pack-hub-active .species-reference-section,
        body.pack-hub-active .family-back-bar,
        body.pack-hub-active #birdGrid {
            display: none !important;
        }
        /* Back button is only useful in browse view (back to packs.html);
           on the hub the bottom nav already gives access to every section. */
        .header-back-btn {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: rgba(255,255,255,0.15);
            border: none;
            color: #fff;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background 0.2s;
            flex-shrink: 0;
        }
        .header-back-btn:hover { background: rgba(255,255,255,0.25); }
        .header-back-btn svg { width: 20px; height: 20px; }
        body.pack-hub-active .header-back-btn { display: none; }
        /* In browse view the back button is the primary header action;
           keep the mantis only on the hub. JS still toggles its display
           in hub mode based on auth state. */
        body:not(.pack-hub-active) .header-profile-btn { display: none !important; }

        
        * { 
            box-sizing: border-box; 
            margin: 0; 
            padding: 0;
            -webkit-tap-highlight-color: transparent;
        }
        
        html {
            scroll-behavior: smooth;
        }
        
        /* Screen reader only (accessibility) */
        .sr-only {
            position: absolute;
            width: 1px;
            height: 1px;
            padding: 0;
            margin: -1px;
            overflow: hidden;
            clip: rect(0, 0, 0, 0);
            white-space: nowrap;
            border: 0;
        }
        
        /* Fallback fonts with size adjustments to prevent CLS */
        @font-face {
            font-family: 'Source Sans 3 Fallback';
            src: local('Arial'), local('Helvetica Neue'), local('Helvetica');
            size-adjust: 100.7%;
            ascent-override: 105%;
            descent-override: 30%;
            line-gap-override: 0%;
        }
        @font-face {
            font-family: 'Fraunces Fallback';
            src: local('Georgia'), local('Times New Roman'), local('serif');
            size-adjust: 108%;
            ascent-override: 100%;
            descent-override: 28%;
            line-gap-override: 0%;
        }
        
        body { 
            font-family: 'Source Sans 3', 'Source Sans 3 Fallback', -apple-system, BlinkMacSystemFont, sans-serif;
            background: var(--sand-100);
            min-height: 100vh;
            min-height: 100dvh;
            color: var(--text-primary);
            line-height: 1.5;
            overscroll-behavior-y: contain;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }
        
        /* Header */
        .header { 
            background: var(--forest-800);
            padding: 20px 24px;
            padding-top: calc(20px + var(--safe-area-inset-top));
            color: white;
            position: sticky;
            top: 0;
            z-index: 100;
            box-shadow: 0 2px 12px rgba(0,0,0,0.15);
        }
        .header-inner {
            max-width: 1400px;
            margin: 0 auto;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
        }
        .header-profile-btn {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background: rgba(255,255,255,0.15);
            border: none;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background 0.2s;
        }
        .header-profile-btn:hover {
            background: rgba(255,255,255,0.25);
        }
        .header-profile-icon {
            width: 24px;
            height: 24px;
            object-fit: contain;
            display: block;
        }
        .header-profile-icon.header-profile-avatar {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            object-fit: cover;
        }
        .header-login-btn {
            padding: 8px 14px;
            border-radius: 20px;
            background: rgba(255,255,255,0.2);
            border: 1px solid rgba(255,255,255,0.3);
            color: white;
            font-size: 0.85rem;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 6px;
            transition: background 0.2s;
        }
        .header-login-btn:hover {
            background: rgba(255,255,255,0.3);
        }
        .header h1 { 
            font-family: 'Fraunces', 'Fraunces Fallback', Georgia, serif;
            font-size: 1.6rem;
            font-weight: 600;
            letter-spacing: -0.02em;
            line-height: 1.2; /* Explicit line-height prevents font swap CLS */
        }
        .tagline {
            font-size: 0.9rem;
            opacity: 0.85;
            margin-top: 4px;
            font-weight: 400;
            letter-spacing: 0.01em;
            min-height: 1.4em; /* Reserve space for font swap */
            line-height: 1.4;
            white-space: nowrap;
        }
        @media (max-width: 600px) {
            .header { padding: 16px 16px; }
            .header h1 { font-size: 1.3rem; }
            .header-stats { display: none; }
            .tagline { display: none; }
        }
        
        .container { max-width: 1400px; margin: 0 auto; padding: 20px; }
        @media (max-width: 600px) { .container { padding: 12px; } }
        
        /* Search Section */
        .search-section { 
            background: white;
            border-radius: var(--radius-lg);
            padding: 20px;
            margin-bottom: 20px;
            box-shadow: var(--card-shadow);
            border: 1px solid rgba(0,0,0,0.04);
            contain: layout style;
        }
        
        .search-box { position: relative; margin-bottom: 16px; }
        .search-box input { 
            width: 100%;
            padding: 16px 20px 16px 52px;
            border: 2px solid #e8e8e8;
            border-radius: var(--radius-md);
            font-size: 1rem;
            font-family: inherit;
            transition: all 0.2s ease;
            background: var(--sand-100);
        }
        .search-box input:focus { 
            outline: none;
            border-color: var(--forest-500);
            background: white;
            box-shadow: 0 0 0 4px rgba(61,122,82,0.1);
        }
        .search-box input::placeholder { color: var(--text-muted); }
        .search-box::before { 
            content: '';
            position: absolute;
            left: 18px;
            top: 50%;
            transform: translateY(-50%);
            width: 20px;
            height: 20px;
            background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23888'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'/%3E%3C/svg%3E") center/contain no-repeat;
            opacity: 0.6;
        }
        
        /* Filter Toggle (Mobile) */
        .filter-toggle {
            display: none;
            width: 100%;
            padding: 14px 16px;
            background: var(--forest-50);
            border: 1px solid var(--forest-100);
            border-radius: var(--radius-sm);
            font-size: 0.9rem;
            font-weight: 500;
            color: var(--forest-700);
            cursor: pointer;
            margin-bottom: 12px;
            transition: all 0.2s;
            min-height: 48px;
            font-family: inherit;
        }
        .filter-toggle:hover { background: var(--forest-100); }
        .filter-toggle:active { transform: scale(0.99); }
        .filter-toggle svg { 
            width: 18px; 
            height: 18px; 
            margin-right: 8px;
            vertical-align: -4px;
            transition: transform 0.2s;
        }
        .filter-toggle.active svg { transform: rotate(180deg); }
        @media (max-width: 768px) {
            .filter-toggle { display: block; }
            .filters-collapsible { 
                display: none;
                animation: slideDown 0.2s ease;
            }
            .filters-collapsible.show { display: block; }
            @keyframes slideDown {
                from { opacity: 0; transform: translateY(-8px); }
                to { opacity: 1; transform: translateY(0); }
            }
        }
        
        /* Filter Row */
        .filter-row { 
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
            margin-bottom: 16px;
        }
        .filter-row select { 
            padding: 12px 36px 12px 14px;
            border: 1px solid #ddd;
            border-radius: var(--radius-sm);
            font-size: 0.9rem;
            font-family: inherit;
            background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23666'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E") right 10px center/14px no-repeat;
            cursor: pointer;
            min-width: 130px;
            min-height: 44px;
            appearance: none;
            transition: all 0.15s;
        }
        .filter-row select:hover { border-color: #bbb; }
        .filter-row select:focus { 
            outline: none;
            border-color: var(--forest-500);
            box-shadow: 0 0 0 3px rgba(61,122,82,0.1);
        }
        
        .clear-filters-btn {
            padding: 12px 16px;
            border: 1px solid var(--coral-500);
            border-radius: var(--radius-sm);
            background: white;
            color: var(--coral-500);
            cursor: pointer;
            font-weight: 500;
            font-size: 0.875rem;
            font-family: inherit;
            transition: all 0.15s;
            min-height: 44px;
        }
        .clear-filters-btn:hover { 
            background: var(--coral-500);
            color: white;
        }
        .clear-filters-btn:active { transform: scale(0.97); }

        /* Stats Bar */
        .stats-bar { 
            display: flex;
            gap: 20px;
            padding: 14px 18px;
            background: var(--sand-100);
            border-radius: var(--radius-sm);
            font-size: 0.875rem;
            color: var(--text-secondary);
            margin-top: 16px;
            flex-wrap: wrap;
            border: 1px solid rgba(0,0,0,0.04);
            min-height: 48px; /* Explicit height prevents CLS */
        }
        .stat { display: flex; align-items: center; gap: 6px; min-width: 100px; }
        .stat strong { color: var(--forest-700); font-weight: 600; min-width: 30px; }
        
        /* Grid */
        .grid { 
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
            gap: 20px;
            min-height: 800px; /* Reserve space for initial load */
            contain: layout style;
            align-items: start;
        }
        @media (max-width: 400px) {
            .grid { grid-template-columns: 1fr; gap: 16px; }
        }
        
        /* Cards */
        .card { 
            background: white;
            border-radius: var(--radius-lg);
            overflow: hidden;
            box-shadow: var(--card-shadow);
            transition: all 0.25s ease;
            cursor: pointer;
            position: relative;
            border: 1px solid rgba(0,0,0,0.04);
            contain: layout style;
            content-visibility: auto;
            contain-intrinsic-size: auto 340px;
        }
        .card:hover { 
            transform: translateY(-3px);
            box-shadow: var(--card-shadow-hover);
        }
        .card:active { transform: translateY(-1px); }
        
        /* Skeleton cards */
        .card-skeleton { 
            pointer-events: none;
        }
        .card-skeleton .card-image {
            background: linear-gradient(145deg, var(--forest-50) 0%, var(--sand-200) 100%);
        }
        
        .card-image { 
            aspect-ratio: 4 / 3;
            min-height: 240px; /* Explicit height prevents CLS */
            background: linear-gradient(145deg, var(--forest-50) 0%, var(--sand-200) 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            overflow: hidden;
        }
        .card-thumbnail { 
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: center 25%;
            transition: transform 0.4s ease;
            /* Explicit dimensions prevent CLS */
            min-height: 240px;
            aspect-ratio: 4 / 3;
        }
        .card:hover .card-thumbnail { transform: scale(1.03); }
        .card-attribution {
            font-size: 0.65rem;
            color: var(--text-muted);
            padding: 4px 10px 6px;
            line-height: 1.3;
            letter-spacing: 0.01em;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .card-attribution a {
            color: var(--forest-500);
            text-decoration: none;
        }
        .card-attribution a:hover { text-decoration: underline; }
        .card-image .placeholder { 
            font-size: 3.5rem;
            opacity: 0.3;
        }
        .card-image .thumb-loading { 
            position: absolute;
            inset: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient(145deg, var(--forest-50) 0%, var(--sand-200) 100%);
        }
        .card-image .thumb-spinner { 
            width: 28px;
            height: 28px;
            border: 2px solid rgba(61,122,82,0.2);
            border-top-color: var(--forest-500);
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }
        
        /* Card Badges */
        .card-badges { 
            position: absolute;
            top: 12px;
            right: 12px;
            display: flex;
            gap: 6px;
            flex-wrap: wrap;
            justify-content: flex-end;
        }
        .badge { 
            padding: 4px 10px;
            border-radius: 6px;
            font-size: 0.7rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.03em;
            backdrop-filter: blur(8px);
        }
        .badge-endemic { 
            background: rgba(218,165,32,0.9);
            color: white;
        }
        .badge-near-endemic { 
            background: rgba(244,196,48,0.9);
            color: var(--bark-700);
        }
        .badge-threatened {
            background: rgba(231,111,81,0.95);
            color: white;
        }
        /* Card Content */
        .card-content { 
            padding: 18px 18px 16px;
        }
        .card h3 { 
            font-family: 'Fraunces', 'Fraunces Fallback', Georgia, serif;
            font-size: 1.15rem;
            font-weight: 600;
            color: var(--forest-800);
            margin-bottom: 2px;
            letter-spacing: -0.01em;
            line-height: 1.3; /* Explicit line-height prevents font swap CLS */
        }
        .card .secondary-name {
            font-size: 0.9rem;
            color: var(--bark-600);
            margin-bottom: 2px;
            font-weight: 500;
        }
        .card .scientific { 
            font-style: italic;
            color: var(--text-muted);
            font-size: 0.85rem;
            margin-bottom: 10px;
        }
        .card .description { 
            font-size: 0.875rem;
            color: var(--text-secondary);
            line-height: 1.55;
            margin-bottom: 14px;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        .card-meta { display: flex; gap: 6px; flex-wrap: wrap; }
        .meta-tag { 
            padding: 5px 10px;
            background: var(--sand-100);
            border-radius: 6px;
            font-size: 0.75rem;
            color: var(--bark-600);
            font-weight: 500;
        }
        
        /* Infinite Scroll Sentinel */
        .scroll-sentinel {
            grid-column: 1 / -1;
            height: 50px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .scroll-sentinel.loading::after {
            content: '';
            width: 24px;
            height: 24px;
            border: 2px solid rgba(61,122,82,0.2);
            border-top-color: var(--forest-500);
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }
        
        /* Skeleton Card Placeholders */
        .card-skeleton {
            background: white;
            border-radius: var(--radius-lg);
            overflow: hidden;
            box-shadow: var(--card-shadow);
            border: 1px solid rgba(0,0,0,0.04);
            min-height: 340px; /* Match actual card height to prevent CLS */
            contain: layout style;
        }
        .card-skeleton .skeleton-image {
            aspect-ratio: 4 / 3;
            min-height: 240px; /* Match .card-image */
            background: linear-gradient(90deg, var(--sand-100) 25%, var(--sand-200) 50%, var(--sand-100) 75%);
            background-size: 200% 100%;
            animation: skeleton-shimmer 1.5s infinite;
        }
        .card-skeleton .skeleton-content {
            padding: 18px 18px 16px;
        }
        .card-skeleton .skeleton-line {
            height: 16px;
            background: linear-gradient(90deg, var(--sand-100) 25%, var(--sand-200) 50%, var(--sand-100) 75%);
            background-size: 200% 100%;
            animation: skeleton-shimmer 1.5s infinite;
            border-radius: 4px;
            margin-bottom: 8px;
        }
        .card-skeleton .skeleton-line.title { width: 70%; height: 20px; }
        .card-skeleton .skeleton-line.subtitle { width: 50%; height: 14px; }
        .card-skeleton .skeleton-line.meta { width: 40%; height: 12px; }
        @keyframes skeleton-shimmer {
            0% { background-position: 200% 0; }
            100% { background-position: -200% 0; }
        }

        /* Family-first browse mode */
        .family-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 1rem;
            padding: 0 0.5rem;
        }
        .family-card {
            background: white;
            border-radius: var(--radius-lg);
            overflow: hidden;
            box-shadow: var(--card-shadow);
            cursor: pointer;
            border: 1px solid rgba(0,0,0,0.04);
            transition: transform 0.15s ease, box-shadow 0.25s ease;
            display: flex;
            flex-direction: column;
        }
        .family-card:hover {
            box-shadow: 0 4px 16px rgba(0,0,0,0.1);
        }
        .family-card:active {
            transform: scale(0.98);
        }
        .family-card-image {
            width: 100%;
            aspect-ratio: 4/3;
            min-height: 240px;
            background: linear-gradient(145deg, var(--forest-50, #f0f4f0) 0%, var(--sand-200, #e8e2d4) 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            position: relative;
        }
        .family-card-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: center 25%;
            transition: transform 0.4s ease;
        }
        .family-card:hover .family-card-image img {
            transform: scale(1.03);
        }
        .family-card-attribution {
            font-size: 0.65rem;
            color: var(--text-muted, #888);
            padding: 4px 12px 6px;
            line-height: 1.3;
            letter-spacing: 0.01em;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .family-card-attribution a {
            color: var(--forest-500, #3a6b4a);
            text-decoration: none;
        }
        .family-card-attribution a:hover {
            text-decoration: underline;
        }
        .family-card-content {
            padding: 0.5rem 0.75rem 0.75rem;
        }
        .family-card-content h3 {
            font-size: 1rem;
            font-weight: 600;
            margin: 0;
            line-height: 1.3;
        }
        .family-card-content .family-common {
            font-size: 0.85rem;
            color: #666;
            margin: 0.2rem 0 0;
        }
        .family-card-content .family-progress {
            font-size: 0.8rem;
            color: #888;
            margin: 0.4rem 0 0;
        }
        .family-card-content .family-progress .seen-count {
            color: var(--primary, #1a3a2a);
            font-weight: 600;
        }
        .family-back-bar {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.5rem 1rem;
            font-size: 0.9rem;
            cursor: pointer;
            color: var(--primary, #1a3a2a);
            font-weight: 500;
        }
        .family-back-bar:hover {
            text-decoration: underline;
        }

        /* Modal */
        .modal-overlay { 
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.6);
            backdrop-filter: blur(4px);
            z-index: 1000;
            align-items: center;
            justify-content: center;
            padding: 16px;
            animation: fadeIn 0.2s ease;
        }
        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }
        .modal-overlay.active { display: flex; }
        
        @media (max-width: 600px) {
            .modal-overlay {
                align-items: flex-end;
                padding: 0;
                padding-top: calc(env(safe-area-inset-top, 0px) + 16px);
            }
        }
        
        .modal { 
            background: white;
            border-radius: var(--radius-xl);
            max-width: 580px;
            width: 100%;
            max-height: 92vh;
            overflow-y: auto;
            box-shadow: 0 20px 60px rgba(0,0,0,0.25);
            animation: modalSlide 0.25s ease;
            position: relative;
            -webkit-overflow-scrolling: touch;
        }
        @keyframes modalSlide {
            from { opacity: 0; transform: translateY(20px) scale(0.98); }
            to { opacity: 1; transform: translateY(0) scale(1); }
        }
        @media (max-width: 600px) {
            .modal { 
                max-height: 92vh; /* fallback for older browsers */
                max-height: calc(100dvh - env(safe-area-inset-top, 0px) - 16px);
                border-radius: 20px 20px 0 0;
                animation: modalSlideMobile 0.3s ease;
            }
            @keyframes modalSlideMobile {
                from { opacity: 0; transform: translateY(100%); }
                to { opacity: 1; transform: translateY(0); }
            }
        }
        
        /* Drag handle for mobile modal */
        .modal::before {
            content: '';
            position: absolute;
            top: 8px;
            left: 50%;
            transform: translateX(-50%);
            width: 36px;
            height: 4px;
            background: var(--sand-200);
            border-radius: 2px;
            z-index: 20;
            display: none;
        }
        @media (max-width: 600px) {
            .modal::before {
                display: block;
            }
        }
        
        .modal-close { 
            position: absolute;
            top: 50%;
            right: 10px;
            transform: translateY(-50%);
            width: 44px;
            height: 44px;
            border-radius: 50%;
            background: transparent;
            color: var(--text-muted);
            border: none;
            font-size: 1.5rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.15s;
            z-index: 10;
        }
        .modal-close:hover { background: rgba(0,0,0,0.08); color: var(--text-primary); }
        .modal-close:active { transform: translateY(-50%) scale(0.9); }
        
        .modal-content { padding: 24px; }
        @media (max-width: 600px) { .modal-content { padding: 20px 16px; } }
        
        .modal-content h2 { 
            font-family: 'Fraunces', 'Fraunces Fallback', Georgia, serif;
            color: var(--forest-800);
            font-size: 1.6rem;
            font-weight: 600;
            margin-bottom: 4px;
            letter-spacing: -0.02em;
        }
        .modal-content .secondary-modal {
            font-size: 1.1rem;
            color: var(--bark-600);
            margin-bottom: 4px;
            font-weight: 500;
        }
        .modal-content .scientific { 
            font-style: italic;
            color: var(--text-muted);
            margin-bottom: 16px;
            font-size: 0.95rem;
        }
        .modal-content .description { 
            line-height: 1.65;
            color: var(--text-secondary);
            margin-bottom: 24px;
            font-size: 0.95rem;
        }
        
        .modal-info-grid { 
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 10px;
        }
        @media (max-width: 400px) {
            .modal-info-grid { grid-template-columns: 1fr; }
        }
        .info-item { 
            background: var(--sand-100);
            padding: 14px;
            border-radius: var(--radius-sm);
        }
        .info-item label { 
            display: block;
            font-size: 0.7rem;
            color: var(--text-muted);
            margin-bottom: 4px;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            font-weight: 500;
        }
        .info-item span { 
            color: var(--text-primary);
            font-weight: 500;
            font-size: 0.95rem;
        }
        
        /* Audio Player */
        .audio-player { 
            background: var(--forest-50);
            border-radius: var(--radius-md);
            padding: 18px;
            margin-bottom: 20px;
            border: 1px solid var(--forest-100);
        }
        .audio-player-label { 
            font-size: 0.7rem;
            color: var(--forest-700);
            text-transform: uppercase;
            letter-spacing: 0.05em;
            margin-bottom: 12px;
            font-weight: 600;
        }
        .audio-container { display: flex; align-items: center; gap: 14px; }
        .play-btn { 
            width: 52px;
            height: 52px;
            border-radius: 50%;
            background: var(--forest-600);
            border: none;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 4px 14px rgba(45,90,61,0.35);
            transition: all 0.2s;
            flex-shrink: 0;
        }
        .play-btn:hover { transform: scale(1.06); background: var(--forest-500); }
        .play-btn:active { transform: scale(0.98); }
        .play-btn.playing { background: var(--coral-500); box-shadow: 0 4px 14px rgba(231,111,81,0.35); }
        .play-btn svg { width: 22px; height: 22px; fill: white; }
        .play-btn .play-icon { margin-left: 3px; }
        .audio-info { flex: 1; min-width: 0; }
        .audio-waveform { 
            height: 44px;
            background: linear-gradient(90deg, var(--forest-100), var(--forest-400), var(--forest-100));
            border-radius: 8px;
            position: relative;
            overflow: hidden;
            opacity: 0.5;
        }
        .audio-progress { 
            position: absolute;
            left: 0;
            top: 0;
            bottom: 0;
            background: var(--forest-600);
            width: 0%;
            transition: width 0.1s linear;
            opacity: 0.4;
        }
        .audio-meta { 
            display: flex;
            justify-content: space-between;
            margin-top: 10px;
            font-size: 0.75rem;
            color: var(--text-muted);
            gap: 8px;
        }
        .audio-meta a { color: var(--forest-600); text-decoration: none; }
        .audio-meta a:hover { text-decoration: underline; }
        .license-badge { 
            background: white;
            color: var(--forest-700);
            padding: 2px 6px;
            border-radius: 4px;
            font-weight: 600;
            font-size: 0.65rem;
        }
        
        .no-audio { 
            background: var(--sand-100);
            border-radius: var(--radius-md);
            padding: 20px;
            margin-bottom: 20px;
            text-align: center;
            color: var(--text-muted);
        }
        .no-audio-icon { font-size: 1.8rem; margin-bottom: 6px; opacity: 0.5; }
        
        /* Image Gallery */
        .modal-image-container { 
            position: relative;
            min-height: 280px;
            background: var(--forest-800);
        }
        .gallery-main { 
            width: 100%;
            height: 280px;
            object-fit: contain;
            display: block;
            background: rgba(0,0,0,0.3);
            transition: filter 0.2s ease;
        }
        .gallery-main.loading-large {
            filter: blur(1px);
        }
        @media (min-width: 600px) {
            .modal-image-container { min-height: 340px; }
            .gallery-main { height: 340px; }
        }
        .gallery-loading { 
            position: absolute;
            inset: 0;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            color: white;
            gap: 12px;
        }
        .gallery-spinner { 
            width: 36px;
            height: 36px;
            border: 3px solid rgba(255,255,255,0.2);
            border-top-color: white;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }
        @keyframes spin { to { transform: rotate(360deg); } }
        .gallery-error { text-align: center; color: rgba(255,255,255,0.7); }
        .gallery-error-icon { font-size: 2.5rem; margin-bottom: 8px; opacity: 0.4; }
        
        .gallery-thumbnails { 
            display: flex;
            gap: 8px;
            padding: 12px;
            background: var(--sand-100);
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
        }
        .gallery-thumb { 
            width: 56px;
            height: 56px;
            border-radius: var(--radius-sm);
            object-fit: cover;
            cursor: pointer;
            border: 2px solid transparent;
            transition: all 0.15s;
            flex-shrink: 0;
        }
        .gallery-thumb:hover { border-color: var(--forest-400); }
        .gallery-thumb.active { 
            border-color: var(--forest-600);
            box-shadow: 0 0 0 2px rgba(61,122,82,0.2);
        }
        .gallery-thumb.inat-image { border-color: var(--sky-500); }
        
        .image-attribution { 
            font-size: 0.7rem;
            color: var(--text-muted);
            padding: 10px 14px;
            background: white;
            border-top: 1px solid #eee;
        }
        .image-attribution a { color: var(--forest-600); }
        
        /* Source indicator */
        .source-indicator { 
            display: inline-block;
            padding: 2px 6px;
            border-radius: 4px;
            font-size: 0.6rem;
            font-weight: 600;
            margin-left: 6px;
        }
        .source-r2 { background: #fff8e1; color: #bf8c00; }
        .source-inat { background: #e1f5fe; color: #0277bd; }
        
        /* Tab switcher for Photos/Map */
        .media-tabs { 
            display: flex;
            background: var(--sand-100);
            border-bottom: 1px solid #e0e0e0;
            position: relative;
        }
        .media-tab { 
            flex: 1;
            padding: 14px 16px;
            text-align: center;
            cursor: pointer;
            font-size: 0.9rem;
            font-weight: 500;
            color: var(--text-muted);
            transition: all 0.15s;
            border: none;
            background: none;
            font-family: inherit;
        }
        .media-tab:hover { background: rgba(0,0,0,0.03); color: var(--text-secondary); }
        .media-tab.active { 
            background: white;
            color: var(--forest-700);
            box-shadow: inset 0 -2px 0 var(--forest-500);
        }
        .media-tab-icon { margin-right: 6px; }
        
        /* Distribution map styles */
        .distribution-container { 
            display: none;
            min-height: 280px;
            background: white;
            align-items: center;
            justify-content: center;
            position: relative;
        }
        .distribution-container.active { display: flex; flex-direction: column; }
        .distribution-map { max-width: 100%; max-height: 300px; object-fit: contain; margin: 0 auto; display: block; }
        .distribution-loading { 
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 12px;
            color: var(--text-muted);
        }
        .distribution-error { text-align: center; color: var(--text-muted); padding: 40px; }
        .distribution-error-icon { font-size: 2.5rem; margin-bottom: 8px; opacity: 0.4; }
        .distribution-source { 
            font-size: 0.7rem;
            color: var(--text-muted);
            padding: 10px 14px;
            background: var(--sand-100);
            border-top: 1px solid #eee;
            text-align: center;
        }
        .distribution-source a { color: var(--forest-600); }
        
        /* Loading more indicator */
        .loading-more { 
            font-size: 0.7rem;
            color: var(--text-muted);
            padding: 4px 8px;
            background: var(--sand-100);
            border-radius: 4px;
            display: none;
            margin-left: 8px;
        }
        .loading-more.active { display: inline-block; }
        
        /* Cache indicator */
        .cache-indicator { 
            position: fixed;
            bottom: 20px;
            right: 20px;
            background: var(--forest-600);
            color: white;
            padding: 12px 18px;
            border-radius: var(--radius-sm);
            font-size: 0.85rem;
            z-index: 1001;
            display: none;
            animation: toastIn 2.5s ease;
            box-shadow: 0 4px 16px rgba(0,0,0,0.2);
        }
        @keyframes toastIn { 
            0% { opacity: 0; transform: translateY(12px); }
            15%, 85% { opacity: 1; transform: translateY(0); }
            100% { opacity: 0; transform: translateY(-8px); }
        }
        
        /* (Lifelist indicators moved to trips.html) */
        
        /* (Lifelist stats panel moved to trips.html) */
        
        /* Modal lifelist section */
        .modal-lifelist { 
            background: var(--forest-50);
            border-radius: var(--radius-md);
            padding: 18px;
            margin-bottom: 20px;
            border: 1px solid var(--forest-100);
        }
        .modal-lifelist.is-seen { 
            background: linear-gradient(135deg, var(--forest-100), var(--forest-50));
            border-color: var(--forest-400);
        }
        .modal-lifelist-header { 
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 12px;
        }
        .modal-lifelist h4 { 
            font-size: 0.9rem;
            color: var(--forest-700);
            display: flex;
            align-items: center;
            gap: 8px;
            font-weight: 600;
        }
        .mark-seen-btn { 
            padding: 12px 20px;
            border-radius: var(--radius-sm);
            border: none;
            cursor: pointer;
            font-weight: 600;
            font-size: 0.9rem;
            transition: all 0.15s;
            display: flex;
            align-items: center;
            gap: 8px;
            font-family: inherit;
            min-height: 44px;
        }
        .mark-seen-btn:active { transform: scale(0.97); }
        .mark-seen-btn.not-seen { 
            background: var(--forest-600);
            color: white;
        }
        .mark-seen-btn.not-seen:hover { 
            background: var(--forest-500);
            box-shadow: 0 4px 12px rgba(61,122,82,0.3);
        }
        .mark-seen-btn.is-seen { background: #fee2e2; color: #b91c1c; }
        .mark-seen-btn.is-seen:hover { background: #fecaca; }

        /* Community Sightings Button */
        .community-sightings-section {
            margin-top: 16px;
            padding-top: 16px;
            border-top: 1px solid rgba(0,0,0,0.08);
        }
        .community-sightings-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            width: 100%;
            padding: 12px 16px;
            background: white;
            border: 2px solid var(--forest-200, #c8e6c9);
            border-radius: 10px;
            font-size: 0.95rem;
            font-weight: 500;
            color: var(--forest-700);
            cursor: pointer;
            transition: all 0.2s;
        }
        .community-sightings-btn:hover {
            background: var(--forest-50);
            border-color: var(--forest-400);
        }
        .community-sightings-icon {
            font-size: 1.1rem;
        }
        .community-pro-badge {
            background: var(--gold-500);
            color: var(--forest-900);
            padding: 3px 8px;
            border-radius: 10px;
            font-size: 0.65rem;
            font-weight: 700;
            letter-spacing: 0.04em;
            margin-left: 4px;
        }

        /* AI Field Guide */
        .ai-fieldguide-section {
            margin-top: 10px;
        }
        .ai-fieldguide-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            width: 100%;
            padding: 12px 16px;
            background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
            border: 2px solid #90caf9;
            border-radius: 10px;
            font-size: 0.95rem;
            font-weight: 500;
            color: #1565c0;
            cursor: pointer;
            transition: all 0.2s;
        }
        .ai-fieldguide-btn:hover {
            background: linear-gradient(135deg, #bbdefb 0%, #90caf9 100%);
            border-color: #64b5f6;
        }
        .ai-fieldguide-btn .ai-icon {
            font-size: 1.1rem;
        }
        .ai-fieldguide-response {
            margin-top: 12px;
            padding: 14px 16px;
            background: linear-gradient(135deg, #f8fbff 0%, #eef5fd 100%);
            border-radius: 10px;
            font-size: 0.9rem;
            line-height: 1.5;
            color: var(--text-primary, #1a1a2e);
        }
        .ai-fieldguide-response strong {
            color: #1565c0;
        }
        .ai-fieldguide-response ul {
            margin: 4px 0;
            padding-left: 20px;
        }
        .ai-fieldguide-response li {
            margin-bottom: 2px;
        }
        .ai-fieldguide-loading {
            text-align: center;
            padding: 16px;
            color: #1565c0;
            font-size: 0.9rem;
        }
        .ai-fieldguide-loading .dots::after {
            content: '';
            animation: fieldguideDots 1.4s infinite;
        }
        @keyframes fieldguideDots {
            0% { content: ''; }
            25% { content: '.'; }
            50% { content: '..'; }
            75% { content: '...'; }
        }
        .ai-fieldguide-error {
            margin-top: 12px;
            padding: 12px 16px;
            background: #fff3e0;
            border-radius: 10px;
            font-size: 0.85rem;
            color: #e65100;
            text-align: center;
        }
        .ai-fieldguide-error button {
            margin-top: 8px;
            padding: 6px 16px;
            background: #e65100;
            color: white;
            border: none;
            border-radius: 6px;
            font-size: 0.85rem;
            cursor: pointer;
        }
        .ai-fieldguide-source {
            margin-top: 8px;
            font-size: 0.75rem;
            color: var(--text-muted, #999);
            text-align: right;
            font-style: italic;
        }

        .sighting-details {
            margin-top: 14px;
            padding-top: 14px;
            border-top: 1px solid rgba(0,0,0,0.08);
        }
        .sighting-details p { 
            font-size: 0.85rem;
            color: var(--text-secondary);
            margin-bottom: 4px;
        }
        .sighting-details .date { font-weight: 600; color: var(--forest-700); }
        .sighting-details .coords { 
            font-family: 'SF Mono', Monaco, monospace;
            font-size: 0.8rem;
            color: var(--text-muted);
        }
        .sighting-details a { color: var(--sky-600); text-decoration: none; }
        .sighting-details a:hover { text-decoration: underline; }
        
        /* Species Sightings Map */
        .species-sightings-map-section {
            margin-top: 12px;
        }
        .species-sightings-map-container {
            height: 200px;
            border-radius: var(--radius-sm);
            overflow: hidden;
        }
        #speciesSightingsMap {
            width: 100%;
            height: 200px;
            border-radius: var(--radius-sm);
            z-index: 1;
        }
        #speciesSightingsMap .leaflet-popup-content-wrapper {
            border-radius: 8px;
        }
        #speciesSightingsMap .leaflet-popup-content {
            margin: 10px 12px;
            font-size: 0.85rem;
        }
        #speciesSightingsMap .sighting-popup-date {
            font-weight: 600;
            color: var(--forest-700);
        }
        #speciesSightingsMap .sighting-popup-type {
            color: var(--text-muted);
            font-size: 0.8rem;
        }
        #speciesSightingsMap .sighting-popup-lifer {
            background: linear-gradient(135deg, #daa520, #f4c430);
            color: white;
            font-size: 0.7rem;
            font-weight: 600;
            padding: 2px 8px;
            border-radius: 10px;
            margin-bottom: 6px;
            display: inline-block;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        
        /* Sighting Cards */
        .sighting-cards-container {
            display: flex;
            flex-direction: column;
            gap: 10px;
            margin-top: 12px;
        }
        .sighting-card {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 10px;
            background: white;
            border-radius: 12px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.08);
            position: relative;
            cursor: pointer;
            transition: background 0.15s, box-shadow 0.15s;
        }
        .sighting-card:hover {
            background: var(--forest-50);
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }
        .sighting-card:active {
            background: var(--forest-100);
        }
        .sighting-card-thumb {
            width: 56px;
            height: 56px;
            min-width: 56px;
            border-radius: 10px;
            overflow: hidden;
            background: linear-gradient(145deg, var(--forest-50) 0%, var(--sand-200) 100%);
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .sighting-card-thumb img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        .sighting-card-info {
            flex: 1;
            min-width: 0;
        }
        .sighting-card-name {
            font-size: 0.95rem;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 2px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .sighting-card-date {
            font-size: 0.8rem;
            color: var(--text-muted);
        }
        .sighting-card-menu {
            position: relative;
        }
        .sighting-card-menu-btn {
            width: 32px;
            height: 32px;
            border: none;
            background: transparent;
            cursor: pointer;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.2rem;
            color: var(--text-muted);
            transition: background 0.2s;
        }
        .sighting-card-menu-btn:hover {
            background: var(--sand-200);
        }
        .sighting-card-dropdown {
            position: absolute;
            right: 0;
            top: 100%;
            background: white;
            border-radius: 10px;
            box-shadow: 0 4px 20px rgba(0,0,0,0.15);
            min-width: 140px;
            z-index: 100;
            opacity: 0;
            visibility: hidden;
            transform: translateY(-8px);
            transition: all 0.2s ease;
        }
        .sighting-card-dropdown.show {
            opacity: 1;
            visibility: visible;
            transform: translateY(4px);
        }
        .sighting-card-dropdown-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 12px 14px;
            font-size: 0.9rem;
            color: var(--text-primary);
            cursor: pointer;
            transition: background 0.15s;
            border: none;
            background: none;
            width: 100%;
            text-align: left;
        }
        .sighting-card-dropdown-item:first-child {
            border-radius: 10px 10px 0 0;
        }
        .sighting-card-dropdown-item:last-child {
            border-radius: 0 0 10px 10px;
        }
        .sighting-card-dropdown-item:hover {
            background: var(--forest-50);
        }
        .sighting-card-dropdown-item.danger {
            color: #b91c1c;
        }
        .sighting-card-dropdown-item.danger:hover {
            background: #fef2f2;
        }
        .sighting-cards-count {
            text-align: center;
            font-size: 0.85rem;
            color: var(--text-muted);
            padding-top: 8px;
            border-top: 1px solid #e5e7eb;
            margin-top: 4px;
        }
        
        /* Sighting Details Modal */
        .sighting-detail-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.6);
            z-index: 1001;
            justify-content: center;
            align-items: flex-end;
            padding: 0;
        }
        .sighting-detail-overlay.active { display: flex; }
        @media (min-width: 600px) {
            .sighting-detail-overlay {
                align-items: center;
                padding: 20px;
            }
        }
        .sighting-detail-modal {
            background: var(--sand-100);
            width: 100%;
            max-width: 480px;
            max-height: 90vh;
            overflow-y: auto;
            border-radius: 20px 20px 0 0;
            animation: slideUp 0.3s ease;
        }
        @media (min-width: 600px) {
            .sighting-detail-modal {
                border-radius: 20px;
                max-height: 85vh;
            }
        }
        @keyframes slideUp {
            from { transform: translateY(100%); opacity: 0; }
            to { transform: translateY(0); opacity: 1; }
        }
        .sighting-detail-header {
            position: relative;
            aspect-ratio: 4 / 3;
            background: linear-gradient(145deg, var(--forest-50) 0%, var(--sand-200) 100%);
            overflow: hidden;
        }
        .sighting-detail-header img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: center;
            transition: transform 0.3s ease;
        }
        .sighting-detail-header img:hover {
            transform: scale(1.02);
        }
        /* Image carousel dots */
        .sighting-photo-dots {
            position: absolute;
            bottom: 12px;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            gap: 6px;
            z-index: 5;
        }
        .sighting-photo-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: rgba(255,255,255,0.5);
            border: none;
            cursor: pointer;
            transition: all 0.2s;
        }
        .sighting-photo-dot.active {
            background: white;
            transform: scale(1.2);
        }
        .sighting-photo-dot:hover {
            background: rgba(255,255,255,0.8);
        }
        .sighting-detail-close {
            position: absolute;
            top: 12px;
            right: 12px;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: rgba(255,255,255,0.9);
            backdrop-filter: blur(4px);
            border: none;
            color: var(--text-secondary);
            font-size: 1.4rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 2px 8px rgba(0,0,0,0.15);
            transition: all 0.2s;
            z-index: 10;
        }
        .sighting-detail-close:hover { 
            background: white; 
            color: var(--text-primary);
            transform: scale(1.05);
        }
        .sighting-detail-photo-badge {
            position: absolute;
            top: 12px;
            left: 12px;
            padding: 6px 12px;
            background: rgba(255,255,255,0.95);
            backdrop-filter: blur(4px);
            border-radius: 8px;
            color: var(--forest-700);
            font-size: 0.75rem;
            font-weight: 600;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            z-index: 5;
        }
        /* Expand photo hint */
        .sighting-photo-expand {
            position: absolute;
            bottom: 12px;
            right: 12px;
            padding: 6px 10px;
            background: rgba(0,0,0,0.5);
            backdrop-filter: blur(4px);
            border-radius: 6px;
            color: white;
            font-size: 0.7rem;
            font-weight: 500;
            opacity: 0;
            transition: opacity 0.2s;
            z-index: 5;
        }
        .sighting-detail-header:hover .sighting-photo-expand {
            opacity: 1;
        }
        /* No photo placeholder */
        .sighting-detail-header.no-photo {
            display: flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient(145deg, var(--forest-50) 0%, var(--sand-200) 100%);
        }
        .sighting-detail-header.no-photo img {
            display: none;
        }
        .sighting-detail-header .no-photo-placeholder {
            display: none;
            flex-direction: column;
            align-items: center;
            gap: 12px;
            color: var(--forest-500);
        }
        .sighting-detail-header.no-photo .no-photo-placeholder {
            display: flex;
        }
        .no-photo-placeholder svg {
            width: 64px;
            height: 64px;
            opacity: 0.25;
        }
        .no-photo-placeholder span {
            font-size: 0.8rem;
            font-weight: 500;
            letter-spacing: 0.5px;
            opacity: 0.5;
        }
        .no-photo-placeholder .add-photo-hint {
            padding: 8px 16px;
            background: white;
            border-radius: 20px;
            font-size: 0.8rem;
            font-weight: 500;
            color: var(--forest-600);
            box-shadow: 0 2px 8px rgba(0,0,0,0.08);
            cursor: pointer;
            transition: all 0.2s;
        }
        .no-photo-placeholder .add-photo-hint:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.12);
        }
        .sighting-detail-content {
            padding: 20px;
        }
        .sighting-detail-species {
            margin-bottom: 20px;
        }
        .sighting-detail-species h2 {
            font-family: 'Fraunces', Georgia, serif;
            font-size: 1.4rem;
            color: var(--forest-800);
            margin-bottom: 4px;
        }
        .sighting-detail-species p {
            font-size: 0.9rem;
            color: var(--text-muted);
            font-style: italic;
        }
        .sighting-detail-afrikaans {
            font-size: 1rem;
            color: var(--bark-600);
            font-style: normal;
            font-weight: 500;
            margin-bottom: 2px;
        }
        .sighting-detail-info {
            background: white;
            border-radius: 12px;
            padding: 16px;
            margin-bottom: 16px;
            border: 1px solid var(--forest-100);
        }
        .sighting-detail-row {
            display: flex;
            align-items: flex-start;
            gap: 12px;
            padding: 10px 0;
            border-bottom: 1px solid var(--forest-50);
        }
        .sighting-detail-row:last-child { border-bottom: none; }
        .sighting-detail-icon {
            font-size: 1.1rem;
            width: 24px;
            text-align: center;
            flex-shrink: 0;
        }
        .sighting-detail-label {
            font-size: 0.8rem;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        .sighting-detail-value {
            font-size: 0.95rem;
            color: var(--text-primary);
            margin-top: 2px;
        }
        .sighting-detail-value a {
            color: var(--sky-600);
            text-decoration: none;
        }
        .sighting-detail-value a:hover { text-decoration: underline; }
        .sighting-detail-map {
            height: 150px;
            border-radius: 8px;
            overflow: hidden;
            margin-top: 8px;
        }
        /* Sighting Detail Map Lifer Popup */
        .sighting-detail-popup .leaflet-popup-content-wrapper {
            border-radius: 12px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        }
        .sighting-detail-popup .leaflet-popup-content {
            margin: 10px 12px;
            font-size: 0.85rem;
        }
        .sighting-detail-map .sighting-popup-lifer {
            background: linear-gradient(135deg, #daa520, #f4c430);
            color: white;
            font-size: 0.7rem;
            font-weight: 600;
            padding: 2px 8px;
            border-radius: 10px;
            margin-bottom: 6px;
            display: inline-block;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        .sighting-detail-map .sighting-popup-date {
            font-weight: 600;
            color: var(--forest-700);
        }
        .sighting-detail-map .sighting-popup-type {
            color: var(--text-muted);
            font-size: 0.8rem;
        }
        .sighting-detail-notes {
            background: var(--forest-50);
            border-radius: 8px;
            padding: 12px;
            margin-top: 8px;
            font-size: 0.9rem;
            color: var(--text-secondary);
            line-height: 1.5;
        }
        .sighting-detail-actions {
            display: flex;
            gap: 8px;
            margin-top: 20px;
        }
        .sighting-detail-btn {
            flex: 1;
            padding: 14px 20px;
            border-radius: 12px;
            border: none;
            font-size: 0.95rem;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            transition: all 0.15s;
        }
        .sighting-detail-btn:active { transform: scale(0.97); }
        .sighting-detail-btn.primary {
            background: var(--forest-600);
            color: white;
        }
        .sighting-detail-btn.primary:hover { background: var(--forest-500); }
        .sighting-detail-btn.secondary {
            background: var(--sand-200);
            color: var(--text-primary);
        }
        .sighting-detail-btn.secondary:hover { background: var(--forest-100); }
        .sighting-detail-btn.danger {
            background: #fee2e2;
            color: #b91c1c;
            flex: 0 0 auto;
            padding: 14px 16px;
        }
        .sighting-detail-btn.danger:hover { background: #fecaca; }
        .sighting-detail-btn.tertiary {
            background: transparent;
            color: var(--forest-600);
            border: 1px solid var(--forest-200);
            flex: 0 0 auto;
            padding: 14px 16px;
        }
        .sighting-detail-btn.tertiary:hover { 
            background: var(--forest-50); 
            border-color: var(--forest-300);
        }
        
        /* GPS status indicator */
        .gps-status { 
            font-size: 0.75rem;
            color: var(--text-muted);
            display: flex;
            align-items: center;
            gap: 4px;
            margin-top: 10px;
        }
        .gps-status.acquiring { color: var(--gold-500); }
        .gps-status.success { color: var(--forest-500); }
        .gps-status.error { color: var(--coral-500); }
        
        /* Edit sighting form */
        .edit-sighting-form { 
            margin-top: 14px;
            padding-top: 14px;
            border-top: 1px solid rgba(0,0,0,0.08);
        }
        .edit-sighting-form .form-row { 
            display: flex;
            gap: 10px;
            margin-bottom: 10px;
            flex-wrap: wrap;
        }
        .edit-sighting-form .form-group { flex: 1; min-width: 100px; }
        .edit-sighting-form label { 
            display: block;
            font-size: 0.7rem;
            color: var(--text-muted);
            margin-bottom: 4px;
            text-transform: uppercase;
            letter-spacing: 0.03em;
            font-weight: 500;
        }
        .edit-sighting-form input { 
            width: 100%;
            padding: 10px 12px;
            border: 1px solid #ddd;
            border-radius: var(--radius-sm);
            font-size: 0.9rem;
            font-family: inherit;
        }
        .edit-sighting-form input:focus { 
            outline: none;
            border-color: var(--forest-500);
            box-shadow: 0 0 0 3px rgba(61,122,82,0.1);
        }
        .edit-form-actions { 
            display: flex;
            gap: 8px;
            margin-top: 14px;
            flex-wrap: wrap;
        }
        .edit-form-actions button { 
            padding: 10px 16px;
            border-radius: var(--radius-sm);
            border: none;
            cursor: pointer;
            font-size: 0.85rem;
            font-weight: 500;
            transition: all 0.15s;
            font-family: inherit;
        }
        .btn-save { background: var(--forest-600); color: white; }
        .btn-save:hover { background: var(--forest-500); }
        .btn-cancel { background: #e5e5e5; color: var(--text-primary); }
        .btn-cancel:hover { background: #d5d5d5; }
        .btn-recapture { background: #dbeafe; color: #1d4ed8; }
        .btn-recapture:hover { background: #bfdbfe; }
        .btn-edit-sighting { 
            background: transparent;
            color: var(--sky-600);
            padding: 6px 10px;
            font-size: 0.8rem;
            border: 1px solid var(--sky-500);
            border-radius: var(--radius-sm);
            margin-top: 10px;
            font-family: inherit;
        }
        .btn-edit-sighting:hover { background: #e0f2fe; }
        
        /* Footer */
        .footer {
            text-align: center;
            padding: 16px 20px 24px;
            color: var(--text-muted);
            font-size: 0.9rem;
        }
        .footer { padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
        .footer a { color: var(--forest-600); text-decoration: none; }
        .footer a:hover { text-decoration: underline; }
        
        /* Mobile-specific adjustments */
        @media (max-width: 768px) {
            .filter-row select { flex: 1; min-width: 45%; }
            .stats-bar { gap: 12px; }
            .lifelist-header { flex-direction: column; align-items: flex-start; }
            .lifelist-actions { width: 100%; }
            .lifelist-actions button, .lifelist-actions a { flex: 1; }
        }
        
        @media (max-width: 400px) {
            .filter-row select { min-width: 100%; }
            .modal-lifelist-header { flex-direction: column; align-items: stretch; }
            .mark-seen-btn { justify-content: center; }
        }
        
        /* AI Identify FAB */
        .fab-identify {
            position: fixed;
            bottom: calc(24px + env(safe-area-inset-bottom, 0px));
            right: 24px;
            background: linear-gradient(135deg, var(--gold-500) 0%, #e6b820 100%);
            color: var(--forest-900);
            padding: 14px 22px;
            border-radius: 50px;
            box-shadow: 0 4px 20px rgba(218,165,32,0.4), 0 2px 8px rgba(0,0,0,0.1);
            display: flex;
            align-items: center;
            gap: 10px;
            font-weight: 600;
            font-size: 0.95rem;
            text-decoration: none;
            z-index: 90;
            transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s ease;
            border: none;
            cursor: pointer;
            font-family: inherit;
            will-change: transform; /* GPU layer promotion for animations */
        }
        .fab-identify:hover {
            transform: translateY(-4px);
            box-shadow: 0 8px 28px rgba(218,165,32,0.5), 0 4px 12px rgba(0,0,0,0.15);
        }
        .fab-identify:active {
            transform: translateY(-2px);
        }
        .fab-identify svg {
            width: 22px;
            height: 22px;
            flex-shrink: 0;
        }
        .fab-identify-badge {
            position: absolute;
            top: -6px;
            right: -6px;
            background: var(--coral-600);
            color: white;
            font-size: 0.65rem;
            padding: 3px 7px;
            border-radius: 10px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.03em;
            box-shadow: 0 1px 3px rgba(0,0,0,0.2);
        }
        @keyframes fabPulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.08); }
        }
        .fab-identify.pulse {
            animation: fabPulse 1.5s ease-in-out 3;
        }
        /* Pulse ring effect using pseudo-element (GPU accelerated) */
        .fab-identify.pulse::after {
            content: '';
            position: absolute;
            inset: -4px;
            border-radius: 50px;
            background: rgba(218,165,32,0.3);
            z-index: -1;
            animation: fabRing 1.5s ease-in-out 3;
        }
        @keyframes fabRing {
            0%, 100% { transform: scale(1); opacity: 0; }
            50% { transform: scale(1.15); opacity: 1; }
        }
        @media (max-width: 600px) {
            .fab-identify {
                bottom: calc(24px + env(safe-area-inset-bottom, 0px));
                right: 16px;
                padding: 12px 18px;
                font-size: 0.9rem;
            }
            .fab-identify svg {
                width: 20px;
                height: 20px;
            }
        }
        /* Toast notification for sighting confirmation */
        .sighting-toast {
            position: fixed;
            bottom: 100px;
            left: 50%;
            transform: translateX(-50%) translateY(100px);
            background: var(--forest-700);
            color: white;
            padding: 12px 24px;
            border-radius: 12px;
            box-shadow: 0 4px 20px rgba(0,0,0,0.3);
            font-weight: 500;
            z-index: 10001;
            opacity: 0;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 8px;
            max-width: 90%;
            text-align: center;
        }
        .sighting-toast.show {
            transform: translateX(-50%) translateY(0);
            opacity: 1;
        }
        .sighting-toast.success { background: var(--forest-600); }
        .sighting-toast.acquiring { background: var(--sky-600); }
        .sighting-toast.error { background: var(--coral-600); }
        .sighting-toast .toast-icon { font-size: 1.2rem; }
        
        /* Move FAB up when lifelist panel is open */
        .lifelist-panel.show ~ .fab-identify {
            bottom: 320px;
        }
        
        /* Log Sighting Modal - Full screen style */
        .log-sighting-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.5);
            backdrop-filter: blur(4px);
            -webkit-backdrop-filter: blur(4px);
            z-index: 10000;
            display: none;
            overflow-y: auto;
        }
        .log-sighting-overlay.active { display: block; }
        
        .log-sighting-modal {
            background: var(--sand-50);
            min-height: 100%;
            max-width: 600px;
            margin: 0 auto;
            animation: slideUp 0.25s ease;
        }
        
        @keyframes slideUp {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }
        
        .log-sighting-header {
            background: linear-gradient(135deg, var(--forest-800) 0%, var(--forest-700) 100%);
            color: white;
            padding: 14px 16px;
            padding-top: calc(14px + var(--safe-area-inset-top));
            display: flex;
            align-items: center;
            justify-content: space-between;
            position: sticky;
            top: 0;
            z-index: 10;
        }
        
        .log-sighting-header h2 {
            font-family: 'Fraunces', Georgia, serif;
            font-size: 1.1rem;
            font-weight: 600;
            margin: 0;
        }
        
        .log-sighting-close {
            background: rgba(255,255,255,0.1);
            border: none;
            color: white;
            font-size: 1.2rem;
            cursor: pointer;
            padding: 0;
            border-radius: 50%;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background 0.15s, transform 0.15s;
        }
        .log-sighting-close:hover { background: rgba(255,255,255,0.2); }
        .log-sighting-close:active { transform: scale(0.9); }
        
        .log-sighting-actions {
            display: flex;
            gap: 8px;
        }
        
        .log-sighting-action-btn {
            background: rgba(255,255,255,0.1);
            border: none;
            color: white;
            font-size: 1.2rem;
            cursor: pointer;
            padding: 0;
            border-radius: 50%;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background 0.15s, transform 0.15s;
        }
        .log-sighting-action-btn:hover { background: rgba(255,255,255,0.2); }
        .log-sighting-action-btn:active { transform: scale(0.9); }
        
        .log-sighting-body { 
            padding: 0;
            padding-bottom: calc(20px + var(--safe-area-inset-bottom));
        }
        
        /* Species Name Section */
        .log-sighting-species-section {
            background: white;
            padding: 18px 20px;
            border-bottom: 1px solid var(--sand-200);
        }
        
        .log-sighting-species-name {
            font-family: 'Fraunces', Georgia, serif;
            font-size: 1.3rem;
            font-weight: 600;
            color: var(--forest-800);
        }
        
        .edit-species-results {
            background: white;
            border-radius: 12px;
            box-shadow: 0 4px 20px rgba(0,0,0,0.12);
            max-height: 300px;
            overflow-y: auto;
            display: none;
            border: 1px solid var(--sand-200);
            margin-top: 8px;
        }
        
        .edit-species-results.show { display: block; }
        
        .edit-species-result {
            padding: 14px 18px;
            cursor: pointer;
            border-bottom: 1px solid var(--sand-100);
            transition: background 0.15s;
            min-height: 56px;
            display: flex;
            flex-direction: column;
            justify-content: center;
        }
        
        .edit-species-result:hover { background: var(--forest-50); }
        .edit-species-result:active { background: var(--forest-100); }
        .edit-species-result:last-child { border-bottom: none; }
        
        .edit-species-result-name {
            font-weight: 600;
            color: var(--forest-800);
        }
        
        .edit-species-result-afr {
            font-size: 0.85rem;
            color: var(--text-muted);
            font-style: italic;
        }
        
        /* Map Section */
        .log-sighting-map-section {
            position: relative;
            height: 220px;
            background: var(--sand-200);
        }
        
        .log-sighting-map-section #logSightingMap {
            width: 100%;
            height: 100%;
        }
        
        .log-sighting-map-section .drag-hint {
            position: absolute;
            top: 8px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(0,0,0,0.75);
            color: white;
            padding: 6px 14px;
            border-radius: 20px;
            font-size: 0.8rem;
            z-index: 1000;
            pointer-events: none;
            opacity: 0;
            transition: opacity 0.3s;
        }
        
        .log-sighting-map-section .drag-hint.show {
            opacity: 1;
        }
        
        .log-sighting-map-section .map-loading {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
            color: #666;
            font-size: 0.9rem;
            background: rgba(255,255,255,0.95);
            padding: 14px 20px;
            border-radius: 10px;
            box-shadow: 0 2px 12px rgba(0,0,0,0.15);
        }
        
        .log-sighting-map-section .map-loading.hidden {
            display: none;
        }
        
        /* Form Row Sections */
        .log-sighting-form-row {
            background: white;
            padding: 16px 20px;
            border-bottom: 1px solid var(--sand-200);
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        
        .log-sighting-label {
            font-size: 0.95rem;
            color: var(--text-secondary);
        }
        
        .log-sighting-input {
            padding: 10px 14px;
            border: 2px solid var(--sand-200);
            border-radius: 8px;
            font-size: 0.95rem;
            font-family: inherit;
            background: white;
            color: var(--text-primary);
        }
        
        .log-sighting-input:focus {
            outline: none;
            border-color: var(--forest-500);
        }
        
        textarea.log-sighting-input {
            width: 100%;
            resize: vertical;
            min-height: 80px;
        }
        
        .log-sighting-notes-row {
            flex-direction: column;
            align-items: stretch;
            gap: 10px;
        }
        
        /* Radio Groups */
        .log-sighting-radio-group {
            display: flex;
            gap: 16px;
            flex-wrap: wrap;
        }
        
        .log-sighting-radio {
            display: flex;
            align-items: center;
            gap: 6px;
            cursor: pointer;
            font-size: 0.9rem;
            color: var(--text-secondary);
            padding: 8px 0;
        }
        
        .log-sighting-radio input[type="radio"] {
            width: 20px;
            height: 20px;
            accent-color: var(--forest-600);
        }
        
        /* Coordinates */
        .coords-edit {
            display: flex;
            align-items: center;
            gap: 6px;
        }
        
        .coord-input {
            width: 110px;
            padding: 10px 12px;
            border: 2px solid var(--sand-200);
            border-radius: 8px;
            font-size: 0.9rem;
            font-family: 'Source Sans 3', monospace;
            text-align: center;
            background: white;
        }
        
        .coord-input:focus {
            outline: none;
            border-color: var(--forest-500);
        }
        
        .coord-separator {
            color: var(--text-muted);
            font-size: 1.1rem;
        }
        
        /* Trip Select */
        .trip-select-wrapper select {
            padding: 10px 14px;
            border: 2px solid var(--sand-200);
            border-radius: 8px;
            font-size: 0.95rem;
            font-family: inherit;
            background: white;
            min-width: 150px;
        }
        
        .trip-select-wrapper select:focus {
            outline: none;
            border-color: var(--forest-500);
        }
        
        /* Map Search and Controls */
        .map-search-container {
            position: absolute;
            top: 10px;
            left: 10px;
            right: 10px;
            z-index: 1000;
            display: flex;
            gap: 8px;
        }
        
        .map-search-wrapper {
            flex: 1;
            position: relative;
        }
        
        .map-search-input {
            width: 100%;
            padding: 10px 12px 10px 36px;
            border: none;
            border-radius: 8px;
            font-size: 0.9rem;
            background: white;
            box-shadow: 0 2px 8px rgba(0,0,0,0.2);
        }
        
        .map-search-input:focus {
            outline: none;
            box-shadow: 0 2px 12px rgba(0,0,0,0.3);
        }
        
        .map-search-input::placeholder {
            color: #999;
        }
        
        .map-search-icon {
            position: absolute;
            left: 12px;
            top: 50%;
            transform: translateY(-50%);
            color: #888;
            font-size: 0.9rem;
            pointer-events: none;
        }
        
        .map-search-results {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            margin-top: 4px;
            background: white;
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.2);
            max-height: 200px;
            overflow-y: auto;
            display: none;
        }
        
        .map-search-results.show {
            display: block;
        }
        
        .map-search-result {
            padding: 10px 12px;
            cursor: pointer;
            font-size: 0.85rem;
            border-bottom: 1px solid #eee;
        }
        
        .map-search-result:last-child {
            border-bottom: none;
        }
        
        .map-search-result:hover {
            background: var(--forest-50);
        }
        
        .map-search-result .result-name {
            font-weight: 500;
            color: var(--text-primary);
        }
        
        .map-search-result .result-detail {
            font-size: 0.75rem;
            color: var(--text-muted);
            margin-top: 2px;
        }
        
        .map-control-btn {
            width: 40px;
            height: 40px;
            border: none;
            border-radius: 8px;
            background: white;
            box-shadow: 0 2px 8px rgba(0,0,0,0.2);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.1rem;
            color: var(--forest-600);
            transition: all 0.2s;
            flex-shrink: 0;
        }
        
        .map-control-btn:hover {
            background: var(--forest-50);
        }
        
        .map-control-btn:active {
            transform: scale(0.95);
        }
        
        .map-control-btn.locating {
            background: var(--forest-100);
            animation: pulse 1s infinite;
        }
        
        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.6; }
        }
        
        /* Custom zoom controls styling */
        .map-zoom-controls {
            position: absolute;
            bottom: 50px;
            left: 10px;
            z-index: 1000;
            display: flex;
            flex-direction: column;
            gap: 4px;
        }
        
        .map-zoom-btn {
            width: 32px;
            height: 32px;
            border: none;
            border-radius: 6px;
            background: white;
            box-shadow: 0 2px 6px rgba(0,0,0,0.2);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.2rem;
            font-weight: bold;
            color: var(--forest-700);
        }
        
        .map-zoom-btn:hover {
            background: var(--forest-50);
        }
        
        .map-zoom-btn:active {
            background: var(--forest-100);
        }
        
        .map-loading-spinner {
            width: 24px;
            height: 24px;
            border: 3px solid #ddd;
            border-top-color: var(--forest-600);
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }
        
        @keyframes spin {
            to { transform: rotate(360deg); }
        }
        
        .trip-select-wrapper {
            position: relative;
        }
        
        .trip-select-wrapper select {
            appearance: none;
            background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 14px center;
            padding-right: 40px;
        }
        
        .new-trip-link {
            display: inline-block;
            margin-top: 6px;
            font-size: 0.85rem;
            color: var(--forest-600);
            text-decoration: none;
        }
        .new-trip-link:hover { text-decoration: underline; }
        
        /* Accessibility - Reduced motion */
        @media (prefers-reduced-motion: reduce) {
            *,
            *::before,
            *::after {
                animation-duration: 0.01ms !important;
                animation-iteration-count: 1 !important;
                transition-duration: 0.01ms !important;
            }
            html {
                scroll-behavior: auto;
            }
        }
        
        /* Focus visible for keyboard navigation */
        :focus-visible {
            outline: 2px solid var(--forest-500);
            outline-offset: 2px;
        }
        
        button:focus:not(:focus-visible),
        a:focus:not(:focus-visible) {
            outline: none;
        }
        
        /* Feature Cards Section */
        .feature-cards {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 16px;
            margin-bottom: 20px;
        }
        @media (max-width: 540px) {
            .feature-cards { 
                grid-template-columns: 1fr;
                gap: 12px;
                margin-bottom: 16px;
            }
        }
        
        .feature-card {
            background: white;
            border-radius: var(--radius-lg);
            padding: 20px;
            box-shadow: var(--card-shadow);
            border: 1px solid rgba(0,0,0,0.04);
            text-decoration: none;
            color: inherit;
            display: flex;
            flex-direction: column;
            gap: 12px;
            transition: all 0.2s ease;
            position: relative;
            overflow: hidden;
        }
        .feature-card:hover {
            transform: translateY(-2px);
            box-shadow: var(--card-shadow-hover);
        }
        .feature-card:active {
            transform: translateY(0);
        }
        
        .feature-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
        }
        .feature-card--ai::before {
            background: linear-gradient(90deg, var(--gold-500), var(--coral-500));
        }
        .feature-card--trips::before {
            background: linear-gradient(90deg, var(--forest-500), var(--sky-500));
        }
        
        .feature-card-header {
            display: flex;
            align-items: center;
            gap: 12px;
        }
        
        .feature-card-icon {
            width: 48px;
            height: 48px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }
        .feature-card--ai .feature-card-icon {
            background: linear-gradient(135deg, #fff8e7 0%, #fef3cd 100%);
        }
        .feature-card--trips .feature-card-icon {
            background: linear-gradient(135deg, var(--forest-50) 0%, var(--forest-100) 100%);
        }
        .feature-card-icon svg {
            width: 26px;
            height: 26px;
        }
        .feature-card--ai .feature-card-icon svg {
            color: var(--coral-500);
        }
        .feature-card--trips .feature-card-icon svg {
            color: var(--forest-600);
        }
        
        .feature-card-titles {
            flex: 1;
            min-width: 0;
        }
        
        .feature-card-badge {
            font-size: 0.65rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            padding: 3px 8px;
            border-radius: 4px;
            display: inline-block;
            margin-bottom: 2px;
        }
        .feature-card--ai .feature-card-badge {
            background: var(--gold-500);
            color: var(--forest-900);
        }
        .feature-card--trips .feature-card-badge {
            background: var(--forest-100);
            color: var(--forest-700);
        }
        
        .feature-card-title {
            font-family: 'Fraunces', 'Fraunces Fallback', Georgia, serif;
            font-size: 1.15rem;
            font-weight: 600;
            color: var(--text-primary);
            line-height: 1.2;
        }
        
        .feature-card-desc {
            font-size: 0.9rem;
            color: var(--text-secondary);
            line-height: 1.45;
        }
        
        .feature-card-cta {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            font-size: 0.9rem;
            font-weight: 600;
            margin-top: auto;
            padding-top: 4px;
        }
        .feature-card--ai .feature-card-cta {
            color: var(--coral-600);
        }
        .feature-card--trips .feature-card-cta {
            color: var(--forest-600);
        }
        .feature-card-cta svg {
            width: 16px;
            height: 16px;
            transition: transform 0.2s;
        }
        .feature-card:hover .feature-card-cta svg {
            transform: translateX(3px);
        }
        
        @media (max-width: 540px) {
            .feature-card {
                padding: 16px;
                flex-direction: row;
                align-items: center;
                gap: 14px;
            }
            .feature-card-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 8px;
                flex: 1;
            }
            .feature-card-icon {
                width: 44px;
                height: 44px;
            }
            .feature-card-icon svg {
                width: 22px;
                height: 22px;
            }
            .feature-card-desc {
                display: none;
            }
            .feature-card-cta {
                display: none;
            }
            .feature-card-title {
                font-size: 1rem;
            }
            .feature-card::before {
                height: 3px;
            }
        }
        
        /* ===========================================
           QUICK ACTIONS BAR
           =========================================== */
        .quick-actions {
            display: flex;
            gap: 12px;
            margin-bottom: 20px;
        }
        .quick-action-btn {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 16px 12px;
            border-radius: var(--radius-lg);
            font-size: 0.95rem;
            font-weight: 600;
            text-decoration: none;
            cursor: pointer;
            transition: all 0.2s;
            border: none;
            font-family: inherit;
            box-shadow: var(--card-shadow);
        }
        .quick-action-btn--primary {
            background: var(--forest-600);
            color: white;
        }
        .quick-action-btn--primary:hover {
            background: var(--forest-700);
            transform: translateY(-2px);
            box-shadow: var(--card-shadow-hover);
        }
        .quick-action-btn--secondary {
            background: white;
            color: var(--forest-700);
            border: 2px solid var(--forest-200);
        }
        .quick-action-btn--secondary:hover {
            border-color: var(--forest-400);
            background: var(--forest-50);
            transform: translateY(-2px);
        }
        .quick-action-btn--tertiary {
            background: linear-gradient(135deg, #fff8f6 0%, #fff0eb 100%);
            color: var(--coral-600);
            border: 2px solid rgba(231, 111, 81, 0.2);
        }
        .quick-action-btn--tertiary:hover {
            border-color: var(--coral-500);
            transform: translateY(-2px);
            box-shadow: var(--card-shadow-hover);
        }
        .quick-action-btn--community {
            background: linear-gradient(135deg, #e8f5ed 0%, #d4edda 100%);
            color: var(--forest-700);
            border: 2px solid rgba(61, 122, 82, 0.3);
        }
        .quick-action-btn--community:hover {
            border-color: var(--forest-500);
            transform: translateY(-2px);
            box-shadow: var(--card-shadow-hover);
        }
        .quick-action-icon {
            font-size: 1.2rem;
        }

        @media (max-width: 540px) {
            .quick-actions {
                gap: 6px;
                flex-wrap: wrap;
            }
            .quick-action-btn {
                flex-direction: column;
                padding: 12px 6px;
                gap: 4px;
                min-width: 60px;
            }
            .quick-action-label {
                font-size: 0.7rem;
            }
            .quick-action-icon {
                font-size: 1.3rem;
            }
        }
        
        /* ===========================================
           SPECIES REFERENCE SECTION
           =========================================== */
        .species-reference-section {
            margin-top: 24px;
            padding-top: 24px;
            border-top: 1px solid var(--sand-200);
        }
        .species-reference-header {
            margin-bottom: 16px;
        }
        .species-reference-header h2 {
            font-family: 'Fraunces', Georgia, serif;
            font-size: 1.2rem;
            font-weight: 600;
            color: var(--forest-800);
            margin: 0 0 4px 0;
        }
        .species-reference-header p {
            font-size: 0.9rem;
            color: var(--text-muted);
            margin: 0;
        }
