/* ============================================================
   REELY — Design System v3
   Reely — Fiskeapp Design System
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800&display=swap');

/* ---------- Scrollbar (desktop) ---------- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-secondary, #ede8e0); }
::-webkit-scrollbar-thumb {
    background: rgba(45, 80, 70, 0.35);
    border-radius: 5px;
    border: 2px solid var(--bg-secondary, #ede8e0);
}
::-webkit-scrollbar-thumb:hover { background: rgba(45, 80, 70, 0.55); }
html { scrollbar-color: rgba(45, 80, 70, 0.35) #ede8e0; scrollbar-width: auto; }

/* ---------- Design Tokens ---------- */
:root {
    /* Core palette — warm cream / forest */
    --bg-primary: #f5f0ea;
    --bg-secondary: #ede8e0;
    --bg-card: #ffffff;
    --bg-glass: rgba(45, 74, 62, 0.04);
    --bg-glass-hover: rgba(45, 74, 62, 0.08);
    --bg-input: #ede8e0;
    --bg-input-focus: #e5dfd6;

    /* Accent — forest green + warm gold */
    --accent: #2d5046;
    --accent-dim: #1e3a32;
    --accent-glow: rgba(45, 80, 70, 0.10);
    --accent-hover: #3a665a;
    --accent-green: #2d7a4f;
    --accent-orange: #c4723a;
    --accent-red: #c44b4b;
    --accent-purple: #6b4fa0;
    --accent-gold: #b8860b;

    /* Text */
    --text-primary: #2c2c2c;
    --text-secondary: #6b6560;
    --text-muted: #9a9490;
    --text-on-accent: #ffffff;

    /* Borders */
    --border: #e0d8ce;
    --border-hover: #cdc4b8;
    --border-accent: rgba(45, 80, 70, 0.25);

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(45, 40, 30, 0.06);
    --shadow-md: 0 4px 12px rgba(45, 40, 30, 0.10);
    --shadow-lg: 0 8px 24px rgba(45, 40, 30, 0.14);
    --shadow-glow: 0 0 0 transparent;

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;

    /* Typography */
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Outfit', 'Inter', sans-serif;

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
    --duration-fast: 150ms;
    --duration-normal: 250ms;
    --duration-slow: 400ms;

    /* Layout */
    --max-width: 480px;
    --nav-height: 56px;
    --bottom-nav-height: 68px;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; display: block; }
button { font-family: var(--font-body); cursor: pointer; border: none; outline: none; background: none; }
input, textarea, select { font-family: var(--font-body); outline: none; border: none; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 700; line-height: 1.2; color: var(--text-primary); }
h1 { font-size: 2rem; letter-spacing: -0.02em; }
h2 { font-size: 1.5rem; letter-spacing: -0.01em; }
h3 { font-size: 1.125rem; }
h4 { font-size: 1rem; font-weight: 600; }

.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-muted { color: var(--text-secondary); }
.text-accent { color: var(--accent); }

/* ---------- Landing Page ---------- */
.landing-page {
    position: relative;
    z-index: 1;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    text-align: center;
    background: linear-gradient(180deg, #e8e0d4 0%, #f5f0ea 50%, #e8e0d4 100%);
}

.landing-logo {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #2d5046 0%, #1e3a32 60%, #2d7a4f 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-sm);
    animation: fadeInUp 0.8s var(--ease-out) both;
}

.landing-logo .logo-emoji {
    -webkit-text-fill-color: initial;
    font-size: 2.8rem;
}

.landing-tagline {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-3xl);
    animation: fadeInUp 0.8s 0.15s var(--ease-out) both;
}

.btn-google {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    max-width: 320px;
    padding: 14px 24px;
    background: white;
    color: #3c4043;
    border: 1px solid #dadce0;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease-out);
    animation: fadeInUp 0.8s 0.3s var(--ease-out) both;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.btn-google:hover {
    background: #f8f9fa;
    border-color: #c6c9cc;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.btn-google:active {
    transform: scale(0.98);
}

.btn-google svg {
    flex-shrink: 0;
}

/* ---------- Buttons ---------- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent) 100%);
    color: var(--text-on-accent);
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--duration-normal) var(--ease-out);
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg), 0 0 32px rgba(45, 80, 70, 0.25);
}

.btn-primary:active { transform: translateY(0); }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 10px 20px;
    background: var(--bg-glass);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all var(--duration-normal) var(--ease-out);
}

.btn-secondary:hover {
    background: var(--bg-glass-hover);
    border-color: var(--border-hover);
}

/* ---------- App Shell ---------- */
.app-container {
    position: relative;
    z-index: 1;
    max-width: var(--max-width);
    margin: 0 auto;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

/* Top nav */
.top-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-lg);
    height: var(--nav-height);
    background: var(--accent-dim);
    border-bottom: none;
}

.top-nav-logo {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 800;
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-logo-img {
    height: 36px;
    width: auto;
    filter: brightness(0) invert(1);
}

.landing-logo-img {
    height: 2.5rem;
    width: auto;
    vertical-align: middle;
}

.top-nav-actions { display: flex; gap: var(--space-sm); align-items: center; }

.top-nav-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, #c4993a, #b8860b);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-on-accent);
    cursor: pointer;
    transition: transform var(--duration-fast) var(--ease-out);
}

.top-nav-avatar:hover { transform: scale(1.08); }

/* Main content area */
.main-content {
    flex: 1;
    padding: var(--space-md) var(--space-md);
    padding-bottom: calc(var(--bottom-nav-height) + var(--space-xl));
}

/* Bottom nav */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: var(--max-width);
    height: var(--bottom-nav-height);
    display: flex;
    align-items: center;
    justify-content: space-around;
    background: var(--accent-dim);
    border-top: none;
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: var(--space-sm) var(--space-sm);
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.65rem;
    font-weight: 500;
    transition: all var(--duration-normal) var(--ease-out);
    border-radius: var(--radius-md);
    position: relative;
}

.nav-item .nav-icon {
    font-size: 1.3rem;
    transition: transform var(--duration-normal) var(--ease-out);
}

.nav-item.active { color: #e8c97a; }
.nav-item.active .nav-icon { transform: scale(1.1); }
.nav-item:hover { color: rgba(255, 255, 255, 0.8); }

/* FAB add button */
.nav-item-add { position: relative; bottom: 10px; }

.nav-item-add .nav-icon {
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, #3a665a 0%, #2d5046 100%);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 300;
    color: var(--text-on-accent);
    box-shadow: 0 4px 16px rgba(45, 80, 70, 0.4), var(--shadow-md);
    transition: all var(--duration-normal) var(--ease-out);
}

.nav-item-add:hover .nav-icon {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(45, 80, 70, 0.5), var(--shadow-lg);
}

.nav-item-add span:not(.nav-icon) { display: none; }

/* ---------- View container ---------- */
.view { display: none; animation: fadeIn 0.3s var(--ease-out) both; }
.view.active { display: block; }

/* ---------- Feed ---------- */
.feed-header { margin-bottom: var(--space-sm); }
.feed-header h2 { margin-bottom: var(--space-xs); }

/* Feed tabs (Siste fangster / Min fangstdagbok) */
.feed-tabs {
    display: flex;
    gap: 0;
    margin-bottom: var(--space-sm);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1.5px solid var(--accent);
}

.feed-tab {
    flex: 1;
    padding: 10px 16px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent);
    background: transparent;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
    white-space: nowrap;
    text-align: center;
}

.feed-tab + .feed-tab {
    border-left: 1.5px solid var(--accent);
}

.feed-tab.active {
    background: var(--accent);
    color: var(--text-on-accent);
}

.feed-tab:hover:not(.active) {
    background: var(--accent-glow);
}

/* Filter chips */
.feed-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-bottom: var(--space-sm);
    margin-bottom: var(--space-md);
    max-width: 100%;
    overflow: hidden;
}

.feed-filters::-webkit-scrollbar { display: none; }

.filter-chip {
    flex-shrink: 0;
    padding: 5px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    background: var(--bg-glass);
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
    white-space: nowrap;
}

.filter-chip:hover { border-color: var(--accent); color: var(--text-secondary); }

.filter-chip.active {
    background: var(--accent-glow);
    border-color: var(--accent);
    color: var(--accent);
    font-weight: 600;
}

.filter-name-select {
    flex-shrink: 0;
    padding: 4px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    background: var(--bg-glass);
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cpath fill='%23888' d='M0 2l4 4 4-4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 20px;
}

.filter-name-select:focus {
    outline: none;
    border-color: var(--accent);
}

/* Sub-filter chips (Elv/Sjø under Mine) */
.feed-subfilters {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: var(--space-md);
    margin-top: -4px;
}

.subfilter-row {
    display: flex;
    gap: 6px;
    padding-left: 4px;
}

.subfilter-selects {
    display: flex;
    gap: 6px;
    padding-left: 4px;
    flex-wrap: wrap;
}

.subfilter-select {
    flex: 1;
    min-width: 0;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-glass);
    color: var(--text-primary);
    font-size: 0.72rem;
    font-family: var(--font-body);
    cursor: pointer;
    transition: border-color var(--duration-fast);
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23999'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 24px;
}

.subfilter-select:focus {
    outline: none;
    border-color: var(--accent);
}

.subfilter-chip {
    flex-shrink: 0;
    padding: 4px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    background: var(--bg-glass);
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
    white-space: nowrap;
}

.subfilter-chip:hover { border-color: var(--accent); color: var(--text-secondary); }

.subfilter-chip.active {
    background: var(--accent-glow);
    border-color: var(--accent);
    color: var(--accent);
    font-weight: 600;
}

/* ---- Feed Banner ---- */
.feed-banner {
    margin-bottom: 12px;
    border-radius: var(--radius-md);
    overflow: hidden;
    animation: fadeInUp 0.5s var(--ease-out) both;
}

.feed-banner img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
}

.feed-banner a { display: block; }

/* ---- Catch Card ---- */
.catch-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 12px;
    transition: all var(--duration-normal) var(--ease-out);
    animation: fadeInUp 0.5s var(--ease-out) both;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}

.catch-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

/* Card header */
.catch-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
}

.catch-card-avatar {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.catch-card-meta { flex: 1; min-width: 0; }
.catch-card-name { font-weight: 600; font-size: 0.82rem; line-height: 1.2; }
.catch-card-time { font-size: 0.68rem; color: var(--text-muted); line-height: 1.3; }

/* Card photo (prominent) */
.catch-card-photo-wrap {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    background: #ffffff;
}

.catch-card-image {
    display: block;
    max-width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    margin: 0 auto;
    background: #ffffff;
    transition: transform 0.5s var(--ease-out);
}

.catch-card-photo-wrap:hover .catch-card-image {
    transform: scale(1.02);
}

.catch-card-photo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-md);
    display: flex;
    align-items: flex-end;
}

.catch-card-species-tag {
    display: inline-flex;
    padding: 4px 12px;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
}

/* YouTube video embed */
.catch-card-video-wrap {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    background: #000;
    overflow: hidden;
}

.catch-card-video-wrap iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Species hero (no photo) */
.catch-card-species-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-xl) var(--space-md);
    background: linear-gradient(135deg, #f0ebe3, #e8e0d4);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.species-hero-emoji { font-size: 2rem; }

.species-hero-name {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.catch-card-species-inline {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 3px 10px;
    background: var(--accent-glow);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: var(--space-sm);
}

/* Stat pills (horizontal) */
.stat-pills {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    margin-bottom: var(--space-sm);
}

.stat-pill {
    display: flex;
    align-items: baseline;
    gap: 3px;
    padding: 6px 12px;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
}

.stat-pill-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-pill-unit {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.stat-pill-method .stat-pill-value {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Weather pill */
.stat-pill-weather {
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.2);
}

.stat-pill-weather .stat-pill-value {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--accent-gold);
}

/* Released / kept / PB badges */
.catch-card-badges {
    display: flex;
    gap: var(--space-xs);
    flex-wrap: wrap;
    margin-bottom: var(--space-sm);
}

.badge-released {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 10px;
    background: rgba(52, 211, 153, 0.12);
    border: 1px solid rgba(52, 211, 153, 0.25);
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--accent-green);
}

.badge-kept {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 10px;
    background: rgba(251, 146, 60, 0.12);
    border: 1px solid rgba(251, 146, 60, 0.25);
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--accent-orange);
}

.badge-pb {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 10px;
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent-gold);
    animation: pulse 2s ease-in-out infinite;
}

/* Bait info in cards */
.catch-card-bait {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: var(--space-xs);
}

/* Weather info row */
.catch-card-weather {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--border);
}

.catch-card-weather span { white-space: nowrap; }

/* Toggle group (form) */
.toggle-group {
    display: flex;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.toggle-btn {
    flex: 1;
    padding: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-glass);
    border: none;
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease-out);
}

.toggle-btn + .toggle-btn {
    border-left: 1px solid var(--border);
}

.toggle-btn.active {
    background: var(--accent-glow);
    color: var(--accent);
    font-weight: 600;
}
.catch-card-body { padding: 10px 12px; }

.catch-card-story {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.5;
    cursor: pointer;
}

.catch-card-location {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    margin-top: var(--space-md);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--border);
    font-size: 0.78rem;
    color: var(--text-muted);
}

.location-name { color: var(--text-secondary); }

.catch-card-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 6px 12px 10px;
    border-top: 1px solid var(--border);
}

.catch-action-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 6px 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-radius: var(--radius-full);
    transition: all var(--duration-fast) var(--ease-out);
}

.catch-action-btn:hover {
    background: var(--bg-glass);
    color: var(--text-secondary);
}

.catch-action-btn.liked { color: var(--accent-red); }

/* Water type badges */
.water-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.68rem;
    font-weight: 600;
    margin-left: auto;
}

.badge-river {
    background: rgba(34, 211, 238, 0.1);
    color: var(--accent);
    border: 1px solid rgba(34, 211, 238, 0.2);
}

.badge-sea {
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* ---- Catch Detail Modal ---- */
.detail-modal {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease-out);
}

.detail-modal.open {
    opacity: 1;
    pointer-events: all;
}

.detail-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
}

.detail-modal-content {
    position: relative;
    width: 100%;
    max-width: var(--max-width);
    max-height: 92dvh;
    background: var(--bg-primary);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.4s var(--ease-out);
}

.detail-modal.open .detail-modal-content {
    transform: translateY(0);
}

.detail-close-btn {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-full);
    color: white;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background var(--duration-fast);
}

.detail-close-btn:hover { background: rgba(0, 0, 0, 0.7); }

.detail-photo {
    display: block;
    max-width: 100%;
    height: auto;
    max-height: 65dvh;
    object-fit: contain;
    margin: 0 auto;
    background: #f5f0eb;
}

.detail-no-photo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-2xl);
    background: linear-gradient(135deg, #f0ebe3, #e8e0d4);
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent);
}

.detail-no-photo span { font-size: 2.5rem; }

.detail-body { padding: var(--space-lg); }

.detail-header-row {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.detail-species {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: var(--space-md);
}

.detail-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.detail-stat {
    padding: var(--space-md);
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-align: center;
}

.detail-stat-value {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.detail-stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 2px;
}

.detail-story {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
}

.detail-map-section {
    margin-bottom: var(--space-lg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
}

.detail-map {
    width: 100%;
    height: 180px;
}

.detail-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding-bottom: var(--space-md);
    margin-bottom: var(--space-md);
    border-bottom: 1px solid var(--border);
}

.edit-catch-btn {
    background: var(--accent-glow);
    border: 1px solid var(--border-accent);
    color: var(--accent) !important;
    font-weight: 600;
}

.edit-catch-btn:hover {
    background: var(--accent) !important;
    color: var(--text-on-accent) !important;
}

/* Comments */
.detail-comments-section { padding-bottom: var(--space-lg); }

.detail-comments-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
}

.detail-comment {
    display: flex;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
    align-items: flex-start;
}

.detail-comment-delete {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity var(--duration-fast), color var(--duration-fast);
    padding: 4px 6px;
    margin-top: 2px;
}

.detail-comment-delete:hover {
    opacity: 1;
    color: var(--accent-red, #e53e3e);
}

.detail-comment-avatar {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.detail-comment-body { flex: 1; }

.detail-comment-name {
    font-weight: 600;
    font-size: 0.8rem;
    margin-right: var(--space-xs);
}

.detail-comment-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.detail-comment-time {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.detail-comment-form {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.detail-comment-input {
    flex: 1;
    padding: 10px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-size: 0.85rem;
}

.detail-comment-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

.detail-comment-input::placeholder { color: var(--text-muted); }

.detail-comment-send {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dim));
    border-radius: var(--radius-full);
    color: var(--text-on-accent);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform var(--duration-fast);
}

.detail-comment-send:hover { transform: scale(1.05); }

/* ---------- Map View ---------- */
.map-container {
    width: 100%;
    height: calc(100dvh - var(--nav-height) - var(--bottom-nav-height) - var(--space-xl));
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
}

#map { width: 100%; height: 100%; }

/* Leaflet popup styling */
.leaflet-popup-content-wrapper {
    background: #ffffff !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius-md) !important;
    border: 1px solid var(--border) !important;
    box-shadow: var(--shadow-lg) !important;
}

.leaflet-popup-tip {
    background: #ffffff !important;
    border: 1px solid var(--border) !important;
}

.leaflet-popup-close-button { color: var(--text-muted) !important; }

.map-popup-img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-sm);
}

.map-popup-species { font-weight: 700; font-size: 0.95rem; margin-bottom: 2px; }
.map-popup-info { font-size: 0.8rem; color: var(--text-secondary); }

/* ---------- Catch Log Form ---------- */
.catch-form-page {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: var(--bg-secondary);
    overflow-y: auto;
    animation: slideUp 0.35s var(--ease-out) both;
}

.catch-form-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-sm) var(--space-md);
    height: var(--nav-height);
    background: var(--accent-dim);
    border-bottom: none;
}

.catch-form-header h3 { font-family: var(--font-heading); font-size: 1rem; color: #ffffff; }

.catch-form-header .btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    font-size: 0.8rem;
    padding: 6px 14px;
}

.catch-form-header .btn-primary {
    background: #e8c97a;
    color: #1e3a32;
    box-shadow: none;
}

.catch-form-content {
    padding: var(--space-lg);
    max-width: var(--max-width);
    margin: 0 auto;
    padding-bottom: var(--space-3xl);
}

.form-group { margin-bottom: var(--space-lg); }

.form-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: var(--space-sm);
}

.form-hint {
    font-size: 0.75rem;
    color: var(--accent);
    margin-top: 4px;
    cursor: pointer;
    padding: 4px 8px;
    background: rgba(30, 58, 50, 0.08);
    border-radius: var(--radius-sm);
    transition: background 0.2s;
    line-height: 1.3;
}
.form-hint:hover {
    background: rgba(30, 58, 50, 0.15);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all var(--duration-normal) var(--ease-out);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    background: var(--bg-input-focus);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-input::placeholder,
.form-textarea::placeholder { color: var(--text-muted); }

.form-textarea { min-height: 100px; resize: vertical; }

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%239a9490' viewBox='0 0 16 16'%3E%3Cpath d='M4.646 6.354l3 3a.5.5 0 00.708 0l3-3'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

.form-row { display: flex; gap: var(--space-md); }
.form-row .form-group { flex: 1; }

/* Photo upload */
.photo-upload-area {
    position: relative;
    width: 100%;
    aspect-ratio: 16/10;
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease-out);
    overflow: hidden;
}

.photo-upload-area:hover {
    border-color: var(--accent);
    background: var(--accent-glow);
}

.photo-upload-area.has-photo {
    border-style: solid;
    border-color: var(--border-accent);
    aspect-ratio: unset;
    min-height: 180px;
}

.photo-upload-icon { font-size: 2.5rem; color: var(--text-muted); }
.photo-upload-text { font-size: 0.85rem; color: var(--text-muted); }

.photo-upload-preview {
    display: block;
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: var(--radius-lg);
    background: #ffffff;
}

.photo-upload-remove {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    z-index: 2;
    transition: all var(--duration-fast);
}

.photo-upload-remove:hover { background: var(--accent-red); }

.photo-upload-adjust {
    position: absolute;
    bottom: var(--space-sm);
    right: var(--space-sm);
    padding: 6px 14px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: var(--radius-full);
    color: white;
    font-size: 0.75rem;
    font-weight: 500;
    z-index: 2;
    transition: all var(--duration-fast);
    cursor: pointer;
    backdrop-filter: blur(4px);
}

.photo-upload-adjust:hover { background: var(--accent); }

.photo-upload-analyse {
    position: absolute;
    bottom: var(--space-sm);
    left: var(--space-sm);
    padding: 6px 14px;
    background: linear-gradient(135deg, rgba(45, 80, 70, 0.85), rgba(30, 58, 50, 0.9));
    border-radius: var(--radius-full);
    color: #e8c97a;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
    transition: all var(--duration-fast);
    cursor: pointer;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(232, 201, 122, 0.3);
}

.photo-upload-analyse:hover {
    background: linear-gradient(135deg, var(--accent), var(--accent-dim));
    color: #fff;
    transform: scale(1.03);
}

/* ---------- AI Analysis Overlay ---------- */
.ai-analysis-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    border-radius: var(--radius-lg);
    z-index: 5;
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
}

.ai-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ai-spin 0.8s linear infinite;
}

@keyframes ai-spin {
    to { transform: rotate(360deg); }
}

/* ---------- Crop Modal ---------- */
.crop-modal {
    position: fixed;
    inset: 0;
    z-index: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s var(--ease-out);
}

.crop-modal.open { opacity: 1; }

.crop-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
}

.crop-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    max-height: 95dvh;
    transform: translateY(20px);
    transition: transform 0.3s var(--ease-out);
}

.crop-modal.open .crop-container {
    transform: translateY(0);
}

.crop-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    z-index: 2;
}

.crop-header h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
}

.crop-cancel-btn {
    padding: 8px 14px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 0.85rem;
    transition: background 0.2s;
}
.crop-cancel-btn:hover { background: rgba(255, 255, 255, 0.2); }

.crop-confirm-btn {
    padding: 8px 18px;
    border-radius: var(--radius-md);
    background: #e8c97a;
    color: #1e3a32;
    font-size: 0.85rem;
    font-weight: 700;
    transition: all 0.2s;
}
.crop-confirm-btn:hover { background: #f0d78a; transform: scale(1.03); }

.crop-viewport {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    flex: 1;
    min-height: 0;
}

.crop-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 2px solid rgba(255, 255, 255, 0.25);
    cursor: grab;
    touch-action: none;
    user-select: none;
    background: #ffffff;
}

.crop-frame:active { cursor: grabbing; }

.crop-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform-origin: 0 0;
    width: auto;
    height: auto;
    max-width: none;
    max-height: none;
    pointer-events: none;
    will-change: transform;
}

.crop-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    justify-content: center;
}

.crop-zoom-icon {
    font-size: 0.9rem;
    opacity: 0.6;
}

.crop-zoom-slider {
    flex: 1;
    max-width: 240px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    outline: none;
}

.crop-zoom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #e8c97a;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.crop-zoom-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #e8c97a;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* Map pin picker */
.map-picker-container {
    width: 100%;
    height: 200px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
    margin-top: var(--space-sm);
}

.map-picker-container #map-picker { width: 100%; height: 100%; }

.location-display {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.location-helper-btns {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
    flex-wrap: wrap;
}

.location-helper-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease-out);
    white-space: nowrap;
}

.location-helper-btn:hover {
    background: var(--accent-glow);
    border-color: var(--accent);
    color: var(--accent);
}

.location-helper-btn:active {
    transform: scale(0.97);
}

/* ---------- Suggestion Banner ---------- */
.suggestion-banner {
    margin: 16px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.08), rgba(241, 196, 15, 0.12));
    border: 1.5px solid rgba(243, 156, 18, 0.25);
    overflow: hidden;
    animation: suggestion-slide-in 0.4s ease-out;
}

@keyframes suggestion-slide-in {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
}

.suggestion-banner-header {
    padding: 16px 16px 12px;
}

.suggestion-banner-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px;
}

.suggestion-banner-subtitle {
    font-size: 0.8rem;
    color: var(--muted);
    margin: 0 0 12px;
    line-height: 1.4;
}

.suggestion-bulk-actions {
    display: flex;
    gap: 8px;
}

.btn-suggestion-accept-all,
.btn-suggestion-refuse-all {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-suggestion-accept-all {
    background: rgba(39, 174, 96, 0.15);
    color: #27ae60;
}
.btn-suggestion-accept-all:hover {
    background: rgba(39, 174, 96, 0.25);
}

.btn-suggestion-refuse-all {
    background: rgba(192, 57, 43, 0.1);
    color: #c0392b;
}
.btn-suggestion-refuse-all:hover {
    background: rgba(192, 57, 43, 0.2);
}

.suggestion-list {
    padding: 0 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 320px;
    overflow-y: auto;
}

.suggestion-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--card-bg);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    border: 1px solid var(--card-border);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.suggestion-card:hover {
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.suggestion-card-info {
    flex: 1;
    min-width: 0;
}

.suggestion-card-species {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.suggestion-card-details {
    display: flex;
    gap: 10px;
    font-size: 0.78rem;
    color: var(--muted);
    margin-top: 2px;
    flex-wrap: wrap;
}

.suggestion-card-date {
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 2px;
    opacity: 0.7;
}

.suggestion-card-actions {
    display: flex;
    gap: 4px;
    margin-left: 12px;
    flex-shrink: 0;
}

.btn-suggestion-accept,
.btn-suggestion-refuse {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    background: transparent;
}

.btn-suggestion-accept:hover {
    background: rgba(39, 174, 96, 0.15);
    transform: scale(1.12);
}

.btn-suggestion-refuse:hover {
    background: rgba(192, 57, 43, 0.12);
    transform: scale(1.12);
}

/* ---------- Profile ---------- */
.profile-header {
    text-align: center;
    padding: var(--space-xl) 0;
}

.profile-avatar {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--accent-dim), var(--accent-green));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-on-accent);
    margin: 0 auto var(--space-md);
    box-shadow: var(--shadow-glow);
}

.profile-name {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-bottom: var(--space-xs);
}

.profile-joined {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
    margin: var(--space-lg) 0;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-sm);
    text-align: center;
}

.stat-card-value {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--accent);
}

.stat-card-label {
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 2px;
}

/* ---------- Chart Sections (Profile) ---------- */
.chart-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
    animation: fadeInUp 0.5s var(--ease-out) both;
}

.chart-title {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

/* Time of day bar chart */
.time-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    height: 130px;
    gap: 4px;
    padding-top: var(--space-md);
}

.time-bar-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    height: 100%;
    justify-content: flex-end;
    gap: 4px;
}

.time-bar-count { font-size: 0.7rem; font-weight: 700; color: var(--text-muted); min-height: 16px; }
.time-bar-count.highlight { color: var(--accent); }

.time-bar-track { width: 100%; max-width: 28px; height: 70px; display: flex; align-items: flex-end; }

.time-bar-fill {
    width: 100%;
    background: linear-gradient(180deg, rgba(13, 148, 136, 0.3) 0%, rgba(13, 148, 136, 0.1) 100%);
    border-radius: 4px 4px 2px 2px;
    transition: height 0.6s var(--ease-out);
    min-height: 2px;
}

.time-bar-fill.highlight {
    background: linear-gradient(180deg, var(--accent) 0%, var(--accent-hover) 100%);
}

.time-bar-icon { font-size: 0.85rem; margin-top: 2px; }
.time-bar-label { font-size: 0.58rem; color: var(--text-muted); text-align: center; white-space: nowrap; }

/* Monthly chart */
.monthly-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 110px;
    gap: 2px;
    padding-top: var(--space-md);
}

.month-bar-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    height: 100%;
    justify-content: flex-end;
    gap: 4px;
}

.month-bar-count { font-size: 0.6rem; font-weight: 700; color: transparent; min-height: 12px; }
.month-bar-count.visible { color: var(--text-muted); }

.month-bar-track { width: 100%; max-width: 20px; height: 60px; display: flex; align-items: flex-end; }

.month-bar-fill {
    width: 100%;
    background: rgba(13, 148, 136, 0.15);
    border-radius: 3px 3px 1px 1px;
    transition: height 0.6s var(--ease-out);
    min-height: 2px;
}

.month-bar-fill.current {
    background: linear-gradient(180deg, var(--accent-green) 0%, rgba(22, 163, 74, 0.3) 100%);
}

.month-bar-label { font-size: 0.58rem; color: var(--text-muted); }
.month-bar-label.current { color: var(--accent-green); font-weight: 600; }

/* Water type breakdown */
.water-breakdown { display: flex; flex-direction: column; gap: var(--space-md); }

.water-bar {
    display: flex;
    height: 10px;
    border-radius: var(--radius-full);
    overflow: hidden;
    background: var(--bg-glass);
}

.water-bar-river {
    background: linear-gradient(90deg, var(--accent), var(--accent-dim));
    transition: width 0.8s var(--ease-out);
}

.water-bar-sea {
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    transition: width 0.8s var(--ease-out);
}

.water-legend { display: flex; justify-content: space-between; font-size: 0.78rem; color: var(--text-secondary); }
.water-legend-item { display: flex; align-items: center; gap: var(--space-xs); }
.water-legend-item strong { color: var(--text-primary); }

/* Group banner */
.group-banner {
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
}

.group-banner strong { color: var(--accent); }

/* Species list */
.species-list { display: flex; flex-direction: column; gap: 6px; }

.species-row {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: 10px 14px;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    animation: fadeInUp 0.4s var(--ease-out) both;
}

.species-rank { font-size: 0.72rem; font-weight: 700; color: var(--text-muted); min-width: 22px; }
.species-name { flex: 1; font-weight: 500; font-size: 0.9rem; }
.species-count { color: var(--accent); font-weight: 700; font-size: 0.88rem; }

/* ---------- Wall of Fame Podium ---------- */
.podium-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg) var(--space-md);
    margin-bottom: var(--space-md);
    animation: fadeInUp 0.5s var(--ease-out) both;
    overflow: hidden;
}

.podium-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--space-lg);
    color: var(--text-primary);
}

.podium-row {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 8px;
    padding: 0 4px;
}

.podium-card {
    flex: 1;
    max-width: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-radius: var(--radius-lg);
    padding: 12px 6px 14px;
    position: relative;
    transition: transform 0.3s var(--ease-out);
    background: var(--bg-glass);
    border: 1.5px solid var(--border);
}

.podium-card:hover { transform: translateY(-4px); }

.podium-card.gold {
    border-color: #d4a937;
    background: linear-gradient(180deg, rgba(212, 169, 55, 0.1) 0%, rgba(212, 169, 55, 0.03) 100%);
    box-shadow: 0 4px 20px rgba(212, 169, 55, 0.15);
    min-height: 210px;
    animation: fadeInUp 0.5s 0.1s var(--ease-out) both;
}

.podium-card.silver {
    border-color: #a8a8a8;
    background: linear-gradient(180deg, rgba(168, 168, 168, 0.08) 0%, rgba(168, 168, 168, 0.02) 100%);
    min-height: 185px;
    animation: fadeInUp 0.5s 0.2s var(--ease-out) both;
}

.podium-card.bronze {
    border-color: #cd7f32;
    background: linear-gradient(180deg, rgba(205, 127, 50, 0.08) 0%, rgba(205, 127, 50, 0.02) 100%);
    min-height: 170px;
    animation: fadeInUp 0.5s 0.3s var(--ease-out) both;
}

.podium-medal {
    font-size: 1.6rem;
    line-height: 1;
    margin-bottom: 6px;
}

.podium-card.gold .podium-medal { font-size: 2rem; }

.podium-photo {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    object-fit: cover;
    margin-bottom: 8px;
    border: 2px solid var(--border);
    background: var(--bg-glass);
}

.podium-card.gold .podium-photo {
    width: 68px;
    height: 68px;
    border-color: #d4a937;
}

.podium-no-photo {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    background: var(--bg-glass);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.podium-card.gold .podium-no-photo {
    width: 68px;
    height: 68px;
    border-color: #d4a937;
}

.podium-weight {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.podium-card.gold .podium-weight { font-size: 1.3rem; }

.podium-species {
    font-size: 0.72rem;
    color: var(--accent);
    font-weight: 600;
    margin-top: 2px;
}

.podium-meta {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 4px;
    line-height: 1.3;
}

.podium-angler {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ---------- Insights / Fun Facts ---------- */
.insights-card {
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.06) 0%, rgba(22, 163, 74, 0.04) 100%);
    border: 1.5px solid rgba(13, 148, 136, 0.2);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
    animation: fadeInUp 0.5s 0.15s var(--ease-out) both;
}

.insights-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: var(--space-md);
}

.insights-icon {
    font-size: 1.3rem;
    line-height: 1;
}

.insights-title {
    font-family: var(--font-heading);
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-primary);
}

.insights-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.insight-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    animation: fadeInUp 0.4s var(--ease-out) both;
}

.insight-emoji {
    font-size: 1.1rem;
    line-height: 1.4;
    flex-shrink: 0;
}

.insight-text {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.45;
}

.insight-text strong {
    color: var(--text-primary);
    font-weight: 700;
}

/* ---------- Empty states ---------- */
.empty-state {
    text-align: center;
    padding: var(--space-3xl) var(--space-lg);
}

.empty-state-icon { font-size: 3rem; margin-bottom: var(--space-md); opacity: 0.6; }
.empty-state-title { font-size: 1.1rem; font-weight: 600; margin-bottom: var(--space-sm); }

.empty-state-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    max-width: 280px;
    margin: 0 auto;
}

/* ---------- Animations ---------- */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

@keyframes slideDown {
    from { transform: translateY(0); }
    to { transform: translateY(100%); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }

/* ---------- Utility ---------- */
.hidden { display: none !important; }
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Responsive ---------- */
@media (min-width: 640px) {
    .app-container {
        border-left: 1px solid var(--border);
        border-right: 1px solid var(--border);
        background: var(--bg-primary);
    }
    .landing-logo { font-size: 4.5rem; }
}

/* ---------- Leaflet overrides ---------- */
.leaflet-control-zoom a {
    background: #ffffff !important;
    color: var(--text-primary) !important;
    border-color: var(--border) !important;
}

.leaflet-control-attribution {
    background: rgba(255, 255, 255, 0.85) !important;
    color: var(--text-muted) !important;
    font-size: 0.6rem !important;
}

.leaflet-control-attribution a { color: var(--text-muted) !important; }

/* Catch form animations */
.catch-form-page.closing {
    animation: slideDown 0.3s var(--ease-in-out) forwards;
}

/* ---------- Toast ---------- */
.toast {
    position: fixed;
    bottom: calc(var(--bottom-nav-height) + var(--space-md));
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: #1e293b;
    color: #ffffff;
    border: 1px solid transparent;
    border-radius: var(--radius-full);
    padding: 10px 24px;
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    z-index: 300;
    opacity: 0;
    transition: all 0.35s var(--ease-out);
    pointer-events: none;
    white-space: nowrap;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ============================================================
   FORECAST (Fiskeprognose)
   ============================================================ */

.forecast-header {
    margin-bottom: var(--space-lg);
}

.forecast-header h2 { margin-bottom: var(--space-xs); }

/* Score card */
.forecast-score-card {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
    animation: fadeInUp 0.5s var(--ease-out) both;
}

.forecast-score-ring {
    position: relative;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: conic-gradient(
        var(--score-color, var(--accent)) calc(var(--score, 0) * 3.6deg),
        #e2e8f0 calc(var(--score, 0) * 3.6deg)
    );
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.forecast-score-ring::before {
    content: '';
    position: absolute;
    inset: 6px;
    border-radius: 50%;
    background: #ffffff;
}

.forecast-score-value {
    position: relative;
    z-index: 1;
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1;
    color: var(--text-primary);
}

.forecast-score-label {
    position: relative;
    z-index: 1;
    font-size: 0.6rem;
    color: var(--text-muted);
}

.forecast-score-info { flex: 1; }

.forecast-score-status {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.forecast-score-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: var(--space-sm);
}

.forecast-score-factors {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    font-size: 0.72rem;
    color: var(--text-muted);
}

.forecast-score-factors span {
    padding: 2px 8px;
    background: var(--bg-glass);
    border-radius: var(--radius-full);
    white-space: nowrap;
}

/* Forecast card (generic container) */
.forecast-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
    animation: fadeInUp 0.5s var(--ease-out) both;
}

.forecast-card-title {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
}

/* Weather location search */
.weather-loc-card {
    padding-bottom: 12px;
    position: relative;
    z-index: 10;
}

.weather-loc-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.weather-loc-search-wrap {
    position: relative;
    flex: 1;
}

.weather-loc-input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 14px;
    font-size: 0.88rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-input);
    color: var(--text-primary);
    font-family: var(--font-body);
    transition: border-color var(--duration-fast) ease;
}

.weather-loc-input:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg-input-focus);
}

.weather-loc-input::placeholder {
    color: var(--text-muted);
}

.weather-loc-gps-btn {
    padding: 10px 14px;
    font-size: 1.1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-input);
    cursor: pointer;
    transition: all var(--duration-fast) ease;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.weather-loc-gps-btn:hover {
    border-color: var(--accent);
    background: var(--accent-glow);
}

.weather-loc-results {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    max-height: 240px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.wloc-result {
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.15s ease;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wloc-result:hover {
    background: var(--bg-glass-hover);
}

.wloc-result.no-match {
    cursor: default;
    color: var(--text-muted);
    font-style: italic;
}

.wloc-result.no-match:hover {
    background: transparent;
}

.wloc-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
}

.wloc-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* River selector chips */
.river-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.river-chip {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1.5px solid var(--border);
    background: var(--bg-card);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-body);
}

.river-chip:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.river-chip.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.river-chip.active:hover {
    background: var(--accent-dim);
    border-color: var(--accent-dim);
}

/* Best hours */
.best-hours-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.best-hour {
    display: grid;
    grid-template-columns: 28px 70px 44px 1fr 36px;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
}

.best-hour.best { font-weight: 600; }

.best-hour-icon { font-size: 1rem; text-align: center; }
.best-hour-name { font-size: 0.82rem; color: var(--text-secondary); }
.best-hour-time { font-size: 0.7rem; color: var(--text-muted); }

.best-hour-bar-track {
    height: 8px;
    background: var(--bg-glass);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.best-hour-bar-fill {
    height: 100%;
    background: rgba(13, 148, 136, 0.2);
    border-radius: var(--radius-full);
    transition: width 0.8s var(--ease-out);
}

.best-hour-bar-fill.highlight {
    background: linear-gradient(90deg, var(--accent), var(--accent-green));
}

.best-hour-pct {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-align: right;
}

.best-hour.best .best-hour-name { color: var(--accent); }
.best-hour.best .best-hour-pct { color: var(--accent); }

/* Water level chart */
.wl-current {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: var(--space-md);
}

.wl-current-value {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
}

.wl-current-unit {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.wl-current-trend {
    margin-left: auto;
    font-size: 0.82rem;
    color: var(--text-secondary);
    padding: 3px 10px;
    background: var(--bg-glass);
    border-radius: var(--radius-full);
}

.wl-chart {
    display: flex;
    align-items: flex-end;
    height: 80px;
    gap: 1px;
}

.wl-bar-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    height: 100%;
    justify-content: flex-end;
    gap: 2px;
}

.wl-bar-track {
    width: 100%;
    height: 60px;
    display: flex;
    align-items: flex-end;
}

.wl-bar-fill {
    width: 100%;
    background: rgba(13, 148, 136, 0.15);
    border-radius: 2px 2px 0 0;
    transition: height 0.4s var(--ease-out);
    min-height: 2px;
}

.wl-bar-fill.current {
    background: linear-gradient(180deg, var(--accent) 0%, var(--accent-hover) 100%);
}

.wl-bar-label {
    font-size: 0.52rem;
    color: var(--text-muted);
    min-height: 12px;
    text-align: center;
}

.wl-station { margin-top: 8px; }
.wl-station:first-child { margin-top: 0; }
.wl-station-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.wl-station-val {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 0.72rem;
}

/* Weather forecast strip */
.weather-forecast-grid {
    display: flex;
    gap: 4px;
}

.weather-day {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 4px;
    border-radius: var(--radius-md);
    transition: background var(--duration-fast);
}

.weather-day.today {
    background: var(--accent-glow);
    border: 1px solid var(--border-accent);
}

.weather-day-name {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.weather-day.today .weather-day-name { color: var(--accent); }

.weather-day-icon { font-size: 1.4rem; }

.weather-day-temp {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
}

.weather-day-wind {
    font-size: 0.65rem;
    color: var(--text-muted);
}

/* Moon display */
.moon-display {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.moon-icon { font-size: 3rem; }

.moon-info { flex: 1; }

.moon-name {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.moon-score {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
}

/* ============================================================
   LEADERBOARD
   ============================================================ */

.lb-category {
    margin-bottom: var(--space-lg);
}

.lb-category:last-child { margin-bottom: 0; }

.lb-category-title {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: var(--space-sm);
    padding-bottom: var(--space-xs);
    border-bottom: 1px solid var(--border);
}

.lb-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 8px 10px;
    border-radius: var(--radius-md);
    transition: background var(--duration-fast);
}

.lb-row:hover { background: var(--bg-glass); }

.lb-row.lb-me {
    background: var(--accent-glow);
    border: 1px solid var(--border-accent);
}

.lb-rank {
    font-size: 1.1rem;
    min-width: 28px;
    text-align: center;
}

.lb-avatar-sm {
    width: 26px;
    height: 26px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.lb-name {
    flex: 1;
    font-size: 0.85rem;
    font-weight: 500;
}

.lb-me .lb-name {
    color: var(--accent);
    font-weight: 600;
}

.lb-value {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent);
}

/* ============================================================
   PROFILE — "You" Page (v2)
   ============================================================ */

/* Hero header */
.profile-hero {
    position: relative;
    padding: 40px 20px 24px;
    text-align: center;
    overflow: hidden;
    margin: -16px -16px 0;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

.profile-hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #0d9488 0%, #14b8a6 40%, #5eead4 100%);
    opacity: 0.12;
}

.profile-hero-content {
    position: relative;
    z-index: 1;
}

.profile-avatar-lg {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    margin: 0 auto 12px;
    box-shadow: 0 4px 16px rgba(13, 148, 136, 0.25);
    border: 3px solid white;
}

.profile-name-lg {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.profile-joined-lg {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Stats row */
.profile-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    padding: 16px;
    margin: 16px 0;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.profile-stat-item {
    text-align: center;
    padding: 8px 4px;
}

.profile-stat-item:not(:last-child) {
    border-right: 1px solid var(--border);
}

.profile-stat-value {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.profile-stat-value small {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-left: 1px;
}

.profile-stat-label {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* Group banner */
.group-banner {
    padding: 10px 16px;
    background: var(--accent-glow);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 16px;
}

.group-banner strong {
    color: var(--accent);
    font-weight: 700;
}

/* Tab bar */
.profile-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--bg-input);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.profile-tab {
    flex: 1;
    padding: 10px 8px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
}

.profile-tab:hover {
    color: var(--text-primary);
    background: var(--bg-glass-hover);
}

.profile-tab.active {
    background: var(--bg-card);
    color: var(--accent);
    box-shadow: var(--shadow-sm);
}

/* ---- Personal Bests Grid ---- */
.pb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.pb-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast);
}

.pb-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.pb-card-photo {
    width: 100%;
    height: 100px;
    object-fit: cover;
    display: block;
}

.pb-card-no-photo {
    width: 100%;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: var(--bg-input);
}

.pb-card-body {
    padding: 10px;
}

.pb-card-species {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.pb-card-stats {
    display: flex;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--accent);
    font-weight: 600;
}

.pb-card-location {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ---- Recent Catches Grid ---- */
.recent-catches-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.recent-catch-card {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
}

.recent-catch-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.recent-catch-no-photo {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    background: var(--bg-input);
}

.recent-catch-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 4px 6px;
    background: linear-gradient(transparent, rgba(0,0,0,0.6));
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.recent-catch-species {
    font-size: 0.65rem;
    font-weight: 600;
    color: white;
}

.recent-catch-weight {
    font-size: 0.65rem;
    font-weight: 700;
    color: #5eead4;
}

/* ---- Method Breakdown ---- */
.method-breakdown {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.method-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.method-label {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-primary);
    min-width: 100px;
    flex-shrink: 0;
}

.method-bar-track {
    flex: 1;
    height: 8px;
    background: var(--bg-input);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.method-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
    border-radius: var(--radius-full);
    transition: width 0.6s var(--ease-out);
}

.method-count {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--accent);
    min-width: 24px;
    text-align: right;
}

/* ---- Bait Ranking ---- */
.bait-ranking {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bait-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.bait-rank {
    font-size: 1rem;
    min-width: 24px;
    text-align: center;
}

.bait-name {
    flex: 1;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
}

.bait-stats {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
}

/* ---- Empty state mini ---- */
.empty-state-mini {
    text-align: center;
    padding: 24px 16px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ============================================================
   BITETIME — Hourly Activity Chart
   ============================================================ */

.bitetime-card {
    overflow: visible;
}

.bitetime-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.bitetime-header .forecast-card-title {
    margin-bottom: 0;
}

.bitetime-now {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.bitetime-now strong {
    font-weight: 700;
}

.bitetime-peak {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    padding: 6px 10px;
    background: var(--accent-glow);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-accent);
}

.bitetime-peak strong {
    color: var(--accent);
}

.bitetime-chart {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 120px;
    padding-bottom: 20px;
    position: relative;
}

.bt-bar-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    position: relative;
}

.bt-bar-group.bt-current {
    position: relative;
}

.bt-bar-group.bt-current::before {
    content: '▼';
    position: absolute;
    top: -14px;
    font-size: 0.55rem;
    color: var(--accent);
    z-index: 1;
}

.bt-bar-track {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: flex-end;
    border-radius: 2px 2px 0 0;
    overflow: hidden;
}

.bt-bar-fill {
    width: 100%;
    border-radius: 2px 2px 0 0;
    transition: height 0.6s var(--ease-out);
    min-height: 2px;
}

.bt-bar-label {
    font-size: 0.55rem;
    color: var(--text-muted);
    margin-top: 4px;
    position: absolute;
    bottom: -16px;
    visibility: hidden;
}

.bt-bar-label.visible {
    visibility: visible;
}

.bt-current .bt-bar-label {
    visibility: visible;
    color: var(--accent);
    font-weight: 700;
}

.bitetime-legend {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.bt-legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.bt-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    display: inline-block;
}

/* ============================================================
   LAKSEBØRS — Rivers & Catch Exchange
   ============================================================ */

/* Header */
.rivers-header {
    margin-bottom: var(--space-md);
}

.rivers-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-md);
}

.rivers-header h2 { margin-bottom: var(--space-xs); }

.import-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: linear-gradient(135deg, rgba(45, 80, 70, 0.1), rgba(45, 80, 70, 0.05));
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-md);
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease-out);
}

.import-btn:hover {
    background: var(--accent-glow);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* Search */
.rivers-search-wrap {
    position: relative;
}

.rivers-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    pointer-events: none;
    z-index: 1;
}

.rivers-search {
    width: 100%;
    padding: 12px 16px 12px 40px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all var(--duration-normal) var(--ease-out);
}

.rivers-search:focus {
    background: var(--bg-input-focus);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.rivers-search::placeholder { color: var(--text-muted); }

/* Info banner */
.rivers-info-banner {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 10px 14px;
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: var(--radius-md);
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    line-height: 1.4;
}

.rivers-info-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

/* River cards grid */
.rivers-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.river-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease-out);
    animation: fadeInUp 0.4s var(--ease-out) both;
    box-shadow: var(--shadow-sm);
}

.river-card:hover {
    border-color: var(--border-accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.river-card-header {
    margin-bottom: 10px;
}

.river-card-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.river-card-name {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}

.river-fav-btn {
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 2px 4px;
    line-height: 1;
    color: var(--text-muted);
    transition: transform 0.2s;
}
.river-fav-btn:hover { transform: scale(1.2); }
.river-fav-btn.active { color: #f5a623; }

.river-card-fav {
    border-color: rgba(245, 166, 35, 0.4);
    box-shadow: 0 0 0 1px rgba(245, 166, 35, 0.2), var(--shadow-sm);
}

.river-card-region {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Season badge */
.river-card-season-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.68rem;
    font-weight: 600;
    white-space: nowrap;
}

.river-card-season-badge.in-season {
    background: rgba(52, 211, 153, 0.12);
    border: 1px solid rgba(52, 211, 153, 0.25);
    color: var(--accent-green);
}

.river-card-season-badge.off-season {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--accent-red);
}

/* Stats row in card */
.river-card-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    margin-bottom: 10px;
}

.river-stat {
    text-align: center;
    padding: 8px 4px;
    background: var(--bg-glass);
    border-radius: var(--radius-sm);
}

.river-stat-value {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-primary);
    display: block;
    line-height: 1.2;
}

.river-stat-value small {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--text-muted);
}

.river-stat-label {
    font-size: 0.6rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-top: 2px;
}

/* Species tags */
.river-card-species {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.river-species-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 8px;
    background: var(--accent-glow);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-full);
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--accent);
}

/* Card footer */
.river-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

.river-card-source {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.river-card-arrow {
    font-size: 1rem;
    color: var(--accent);
    font-weight: 600;
    transition: transform var(--duration-fast);
}

.river-card:hover .river-card-arrow {
    transform: translateX(3px);
}

/* ---- River Detail ---- */
.river-detail {
    animation: fadeIn 0.3s var(--ease-out) both;
}

.river-detail-back {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
    margin-bottom: var(--space-md);
}

.river-detail-back:hover {
    background: var(--bg-glass-hover);
    color: var(--text-primary);
}

.river-detail-hero {
    display: flex;
    flex-direction: column;
    margin-bottom: var(--space-md);
}

.river-detail-name {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.river-detail-region {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.river-detail-desc {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
}

/* Detail stats */
.river-detail-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.river-detail-stat {
    text-align: center;
    padding: var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.river-detail-stat-val {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
}

.river-detail-stat-lbl {
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-top: 2px;
}

/* Info cards */
.river-info-cards {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.river-info-card {
    padding: var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.river-info-card h4 {
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.river-info-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Recent catches table */
.river-catches-section {
    margin-top: var(--space-lg);
}

.river-catches-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
}

.river-catches-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.river-catch-row {
    padding: 10px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: background var(--duration-fast);
}

.river-catch-row:hover {
    background: var(--bg-glass);
}

.river-catch-main {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: 4px;
}

.river-catch-species {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--accent);
}

.river-catch-weight {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.9rem;
}

.river-catch-length {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.river-catch-meta {
    display: flex;
    gap: 4px;
    font-size: 0.72rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.river-catch-time {
    margin-left: auto;
}

/* Add catch from river button */
.river-add-btn {
    width: 100%;
}

/* External links */
.river-detail-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: var(--space-lg);
    padding-bottom: var(--space-xl);
}

.river-ext-link {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 12px 16px;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all var(--duration-fast) var(--ease-out);
    text-decoration: none;
}

.river-ext-link:hover {
    background: var(--accent-glow);
    border-color: var(--border-accent);
    transform: translateY(-1px);
}

/* ---- Angler Search ---- */
.angler-search-container {
    position: relative;
    flex: 1;
    min-width: 140px;
}

.angler-search-input {
    width: 100%;
    box-sizing: border-box;
    padding-right: 30px !important;
}

.angler-clear-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    z-index: 2;
}

.angler-clear-btn:hover {
    color: var(--accent-red);
}

.angler-search-results {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.angler-result-item {
    padding: 8px 12px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s ease;
    color: var(--text-primary);
}

.angler-result-item:hover {
    background: var(--bg-glass-hover);
}

.angler-result-item.no-match {
    cursor: default;
    color: var(--text-muted);
    font-style: italic;
}

.angler-result-item.no-match:hover {
    background: transparent;
}

/* ---- Import Page ---- */
.import-page {
    animation: fadeIn 0.3s var(--ease-out) both;
}

.import-header {
    margin-bottom: var(--space-lg);
}

.import-header h2 {
    margin-top: var(--space-sm);
}

.import-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: var(--space-lg);
}

.eg-personal-toggle {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    margin-bottom: 12px;
    background: var(--bg-elevated, rgba(45,80,70,0.06));
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: border-color var(--duration-fast);
}

.eg-personal-toggle:hover {
    border-color: var(--accent);
}

.eg-personal-toggle input[type="checkbox"] {
    accent-color: var(--accent);
    width: 16px;
    height: 16px;
}

.eg-personal-hint {
    width: 100%;
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-left: 24px;
    margin-top: -4px;
}

/* Source cards */
.import-sources {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: var(--space-xl);
}

.import-source-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease-out);
    text-align: center;
}

.import-source-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.import-source-icon {
    font-size: 1.8rem;
}

.import-source-card h4 {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
}

.import-source-card p {
    font-size: 0.65rem;
    color: var(--text-muted);
    line-height: 1.3;
}

/* Paste section */
.import-paste-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.import-paste-section h4 {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.import-textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.82rem;
    font-family: 'SF Mono', 'Fira Code', monospace;
    line-height: 1.6;
    resize: vertical;
    transition: all var(--duration-normal) var(--ease-out);
}

.import-textarea:focus {
    background: var(--bg-input-focus);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.import-textarea::placeholder {
    color: var(--text-muted);
    font-family: var(--font-body);
}

.import-actions {
    display: flex;
    gap: var(--space-sm);
    justify-content: flex-end;
    margin-top: var(--space-md);
}

/* Preview */
.import-preview {
    margin-top: var(--space-md);
}

.import-preview-header {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent-green);
    margin-bottom: var(--space-sm);
    padding: 6px 10px;
    background: rgba(52, 211, 153, 0.08);
    border-radius: var(--radius-sm);
}

.import-preview-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.import-preview-row {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
    padding: 6px 10px;
    background: var(--bg-glass);
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.import-preview-species {
    font-weight: 700;
    color: var(--accent);
}

/* Quick add section */
.import-quick-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.import-quick-section h4 {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 4px;
}

/* ---- Import Tabs ---- */
.import-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 4px;
    margin-bottom: var(--space-lg);
}

.import-tab {
    flex: 1;
    padding: 10px 8px;
    border: none;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.import-tab.active {
    background: var(--accent);
    color: white;
    font-weight: 600;
}

.import-tab:hover:not(.active) {
    background: rgba(0, 0, 0, 0.05);
}

.import-tab-content {
    display: none;
}

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

/* ---- Elveguiden Search Form ---- */
.eg-search-form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
}

.eg-fisher-search {
    position: relative;
}

.eg-fisher-suggestions {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 100;
    max-height: 200px;
    overflow-y: auto;
}

.eg-suggestion-item {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.15s;
}

.eg-suggestion-item:hover {
    background: rgba(45, 122, 79, 0.1);
}

.eg-suggestion-item[data-name] {
    font-weight: 500;
}

/* ---- Elveguiden Results ---- */
.eg-results {
    margin-top: var(--space-sm);
}

.eg-no-results {
    text-align: center;
    padding: var(--space-xl);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.eg-no-results p:first-child {
    font-size: 1rem;
    margin-bottom: 4px;
}

.eg-results-header {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-md) var(--space-lg);
    margin-bottom: var(--space-sm);
}

.eg-results-stats {
    display: flex;
    gap: var(--space-lg);
    margin-bottom: 4px;
}

.eg-stat {
    font-size: 0.85rem;
    color: var(--text-primary);
}

.eg-stat strong {
    color: var(--accent);
    font-weight: 700;
}

.eg-catches-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: var(--space-md);
    max-height: 400px;
    overflow-y: auto;
}

.eg-catch-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    transition: border-color 0.15s;
}

.eg-catch-row:hover {
    border-color: var(--accent);
}

.eg-catch-check {
    flex-shrink: 0;
}

.eg-catch-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    cursor: pointer;
}

.eg-catch-info {
    flex: 1;
    min-width: 0;
}

.eg-catch-main {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: 2px;
}

.eg-catch-species {
    font-weight: 600;
    color: var(--accent);
    font-size: 0.85rem;
}

.eg-catch-weight {
    font-weight: 700;
    font-size: 0.9rem;
}

.eg-catch-length {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.eg-catch-details {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.eg-catch-photo {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
}

.eg-import-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 12px var(--space-lg);
}

.eg-select-all {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    color: var(--text-secondary);
}

.eg-select-all input {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
}

#eg-import-btn {
    white-space: nowrap;
}

.profile-data-section {
    margin-top: 40px;
    padding: 20px;
    padding-bottom: 32px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-top: 1px solid var(--border);
}

/* ═══════ Admin Panel ═══════ */
.admin-user-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-user-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    background: var(--bg-input);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.admin-user-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
    overflow: hidden;
}

.admin-user-details {
    flex: 1;
    min-width: 0;
}

.admin-user-name {
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.3;
}

.admin-user-email {
    font-size: 0.8rem;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-user-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.admin-user-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

.admin-user-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.admin-user-bottom .elveguiden-name-input {
    flex: 1;
    min-width: 0;
    max-width: 180px;
    font-size: 0.78rem;
    padding: 4px 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-card);
    color: var(--text-primary);
}

.admin-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    transition: all 0.2s ease;
    user-select: none;
}

.admin-chip input[type="checkbox"] {
    display: none;
}

.admin-chip.active {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.admin-chip:hover {
    border-color: var(--accent);
}

/* ═══════════════════════════════════════
   Season Overview Card (Elveguiden-style)
   ═══════════════════════════════════════ */
.season-overview {
    background: linear-gradient(135deg, #1b4332 0%, #2d6a4f 100%);
    border-radius: 16px;
    padding: 24px 20px;
    margin-bottom: 16px;
    color: white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.season-header {
    margin-bottom: 16px;
}

.season-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    color: rgba(255,255,255,0.95);
    letter-spacing: 0.3px;
}

.season-stats-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.season-stat {
    flex: 1;
    text-align: center;
}

.season-stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.1;
    color: white;
}

.season-stat-value small {
    font-size: 0.65em;
    font-weight: 600;
    opacity: 0.8;
}

.season-stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    opacity: 0.7;
    margin-top: 4px;
    font-weight: 600;
}

/* SVG Area Chart */
.season-chart-wrap {
    position: relative;
    margin-bottom: 16px;
    background: rgba(0,0,0,0.18);
    border-radius: 12px;
    padding: 12px 12px 4px;
}

.season-chart-svg {
    width: 100%;
    height: 140px;
    display: block;
}

.season-chart-svg line {
    stroke: rgba(255,255,255,0.15);
}

.season-chart-svg path[fill="url(#season-gradient)"] {
    opacity: 0.8;
}

.season-chart-svg path[fill="none"] {
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}

.season-chart-svg circle {
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
}

.season-chart-label {
    font-size: 9px;
    fill: rgba(255,255,255,0.55);
    font-weight: 600;
    font-family: inherit;
}

/* Override accent color for SVG inside dark card */
.season-overview {
    --accent: #8fce6a;
}

.season-chart-peak {
    text-align: center;
    margin-top: 8px;
}

.season-peak-badge {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    backdrop-filter: blur(4px);
}

/* Details row */
.season-details-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.season-detail {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.85);
}

.season-detail-icon {
    font-size: 1rem;
}

.season-detail-text strong {
    color: white;
}

/* River breakdown */
.season-rivers {
    border-top: 1px solid rgba(255,255,255,0.15);
    padding-top: 14px;
}

.season-rivers-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: rgba(255,255,255,0.8);
    margin: 0 0 10px;
}

.season-river-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.season-river-name {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.8);
    min-width: 80px;
    flex-shrink: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.season-river-bar-track {
    flex: 1;
    height: 8px;
    background: rgba(255,255,255,0.12);
    border-radius: 4px;
    overflow: hidden;
}

.season-river-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #a8d98a, #7bc47b);
    border-radius: 4px;
    transition: width 0.6s ease;
}

.season-river-count {
    font-size: 0.78rem;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
    min-width: 24px;
    text-align: right;
}

/* ============================================================
   Stats Dashboard
   ============================================================ */

/* Stats chip accent */
.filter-chip-stats {
    background: rgba(45, 80, 70, 0.06);
    border-color: rgba(45, 80, 70, 0.18);
    color: var(--accent);
}

.filter-chip-stats.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--text-on-accent);
}

.stats-dashboard {
    animation: fadeInUp 0.4s var(--ease-out) both;
}

.stats-header {
    margin-bottom: var(--space-md);
}

.stats-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.stats-subtitle {
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* Filter dropdowns */
.stats-filters {
    margin-bottom: var(--space-lg);
}

.stats-filter-group {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.stats-filter-select {
    flex: 1;
    min-width: 110px;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
    appearance: none;
    -webkit-appearance: none;
    background-image: 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='%236b6560' d='M3 5l3 3 3-3'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.stats-filter-select:hover {
    border-color: var(--accent);
}

.stats-filter-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(45, 80, 70, 0.08);
}

/* Stats grid */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.stats-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    text-align: center;
    transition: all var(--duration-normal) var(--ease-out);
    animation: fadeInUp 0.4s var(--ease-out) both;
}

.stats-card:nth-child(1) { animation-delay: 0.05s; }
.stats-card:nth-child(2) { animation-delay: 0.10s; }
.stats-card:nth-child(3) { animation-delay: 0.15s; }
.stats-card:nth-child(4) { animation-delay: 0.20s; }
.stats-card:nth-child(5) { animation-delay: 0.25s; }
.stats-card:nth-child(6) { animation-delay: 0.30s; }

.stats-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.stats-card-label {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: var(--space-xs);
}

.stats-card-value {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1.1;
}

.stats-card-value small {
    font-size: 0.55em;
    font-weight: 500;
    color: var(--text-muted);
    margin-left: 2px;
}

.stats-card-sub {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Per-species breakdown */
.stats-breakdown {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    animation: fadeInUp 0.4s 0.35s var(--ease-out) both;
}

.stats-breakdown-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.stats-breakdown-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.stats-breakdown-row {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: var(--space-sm);
    align-items: center;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.8rem;
}

.stats-breakdown-row:last-child {
    border-bottom: none;
}

.stats-breakdown-name {
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stats-breakdown-count {
    color: var(--accent);
    font-weight: 700;
    white-space: nowrap;
}

.stats-breakdown-weight,
.stats-breakdown-max {
    color: var(--text-muted);
    font-size: 0.72rem;
    white-space: nowrap;
}

/* Empty state */
.stats-empty {
    text-align: center;
    padding: var(--space-2xl) var(--space-md);
    animation: fadeInUp 0.4s var(--ease-out) both;
}

.stats-empty-icon {
    font-size: 3rem;
    margin-bottom: var(--space-md);
    opacity: 0.7;
}

.stats-empty p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
}

/* Catch log (diary entries) */
.stats-catch-log {
    margin-top: var(--space-lg);
    animation: fadeInUp 0.5s var(--ease-out) both;
    animation-delay: 0.3s;
}

.stats-catch-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stats-catch-entry {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    transition: transform var(--duration-fast) var(--ease-out);
}

.stats-catch-entry:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.stats-catch-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 70px;
    padding: 4px 0;
    flex-shrink: 0;
}

.catch-date-day {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.catch-date-time {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.stats-catch-details {
    flex: 1;
    min-width: 0;
}

.stats-catch-species {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.stats-catch-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 3px;
}

.stats-catch-meta span {
    font-size: 0.72rem;
    color: var(--text-secondary);
    background: var(--bg-chip);
    padding: 1px 8px;
    border-radius: 20px;
    white-space: nowrap;
}

.stats-catch-location {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.stats-catch-bait {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 1px;
}

.stats-catch-status {
    flex-shrink: 0;
    align-self: center;
}

.catch-released {
    font-size: 0.68rem;
    color: var(--accent);
    font-weight: 600;
    white-space: nowrap;
}

.catch-kept {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-weight: 600;
    white-space: nowrap;
}

.stats-catch-story {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 2px;
}

.catch-source-badge {
    font-size: 0.6rem;
    color: var(--accent);
    background: var(--accent-glow);
    padding: 1px 6px;
    border-radius: 8px;
    margin-top: 4px;
    text-align: center;
    font-weight: 600;
}

/* === Feed card Elveguiden source badge === */
.catch-card-source-badge {
    font-size: 0.75rem;
    color: var(--accent);
    background: var(--accent-glow);
    padding: 6px 12px;
    border-radius: 8px;
    margin-top: 8px;
    text-align: center;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* === Elveguiden badge in modal === */
.badge-elveguiden {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-glow);
    padding: 3px 10px;
    border-radius: 12px;
}

/* === Detail info table (Elveguiden-style) === */
.detail-info-table {
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
}

.detail-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

.detail-info-row:last-child {
    border-bottom: none;
}

.detail-info-row:nth-child(even) {
    background: rgba(0, 0, 0, 0.015);
}

.detail-info-label {
    font-size: 0.88rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.detail-info-value {
    font-size: 0.88rem;
    color: var(--text-primary);
    font-weight: 600;
    text-align: right;
}

/* === Stats Bar Charts (Elveguiden-style) === */
.chart-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 20px 0;
}

.chart-card {
    border-radius: 16px;
    padding: 20px;
    min-height: 200px;
}

.chart-green {
    background: linear-gradient(135deg, #8bc34a 0%, #689f38 100%);
}

.chart-mint {
    background: linear-gradient(135deg, #80e8c0 0%, #4dd0a0 100%);
}

.chart-salmon {
    background: linear-gradient(135deg, #ef9a9a 0%, #e57373 100%);
}

.chart-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1a3a1a;
    margin: 0 0 16px 0;
    letter-spacing: 0.02em;
}

.chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 120px;
}

.chart-bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.chart-bar-value {
    font-size: 0.65rem;
    font-weight: 700;
    color: #1a3a1a;
    opacity: 0.8;
}

.chart-bar-track {
    width: 100%;
    max-width: 36px;
    height: 80px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.chart-bar-fill {
    width: 100%;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 4px 4px 0 0;
    min-height: 2px;
    transition: height 0.5s ease;
}

.chart-bar-label {
    font-size: 0.55rem;
    font-weight: 600;
    color: #1a3a1a;
    opacity: 0.7;
    text-align: center;
    word-break: break-all;
    line-height: 1.1;
    max-width: 100%;
}

/* --- Chatbot widget — push above bottom nav --- */
#chatbase-bubble-button,
iframe[id*="chatbase"],
div[id*="chatbase-bubble"] {
    bottom: calc(var(--bottom-nav-height) + 16px) !important;
}

/* Chatbot chat window — fit within viewport */
iframe[id*="chatbase-bubble-window"] {
    max-height: calc(100dvh - var(--bottom-nav-height) - 100px) !important;
}

/* ---------- River Detail Filters ---------- */
.river-detail-filters {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin: 12px 0 16px;
    padding: 12px;
    background: rgba(30, 58, 50, 0.04);
    border-radius: var(--radius-md);
    border: 1px solid rgba(30, 58, 50, 0.08);
}

.river-filter-select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid rgba(30, 58, 50, 0.15);
    border-radius: var(--radius-sm);
    background: #ffffff;
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color 0.2s;
    -webkit-appearance: none;
    appearance: none;
    background-image: 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='%2364748b' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 24px;
}

.river-filter-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

.river-filter-count {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 0.75rem;
    color: var(--muted);
    padding-top: 4px;
}

@media (min-width: 500px) {
    .river-detail-filters {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ---- Chatbase widget positioning ----
   Move the trigger button above Reely's bottom nav,
   and constrain the chat window so it doesn't cover the button.
   Only target the top-level bubble elements, not internal children. */

/* The floating bubble trigger button */
#chatbase-bubble-button {
    bottom: 80px !important;
}

/* The chat window panel — sits above the bubble button */
#chatbase-bubble-window {
    bottom: 150px !important;
    max-height: calc(100vh - 220px) !important;
    max-height: calc(100dvh - 220px) !important;
}

/* ============================================================
   Reely AI Chat
   ============================================================ */

/* FAB button — floating chat button (yellow speech bubble) */
#reely-chat-fab {
    position: fixed;
    bottom: 80px;
    right: 18px;
    z-index: 90;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #f5c842, #e8a817);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(232, 168, 23, 0.45), 0 0 0 0 rgba(245, 200, 66, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    -webkit-tap-highlight-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: chatFabPulse 3s ease-in-out infinite;
}
@keyframes chatFabPulse {
    0%, 100% { box-shadow: 0 4px 18px rgba(232, 168, 23, 0.45), 0 0 0 0 rgba(245, 200, 66, 0.4); }
    50% { box-shadow: 0 4px 18px rgba(232, 168, 23, 0.45), 0 0 0 10px rgba(245, 200, 66, 0); }
}
#reely-chat-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(232, 168, 23, 0.55);
    animation: none;
}
#reely-chat-fab:active {
    transform: scale(0.93);
}

/* Full-page chat overlay */
#reely-chat-page {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    animation: chatSlideUp 0.3s ease-out;
}
#reely-chat-page.closing {
    animation: chatSlideDown 0.25s ease-in forwards;
}

@keyframes chatSlideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
@keyframes chatSlideDown {
    from { transform: translateY(0); opacity: 1; }
    to { transform: translateY(100%); opacity: 0; }
}

/* Header */
.chat-page-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dim));
    color: #fff;
    flex-shrink: 0;
    padding-top: max(12px, env(safe-area-inset-top));
}
.chat-back-btn {
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}
.chat-back-btn:hover { background: rgba(255,255,255,0.25); }

.chat-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}
.chat-header-icon {
    font-size: 1.5rem;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
}
.chat-header-name {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 700;
}
.chat-header-sub {
    font-size: 0.72rem;
    opacity: 0.7;
}
.chat-clear-btn {
    background: rgba(255,255,255,0.12);
    border: none;
    color: #fff;
    font-size: 1rem;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}
.chat-clear-btn:hover { background: rgba(255,255,255,0.25); }

/* Messages area */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    -webkit-overflow-scrolling: touch;
}

/* Message bubbles */
.chat-bubble {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.9rem;
    line-height: 1.5;
    animation: bubblePop 0.2s ease-out;
    word-wrap: break-word;
}
@keyframes bubblePop {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.chat-bubble-user {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--accent), var(--accent-dim));
    color: #fff;
    border-bottom-right-radius: 6px;
}
.chat-bubble-ai {
    align-self: flex-start;
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-bottom-left-radius: 6px;
    box-shadow: var(--shadow-sm);
}

/* Typing indicator */
.chat-typing {
    display: flex;
    gap: 5px;
    align-items: center;
    padding: 14px 20px;
}
.typing-dot {
    width: 8px;
    height: 8px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: typingBounce 1.2s infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-6px); opacity: 1; }
}

/* Input bar */
.chat-input-bar {
    display: flex;
    gap: 10px;
    padding: 12px 16px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}
.chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 24px;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    background: var(--bg-input);
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s;
}
.chat-input:focus {
    border-color: var(--accent);
}
.chat-input::placeholder {
    color: var(--text-muted);
}
.chat-send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--accent), var(--accent-dim));
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.15s;
}
.chat-send-btn:active {
    transform: scale(0.9);
}

/* Welcome screen */
.chat-welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 32px 16px;
    gap: 8px;
}
.chat-welcome-icon {
    font-size: 3rem;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-glow);
    border-radius: 50%;
    margin-bottom: 8px;
}
.chat-welcome h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}
.chat-welcome p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    max-width: 320px;
    margin: 4px 0 16px;
}

/* Suggestion chips */
.chat-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    max-width: 400px;
}
.chat-suggestion {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 0.82rem;
    color: var(--accent);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}
.chat-suggestion:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

