/* =============================================
   FISHING UI — Clean, modern fishing map theme
   ============================================= */

:root {
    --fs: 0.9375rem;
    --fs-sm: 0.8125rem;
    --fs-xs: 0.75rem;

    /* Blues & water */
    --water-100: #dbeafe;
    --water-200: #bfdbfe;
    --water-400: #60a5fa;
    --water-500: #3b82f6;
    --water-600: #2563eb;
    --water-700: #1d4ed8;

    /* Neutrals */
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;

    /* Accent */
    --amber-400: #fbbf24;
    --amber-500: #f59e0b;

    /* Layout */
    --detail-w: 420px;
    --radius: 8px;
    --fish-detail-scroll-pad-bottom: 18px;
    --panel-bg: rgba(15, 23, 42, 0.92);
    --panel-bg-hover: rgba(30, 41, 59, 0.95);
    --panel-border: rgba(255, 255, 255, 0.15);
    --panel-border-soft: rgba(255, 255, 255, 0.08);
    --panel-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

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

html, body {
    height: 100%;
    overflow: hidden;
    background: var(--slate-900);
    color: var(--slate-200);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

#fishing-app {
    height: 100%;
}

/* --- Layout --- */
.fish-layout {
    height: 100%;
    position: relative;
    overflow: hidden;
}

/* --- Filters --- */
.fish-filters-overlay {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1000;
    pointer-events: auto;
}

.fish-filter-toggles {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.fish-filter-toggles--popover {
    margin-top: 2px;
}

.fish-filter-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 4px 7px;
    border: 1px solid color-mix(in srgb, var(--cat-color, var(--water-500)) 78%, #fff 22%);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--cat-color, var(--water-500)) 7%, transparent);
    color: var(--cat-color, var(--water-300));
    font-family: inherit;
    font-size: 11px;
    text-align: left;
    cursor: pointer;
    transition: all 0.15s ease;
    min-height: 26px;
}

.fish-filter-toggle:hover {
    border-color: var(--cat-color, var(--water-400));
    background: color-mix(in srgb, var(--cat-color, var(--water-500)) 12%, transparent);
}

.fish-filter-toggle.is-on {
    border-color: var(--cat-color, var(--water-500));
    background: color-mix(in srgb, var(--cat-color, var(--water-500)) 16%, transparent);
    color: var(--cat-color, var(--water-200));
}

.fish-filter-toggle.is-off {
    border-color: rgba(148, 163, 184, 0.45);
    background: rgba(148, 163, 184, 0.08);
    color: var(--slate-400);
}

.fish-filter-toggle-main {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

.fish-icon {
    display: inline-block;
    object-fit: contain;
    vertical-align: middle;
    opacity: 0.96;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.25));
}

.fish-icon--filter {
    width: 15px;
    height: 15px;
}

.fish-filter-toggle-name {
    font-size: 10px;
    font-weight: 600;
    color: inherit;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fish-filter-toggle.is-off .fish-filter-toggle-name {
    text-decoration: line-through;
    text-decoration-thickness: 1.2px;
    text-decoration-color: rgba(148, 163, 184, 0.7);
}

.fish-filter-chip-count {
    font-size: 10px;
    color: var(--slate-500);
    font-weight: 500;
    min-width: 1rem;
    text-align: right;
}

.fish-filter-toggle--county {
    --cat-color: var(--county-color, #f8fafc);
    border-color: color-mix(in srgb, var(--county-color, #e2e8f0) 72%, transparent);
    background: color-mix(in srgb, var(--county-color, #f8fafc) 7%, transparent);
    color: color-mix(in srgb, var(--county-color, #f8fafc) 85%, #fff);
}

.fish-filter-toggle--county:hover {
    border-color: color-mix(in srgb, var(--county-color, #e2e8f0) 90%, transparent);
    background: color-mix(in srgb, var(--county-color, #f8fafc) 12%, transparent);
}

.fish-filter-toggle--county.is-on {
    border-color: color-mix(in srgb, var(--county-color, #e2e8f0) 90%, transparent);
    background: color-mix(in srgb, var(--county-color, #f8fafc) 16%, transparent);
    color: color-mix(in srgb, var(--county-color, #f8fafc) 80%, #fff);
}

.fish-import-status {
    margin-top: 0;
    color: var(--water-200);
    font-size: 11px;
    pointer-events: auto;
}

.fish-import-status--overlay {
    position: absolute;
    top: 52px;
    left: 10px;
    z-index: 1000;
    padding: 3px 7px;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.fish-filters-launcher {
    position: relative;
    z-index: 1;
    display: inline-block;
}

.fish-filter-fab-btn {
    min-width: 58px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: var(--radius);
    background: var(--panel-bg);
    color: #fff;
    font-size: 12px !important;
    font-weight: 500;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1 !important;
    box-shadow: var(--panel-shadow);
}

.fish-filter-fab-btn:hover {
    background: var(--panel-bg-hover);
    color: var(--water-200);
}

.fish-filters-popover {
    position: absolute;
    left: 0 !important;
    top: calc(100% + 8px);
    bottom: auto;
    width: min(300px, calc(100vw - 24px));
    max-height: min(48vh, 320px);
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
    padding: 8px;
}

.fish-filters-popover-title {
    font-size: 0.66rem;
    font-weight: 700;
    color: var(--slate-400);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.fish-filters-popover-title--section {
    margin-top: 8px;
}

.fish-filter-bulk-btn {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 5px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    border-radius: 4px;
    background: rgba(148, 163, 184, 0.1);
    color: var(--slate-300);
    font-size: 0.6rem;
    font-weight: 600;
    font-family: inherit;
    letter-spacing: 0.02em;
    text-transform: lowercase;
    cursor: pointer;
    line-height: 1.4;
    transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
    vertical-align: middle;
}

.fish-filter-bulk-btn:hover {
    background: rgba(148, 163, 184, 0.22);
    border-color: rgba(148, 163, 184, 0.6);
    color: #fff;
}

.fish-filters-top-row {
    display: flex;
    align-items: center;
    width: min(300px, calc(100vw - 24px));
}

.fish-filter-fab-dot {
    margin-left: 4px;
    color: #f0a060;
    font-weight: 800;
    font-size: 11px;
    line-height: 1;
}

.fish-filter-reset-btn {
    margin-left: auto;
    height: 26px;
    padding: 0 9px;
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    background: var(--panel-bg);
    color: #f0a060;
    font-size: 0.6rem;
    font-weight: 600;
    font-family: inherit;
    letter-spacing: 0.01em;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
    box-shadow: var(--panel-shadow);
}

.fish-filter-reset-btn:hover {
    background: var(--panel-bg-hover);
    color: #f5b880;
}

.fish-reset-slide-enter-active {
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.fish-reset-slide-leave-active {
    transition: opacity 0.1s ease, transform 0.1s ease;
}

.fish-reset-slide-enter-from {
    opacity: 0;
    transform: translateX(-8px);
}

.fish-reset-slide-leave-to {
    opacity: 0;
    transform: translateX(-8px);
}

.fish-loading-wrap {
    display: flex;
    min-height: 136px;
    min-width: min(86vw, 320px);
    padding: 18px 22px 16px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 11px;
    border-radius: 14px;
    border: 1px solid rgba(147, 197, 253, 0.28);
    background:
        linear-gradient(160deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.86));
    box-shadow:
        0 18px 44px rgba(2, 6, 23, 0.52),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.fish-loading-spinner {
    width: 38px;
    height: 38px;
    border: 3px solid rgba(148, 163, 184, 0.28);
    border-top-color: #93c5fd;
    border-right-color: var(--water-500);
    border-radius: 50%;
    animation: fish-spin 0.75s linear infinite;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.fish-loading-text {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: #f8fafc;
    text-align: center;
    text-shadow: 0 1px 1px rgba(2, 6, 23, 0.55);
}

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

.fish-map-loading-overlay {
    position: absolute;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 50% 42%, rgba(15, 23, 42, 0.12), rgba(2, 6, 23, 0.62));
    pointer-events: none;
}

/* --- Map container --- */
.fish-map-shell {
    flex: 1;
    height: 100%;
    position: relative;
}

.fish-map {
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Leaflet overrides for fishing theme */
.fish-map .leaflet-container {
    background: var(--slate-900);
    font-family: 'Inter', system-ui, sans-serif;
}


.fish-map.is-home-pick-cursor,
.fish-map.is-home-pick-cursor .leaflet-container,
.fish-map.is-home-pick-cursor .leaflet-interactive {
    cursor: crosshair !important;
}

/* --- Leaflet controls --- */
.leaflet-bottom.leaflet-left .leaflet-control {
    margin-bottom: 0;
}

.leaflet-bottom.leaflet-left .leaflet-control-zoom {
    margin-bottom: 10px;
}

.leaflet-control-zoom {
    border: 1px solid var(--panel-border) !important;
    border-radius: var(--radius) !important;
    overflow: hidden;
    box-shadow: var(--panel-shadow) !important;
}

.leaflet-control-zoom a,
.fish-control-home-stack a,
.fish-control-geo-wrap .fish-control-geo,
.fish-control-info-wrap .fish-control-info {
    background: var(--panel-bg) !important;
    color: #fff !important;
    width: 36px !important;
    height: 36px !important;
    line-height: 36px !important;
    display: block;
    text-align: center;
    text-decoration: none;
}

.leaflet-control-zoom a {
    border-color: var(--panel-border-soft) !important;
    font-size: 17px !important;
    font-weight: 600 !important;
}

.leaflet-control-zoom a:hover,
.fish-control-home-stack a:hover,
.fish-control-geo-wrap .fish-control-geo:hover,
.fish-control-info-wrap .fish-control-info:hover {
    background: var(--panel-bg-hover) !important;
    color: var(--water-200) !important;
}

.fish-control-home-stack {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--panel-border) !important;
    border-radius: var(--radius) !important;
    overflow: hidden;
    box-shadow: var(--panel-shadow) !important;
    margin-bottom: 0 !important;
    width: fit-content;
}

.fish-control-tools {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px !important;
}

.fish-control-geo-wrap {
    display: flex;
    width: fit-content;
}

.fish-control-info-wrap {
    display: flex;
    width: fit-content;
}

.fish-control-info-wrap .fish-control-info {
    font-size: 15px !important;
    font-weight: 700 !important;
    letter-spacing: 0;
}

.fish-control-geo-wrap .fish-control-geo {
    position: relative;
}

.fish-control-geo-wrap .fish-control-geo.is-not-granted {
    color: #fff !important;
}

.fish-control-geo-wrap .fish-control-geo.is-not-granted::after {
    content: '';
    position: absolute;
    left: 6px;
    right: 6px;
    top: 17px;
    height: 2px;
    background: rgba(239, 68, 68, 0.9);
    transform: rotate(-24deg);
    transform-origin: center;
    border-radius: 1px;
}

.fish-control-geo-wrap .fish-control-geo.is-loading {
    animation: fish-pulse 0.9s ease-in-out infinite;
}

.fish-control-home-stack a {
    border: none !important;
    border-right: 1px solid var(--panel-border-soft) !important;
    font-size: 14px !important;
    font-weight: 700 !important;
}

.fish-control-home-stack .fish-control-home-main {
    font-size: 18px !important;
    font-weight: 900 !important;
    letter-spacing: -0.01em;
}

.fish-control-geo-wrap .fish-control-geo {
    font-size: 15px !important;
    font-weight: 700 !important;
    letter-spacing: 0;
}

.fish-control-home-stack .fish-control-home-symbol {
    display: inline-block;
    font-weight: 900;
    font-size: 1.2em;
    line-height: 1;
    text-shadow: 0 0 0.02em currentColor;
}

.fish-control-geo-wrap .fish-control-home-symbol {
    display: inline-block;
    font-weight: 700;
    font-size: 1em;
    line-height: 1;
    text-shadow: none;
}

.fish-control-info-wrap .fish-control-home-symbol {
    display: inline-block;
    font-weight: 700;
    font-size: 1em;
    line-height: 1;
    text-shadow: none;
}

.fish-control-home-stack .fish-control-home-plus {
    display: inline-block;
    font-weight: 800;
    font-size: 0.88em;
    line-height: 1;
    margin-left: 1px;
    transform: translateY(-1px);
}

.fish-control-home-stack .fish-control-home-remove {
    font-size: 16px !important;
    font-weight: 800 !important;
}

.fish-control-home-stack > a:last-child {
    border-right: none !important;
}

.fish-control-home-stack a.is-active {
    background: rgba(37, 99, 235, 0.45) !important;
    color: #dbeafe !important;
}

.fish-control-home-stack a.is-disabled {
    opacity: 0.45;
    pointer-events: none;
}

.fish-info-modal-backdrop {
    position: absolute;
    inset: 0;
    z-index: 1600;
    background: rgba(2, 6, 23, 0.62);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.fish-info-modal {
    width: min(760px, 100%);
    max-height: min(82vh, 820px);
    overflow-y: auto;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: linear-gradient(165deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.98));
    box-shadow: 0 16px 40px rgba(2, 6, 23, 0.6);
    padding: 18px 18px 20px;
    position: relative;
}

.fish-info-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: var(--radius);
    background: var(--panel-bg);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
}

.fish-info-modal-title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 2px 0 10px;
}

.fish-info-modal h2 {
    font-size: 1.24rem;
    color: #fff;
    margin-bottom: 0;
}

.fish-info-modal-logo {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 4px 12px rgba(2, 6, 23, 0.45);
    background: rgba(15, 23, 42, 0.75);
}

.fish-info-modal h3 {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--water-200);
    margin: 14px 0 6px;
}

.fish-info-modal p,
.fish-info-modal li {
    color: var(--slate-300);
    font-size: 0.9rem;
    line-height: 1.55;
}

.fish-info-modal ol,
.fish-info-modal ul {
    padding-left: 18px;
    margin: 0;
    display: grid;
    gap: 4px;
}

.fish-info-salute {
    margin: 14px 0 8px;
    text-align: center;
    font-size: 1.06rem !important;
    font-weight: 800;
    letter-spacing: 0.03em;
    color: #fde68a !important;
    text-shadow: 0 0 14px rgba(251, 191, 36, 0.28);
}

.fish-info-modal-placeholder {
    margin-top: 6px;
    min-height: 120px;
    border-radius: var(--radius);
    border: 1px dashed rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.45);
}

@keyframes fish-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}

/* Attribution */
.leaflet-control-attribution {
    background: rgba(15, 23, 42, 0.85) !important;
    color: var(--slate-400) !important;
    font-size: 10px !important;
    font-family: 'Inter', system-ui, sans-serif !important;
}

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

/* --- Markers --- */
.fish-marker,
.fish-home-marker,
.fish-current-marker {
    background: none !important;
    border: none !important;
}

.fish-marker-pin {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--marker-inner-color, #cbd5e1) 60%, white 40%);
    border: 3px solid var(--marker-color, var(--water-500));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 0 0 2px rgba(0, 0, 0, 0.5),
        0 3px 10px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
    overflow: visible;
}

.fish-marker-pin:hover {
    transform: scale(1.15);
    box-shadow:
        0 0 0 2px rgba(0, 0, 0, 0.5),
        0 0 0 5px color-mix(in srgb, var(--marker-color, var(--water-500)) 35%, transparent),
        0 4px 14px rgba(0, 0, 0, 0.5);
}

.fish-marker-pin.is-selected {
    transform: scale(1.16);
    border-color: #ef4444;
    box-shadow:
        0 0 0 2px rgba(0, 0, 0, 0.55),
        0 0 0 6px rgba(239, 68, 68, 0.35),
        0 0 14px rgba(239, 68, 68, 0.7),
        0 4px 14px rgba(0, 0, 0, 0.5);
}

.fish-marker-symbol {
    font-size: 18px;
    line-height: 1;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.3));
}

.fish-icon--marker {
    width: 34px;
    height: 34px;
    object-fit: contain;
    transform: translateY(-1px);
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.35));
}

.fish-icon--marker-pstruhove {
    width: 36px;
    height: 36px;
    transform: translateY(1px);
}

.fish-icon--marker-mimopstruhove {
    width: 38px;
    height: 38px;
    transform: translateY(1px);
}

/* Cluster markers */
.fish-cluster {
    background: none;
}

.fish-cluster div {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}

.fish-cluster-small div {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.fish-cluster-medium div {
    background: linear-gradient(135deg, #0891b2, #0e7490);
}

.fish-cluster-large div {
    background: linear-gradient(135deg, #1d4ed8, #1e3a8a);
}

/* Selected revir path should pop on green/blue terrain tiles */
.fish-selected-river-path {
    filter: drop-shadow(0 0 2px rgba(127, 29, 29, 0.95))
            drop-shadow(0 0 8px rgba(239, 68, 68, 0.55));
}

.fish-home-pin {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #fff3d6 0%, #f59e0b 40%, #d97706 100%);
    border: 3px solid #fff;
    box-shadow:
        0 0 0 2px rgba(0, 0, 0, 0.4),
        0 0 12px rgba(245, 158, 11, 0.4),
        0 4px 12px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.fish-home-symbol {
    color: var(--slate-900);
    font-size: 20px;
    font-weight: 900;
    line-height: 1;
}

.fish-current-pin {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: radial-gradient(circle at center, #93c5fd 0%, #2563eb 56%, rgba(37, 99, 235, 0.22) 57%);
    box-shadow:
        0 0 0 4px rgba(37, 99, 235, 0.2),
        0 0 12px rgba(59, 130, 246, 0.45);
}

/* Tooltip */
.fish-tooltip {
    background: var(--slate-900) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
    font-family: 'Inter', system-ui, sans-serif !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    padding: 5px 12px !important;
    border-radius: 6px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5) !important;
    white-space: nowrap !important;
}

.leaflet-tooltip-top.fish-tooltip::before {
    border-top-color: rgba(255, 255, 255, 0.2) !important;
}

.leaflet-tooltip-bottom.fish-tooltip::before {
    border-bottom-color: rgba(255, 255, 255, 0.2) !important;
}

/* --- Detail panel --- */
.fish-detail {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: var(--detail-w);
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    z-index: 200;
    padding: 0 20px 10px;
    transform: translateX(100%);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--slate-900);
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
}

.fish-detail.is-open {
    transform: translateX(0);
}

.fish-detail-close {
    position: static;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.04);
    color: var(--slate-400);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.12s ease;
    flex-shrink: 0;
}

.fish-detail-close:hover {
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--slate-100);
    background: rgba(255, 255, 255, 0.08);
}

.fish-detail-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 9px;
    border-radius: 7px;
    border: 1px solid rgba(96, 165, 250, 0.34);
    background: rgba(37, 99, 235, 0.16);
    color: var(--water-100);
    font-size: 0.72rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
    white-space: nowrap;
}

.fish-detail-nav-btn:hover {
    background: rgba(37, 99, 235, 0.26);
    border-color: rgba(96, 165, 250, 0.5);
    color: #fff;
}

.fish-detail-distance {
    display: inline-flex;
    align-items: center;
    line-height: 1;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.fish-detail-distance--current {
    color: var(--slate-400);
    font-size: 0.76rem;
    font-weight: 600;
}

.fish-detail-nav-btn .fish-detail-distance--current {
    color: var(--slate-400);
}

.fish-detail-home-icon {
    display: inline-block;
    font-weight: 900;
    font-size: 1.22em;
    line-height: 1;
    margin-right: 2px;
    transform: translateY(-1px);
    text-shadow: none;
}

.fish-detail-header {
    margin-bottom: 0;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 30;
    background: var(--slate-900);
    padding: 20px 0 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.fish-detail-header::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -8px;
    height: 8px;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0));
    pointer-events: none;
}

.fish-detail-header-top {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    position: relative;
    min-height: 32px;
}

.fish-detail-header-actions-row {
    display: flex;
    justify-content: flex-start;
    margin-top: 2px;
}

.fish-detail-actions {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    flex-shrink: 0;
}

.fish-detail-nav-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.fish-detail-nav-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: wrap;
}

.fish-detail-scroll {
    flex: 0 0 auto;
    min-height: auto;
    overflow: visible;
    padding-right: 0;
    padding-bottom: var(--fish-detail-scroll-pad-bottom);
}

.fish-detail-headline {
    display: block;
    flex: 1;
    min-width: 0;
    margin-top: 2px;
}

.fish-detail-title-wrap {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.fish-detail-title-line {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex-wrap: nowrap;
}

.fish-detail-org-row {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    margin-top: 1px;
}

.fish-detail-revir-number {
    display: inline-flex;
    align-items: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.16rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0.075em;
    color: #fbbf24;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.16);
}

.fish-detail-revir-link:not(.is-static) .fish-detail-revir-number {
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-thickness: 1px;
}

.fish-detail-revir-link {
    margin-top: 0;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 5px;
    width: max-content;
    min-height: 36px;
    padding: 9px 12px 4px;
    border-radius: var(--radius);
    border: 1px solid rgba(251, 191, 36, 0.45);
    background: rgba(251, 191, 36, 0.12);
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.3);
    color: #fbbf24;
    text-decoration: none;
    line-height: 1.2;
    transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
    position: relative;
}

.fish-detail-revir-link:hover {
    background: rgba(251, 191, 36, 0.2);
    border-color: rgba(251, 191, 36, 0.62);
    color: #fde68a;
}

.fish-detail-revir-link.is-static {
    border-color: rgba(148, 163, 184, 0.32);
    background: rgba(148, 163, 184, 0.09);
    color: #fbbf24;
    cursor: default;
}

.fish-detail-revir-legend {
    position: absolute;
    top: -6px;
    left: 7px;
    padding: 0 1px;
    background: var(--slate-900);
    color: var(--slate-400);
    font-size: 0.56rem;
    letter-spacing: 0.08em;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
    pointer-events: none;
}

.fish-detail-revir-row {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 8px;
    margin-bottom: 0;
    min-height: 20px;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.fish-detail-category-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 2px;
}

.fish-detail-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.68rem;
    font-weight: 500;
    min-height: 21px;
    padding: 0 8px;
    border: 1px dashed;
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.55);
    box-shadow: none;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.25;
    opacity: 0.82;
}

.fish-detail-category-badge.is-muted {
    color: var(--slate-500);
    background: rgba(15, 23, 42, 0.52);
}

.fish-detail-county-badge {
    border-color: color-mix(in srgb, var(--county-color, #e2e8f0) 90%, transparent);
    background: color-mix(in srgb, var(--county-color, #f8fafc) 16%, transparent);
    color: color-mix(in srgb, var(--county-color, #f8fafc) 80%, #fff);
}

.fish-detail-home-chip {
    display: inline-flex;
    align-items: center;
    min-height: 21px;
    padding: 0 8px;
    border: 1px dashed rgba(148, 163, 184, 0.62);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.5);
    color: var(--slate-400);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    line-height: 1.2;
    white-space: nowrap;
}

.fish-detail-home-icon--current {
    font-size: 0.96em;
    transform: translateY(-0.25px);
}

.fish-icon--detail {
    width: 14px;
    height: 14px;
}

.fish-detail-title {
    flex: 1;
    min-width: 0;
    font-size: 1.23rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.22;
    letter-spacing: -0.01em;
    margin: 0;
}

.fish-detail-organization-text {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 20px;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    font-size: 0.8rem;
    color: var(--slate-300);
    text-decoration: none;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    font-weight: 500;
}

.fish-detail-organization-text[href] .fish-detail-organization-label {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.fish-external-link-icon {
    display: inline-flex;
    align-items: center;
    font-size: 0.72rem;
    line-height: 1;
    opacity: 0.82;
    transform: translateY(-1px);
    text-decoration: none !important;
}

.fish-detail-divider {
    border: none;
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 14px 0;
}

.fish-detail-scroll > .fish-detail-divider:first-child {
    margin-top: 8px;
}

.fish-detail-section-title {
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--water-200);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.fish-detail-links {
    margin-top: 4px;
}

.fish-detail-geometry-note {
    margin-top: 4px;
    margin-bottom: 10px;
    padding: 8px 10px;
    border: 1px dashed rgba(148, 163, 184, 0.35);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.42);
    color: var(--slate-400);
    font-size: 0.78rem;
    line-height: 1.45;
}

.fish-detail-links-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.fish-detail-link-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 24px;
    padding: 0 8px;
    border-radius: var(--radius);
    border: 1px solid rgba(96, 165, 250, 0.35);
    background: rgba(37, 99, 235, 0.1);
    color: var(--water-100);
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 600;
    transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.fish-detail-link-chip:hover {
    background: rgba(37, 99, 235, 0.2);
    border-color: rgba(96, 165, 250, 0.55);
    color: #fff;
}

.fish-detail-link-label {
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Info grid */
.fish-detail-info {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 4px;
}

.fish-info-card {
    padding: 10px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.fish-info-card--compact {
    padding: 7px 9px;
}

.fish-info-card--compact .fish-info-card-label {
    font-size: 0.64rem;
    margin-bottom: 0;
    letter-spacing: 0.04em;
}

.fish-info-card--compact .fish-info-card-value {
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.2;
}

.fish-info-card-inline {
    display: flex;
    align-items: baseline;
    gap: 4px;
    white-space: nowrap;
}

.fish-info-card-label {
    font-size: var(--fs-xs);
    color: var(--slate-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: 2px;
}

.fish-info-card-label-icon {
    display: inline;
    width: auto;
    margin: 0;
    padding: 0;
    color: var(--slate-400);
    font-weight: 800;
    font-size: 1.2em;
    line-height: 1;
    vertical-align: -0.03em;
}

.fish-info-card-label-icon.is-home {
    font-size: 1.55em;
    font-weight: 900;
    color: var(--slate-200);
    vertical-align: -0.1em;
}

.fish-info-card-label-icon.is-location {
    font-size: 1.2em;
}

.fish-info-card-value {
    font-size: var(--fs);
    color: var(--slate-100);
    font-weight: 500;
}

.fish-info-card.is-action {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.fish-info-card-action {
    margin-top: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 30px;
    border-radius: 7px;
    border: 1px solid rgba(96, 165, 250, 0.34);
    background: rgba(37, 99, 235, 0.16);
    color: var(--water-100);
    font-size: var(--fs-xs);
    font-weight: 700;
    text-decoration: none;
    transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.fish-info-card-action:hover {
    background: rgba(37, 99, 235, 0.26);
    border-color: rgba(96, 165, 250, 0.5);
    color: #fff;
}

/* Local rules */
.fish-detail-rules {
    margin-top: 4px;
}

.fish-detail-rules-title {
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--amber-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.fish-detail-rules-text {
    font-size: var(--fs-sm);
    line-height: 1.65;
    color: var(--slate-300);
    background: rgba(251, 191, 36, 0.04);
    border: 1px solid rgba(251, 191, 36, 0.1);
    border-radius: var(--radius);
    padding: 10px 12px;
    white-space: pre-line;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.35);
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.2) transparent;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    :root {
        --detail-w: 100%;
        --fish-detail-scroll-pad-bottom: 22px;
    }

    .fish-filters-overlay {
        top: 8px;
        left: 8px;
    }

    .fish-filter-fab-btn {
        min-width: 56px;
        height: 30px;
        padding: 0 7px;
        font-size: 12px !important;
    }


    .fish-filters-popover {
        left: 0 !important;
        width: min(280px, calc(100vw - 16px));
        max-height: min(46vh, 300px);
        padding: 7px;
        top: calc(100% + 6px);
        bottom: auto;
    }

    .fish-import-status--overlay {
        top: 46px;
        left: 8px;
        max-width: calc(100vw - 16px);
    }

    .fish-filter-toggle {
        padding: 3px 6px;
        min-height: 24px;
    }

    .fish-detail {
        width: 100%;
        bottom: 0;
        top: auto;
        height: 50vh;
        max-height: 50vh;
        transform: translateY(100%);
        border-radius: 0;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        padding: 0 16px 14px;
    }

    .fish-detail-header {
        padding-top: 3px;
    }

    .fish-detail-revir-link {
        min-height: 30px;
        font-size: 0.64rem;
        padding: 7px 8px 3px;
    }

    .fish-detail-revir-legend {
        top: -5px;
        left: 6px;
        font-size: 0.52rem;
    }

    .fish-detail.is-open {
        transform: translateY(0);
    }

}

@media (max-width: 768px) and (orientation: portrait) {
    .fish-detail-header {
        padding-top: 10px;
    }

    .fish-detail-headline {
        margin-top: 1px;
    }
}

@media (max-width: 932px) and (max-height: 500px) and (orientation: landscape) {
    :root {
        --fish-detail-scroll-pad-bottom: 36px;
    }

    .fish-detail {
        padding-bottom: 20px;
    }
}

@media (max-width: 1024px) and (min-width: 481px) {
    .fish-info-modal {
        padding: 14px 16px 16px;
    }

    .fish-info-modal h2 {
        font-size: 1.05rem;
    }

    .fish-info-modal h3 {
        font-size: 0.7rem;
        margin: 8px 0 4px;
    }

    .fish-info-modal p,
    .fish-info-modal li {
        font-size: 0.78rem;
        line-height: 1.4;
    }

    .fish-info-modal ol,
    .fish-info-modal ul {
        gap: 2px;
    }

    .fish-info-modal-title-row {
        margin: 0 0 6px;
    }

    .fish-info-modal-logo {
        width: 30px;
        height: 30px;
    }

    .fish-info-salute {
        margin: 8px 0 4px;
        font-size: 0.92rem !important;
    }
}

@media (max-width: 480px) {
    :root {
        --fs: 0.875rem;
        --fs-sm: 0.8rem;
        --fs-xs: 0.7rem;
    }

    .fish-info-modal-backdrop {
        padding: 0;
    }

    .fish-info-modal {
        width: 100%;
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
        border: none;
        padding: 16px 14px 18px;
    }

    .fish-info-modal h2 {
        font-size: 1rem;
    }

    .fish-info-modal h3 {
        font-size: 0.68rem;
        margin: 7px 0 3px;
    }

    .fish-info-modal p,
    .fish-info-modal li {
        font-size: 0.76rem;
        line-height: 1.38;
    }

    .fish-info-modal ol,
    .fish-info-modal ul {
        gap: 2px;
    }

    .fish-info-modal-title-row {
        margin: 0 0 5px;
    }

    .fish-info-modal-logo {
        width: 28px;
        height: 28px;
    }

    .fish-info-salute {
        margin: 7px 0 4px;
        font-size: 0.88rem !important;
    }
}
