.portal-map-shell {
    position: relative;
    --tblr-gutter-x: 1rem;
    gap: 0;
    align-items: stretch;
    padding-bottom: 0.35rem;
    --portal-map-desktop-offset: 6.75rem;
    --portal-map-mobile-offset: 5.25rem;
    --portal-map-mobile-canvas-offset: 9rem;
    --portal-map-mobile-canvas-offset-small: 9.5rem;
    --portal-map-mobile-bleed: 0px;
    --portal-visual-viewport-offset: 0px;
    --map-tool-stack-gap: 6px;
    --map-tool-rail-top-offset: 2px;
}

.portal-map-page-title-row {
    display: none;
}

.portal-map-mobile-header {
    margin-bottom: 0.15rem;

.portal-map-shell.row {
    --tblr-gutter-x: 0;
    --tblr-gutter-y: 0;
    margin-left: 0;
    margin-right: 0;
}
}

.portal-map-sidebar {
    min-width: 0;
    max-width: 100%;
}

.portal-map-sidebar-rail {
    display: none;
}

.portal-map-sidebar-rail-label {
    display: none;
}

.portal-map-sidebar,
.portal-map-main {
    transition: flex-basis 0.22s ease, width 0.22s ease, max-width 0.22s ease, opacity 0.18s ease, transform 0.22s ease;
}

.portal-map-sidebar .card {
    height: 100%;
}

.portal-map-sidebar .card-body {
    display: flex;
    flex-direction: column;
}

.portal-map-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}

.map-canvas {
    position: relative;
    width: 100%;
    flex: 1 1 auto;
    min-height: 70vh;
    min-height: calc(100svh - var(--portal-map-mobile-canvas-offset));
    min-height: calc(100dvh - var(--portal-map-mobile-canvas-offset));
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.08);
    --map-control-button-size: 1.9rem;
    --map-control-button-font-size: 1.05rem;
    --map-right-controls-right: 0.5em;
    --map-right-controls-bottom: 0.5em;
    --map-right-controls-gap: 0.45em;
    --map-right-control-size: var(--map-control-button-size);
    --map-bottomsheet-max-height: calc(75% - 0.35rem);
}

.map-canvas,
.map-canvas .ol-viewport,
.map-canvas canvas {
    touch-action: none;
    overscroll-behavior: none;
}

.map-status {
    position: absolute;
    top: 0.75rem;
    left: 50%;
    z-index: 32;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    width: min(calc(100% - 1.5rem), 42rem);
    pointer-events: none;
}

.map-status > div {
    max-width: 100%;
    padding: 0.35rem 0.8rem;
    border: 1px solid rgba(148, 163, 184, 0.4);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(8px);
    color: #334155;
    font-size: 0.78rem;
    line-height: 1.25;
    text-align: center;
}

.map-status.is-passive-update > div {
    width: auto;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

.map-status.is-passive-update span {
    color: #64748b;
    font-size: 0.74rem;
}

.map-status span {
    display: block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.report-map-selection-hint {
    position: absolute;
    bottom: 0.75rem;
    left: 50%;
    z-index: 31;
    width: max-content;
    max-width: calc(100% - 1rem);
    padding: 0.35rem 0.8rem;
    border: 1px solid rgba(148, 163, 184, 0.4);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(8px);
    color: #64748b;
    font-size: 0.74rem;
    line-height: 1.25;
    text-align: center;
    pointer-events: none;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    transform: translateX(-50%);
    transition: opacity 160ms ease, transform 160ms ease;
}

.report-map-selection-hint.is-hidden {
    opacity: 0;
    transform: translateX(-50%) translateY(0.25rem);
}

@media (max-width: 1199px) {
    .report-map-selection-hint {
        bottom: calc(env(safe-area-inset-bottom, 0px) + 4.65rem);
    }
}

.popup-row--action {
    margin-top: 0.7rem;
}

.map-report-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 0.9rem;
    border: 0;
    border-radius: 999px;
    background: #2563eb;
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.2;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
}

.map-report-action-button i {
    font-size: 1rem;
    line-height: 1;
}

.map-report-action-button:hover,
.map-report-action-button:focus-visible {
    background: #1d4ed8;
    outline: none;
}

.map-report-action-button--secondary {
    border: 1px solid #2563eb;
    background: #ffffff;
    color: #2563eb;
    box-shadow: none;
}

.map-report-action-button--secondary:hover,
.map-report-action-button--secondary:focus-visible {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #1d4ed8;
}

.popup-row--action-note {
    margin-top: 0.45rem;
    text-align: center;
}

.popup-row--claim-note {
    margin-top: 0.65rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid #bfdbfe;
    border-radius: 0.85rem;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 0.8rem;
    line-height: 1.45;
}

.map-canvas .ol-touch .ol-control button {
    font-size: var(--map-control-button-font-size);
}

.map-canvas .ol-control button {
    width: var(--map-control-button-size);
    height: var(--map-control-button-size);
    font-size: var(--map-control-button-font-size);
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-panel .filter-group {
    margin-top: 0.8rem;
}

.portal-map-shell [data-panel-section="report"] {
    margin-top: 0;
}

.portal-map-shell [data-panel-section="report"] .report-form-shell {
    gap: 12px;
}

.portal-map-shell [data-panel-section="report"] .report-form-shell .report-form-card {
    padding: 18px;
    border-radius: 20px;
}

.map-panel .filter-group.form-check.form-switch {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
}

.map-panel .panel-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.map-panel .panel-heading small {
    color: #6c757d;
}

.map-panel-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.5rem 0.8rem;
    border: 1px solid #dbe2ea;
    border-radius: 999px;
    background: #f8fafc;
    color: #334155;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1;
    transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.map-panel-toggle:hover,
.map-panel-toggle:focus-visible {
    border-color: #93c5fd;
    background: #eff6ff;
    color: #1d4ed8;
    outline: none;
}

.map-panel-toggle.is-active {
    border-color: #60a5fa;
    background: #dbeafe;
    color: #1d4ed8;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.08);
}

.map-panel-toggle-inline.is-active {
    border-color: #dbe2ea;
    background: #f8fafc;
    color: #334155;
    box-shadow: none;
}

.map-panel-toggle i {
    font-size: 1rem;
    line-height: 1;
}

.map-panel-toggle-inline,
.map-panel-toggle-rail {
    display: none;
}

.map-panel-toggle-inline {
    margin-top: -0.05rem;
}

.map-inline-link {
    font-size: 0.75rem;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
}

.map-inline-link:hover,
.map-inline-link:focus-visible {
    color: #1d4ed8;
    text-decoration: underline;
}

.panel-heading-title-compact,
.panel-heading-copy-compact {
    display: none;
}

.map-desktop-tab-bar {
    display: none;
}

.map-panel-sections {
    display: flex;
    flex-direction: column;
}

.map-panel-sections [data-desktop-tab].is-desktop-tab-active {
    display: block;
}

.map-status {
    font-size: 1rem;
    line-height: 1.5;
    color: #6b7280;
}

#mapStatus {
    color: #6b7280;
    font-size: .875rem;
    line-height: 1.5;
}

.map-panel-close {
    display: none;
}

.map-filter-section {
    margin-top: 0.25rem;
}

.map-compare-note {
    line-height: 1.45;
}

.map-compare-group .form-check {
    margin-top: 0.3rem;
}

.map-reference-layer-list {
    margin-top: 0.45rem;
}

.map-reference-inline-info {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    margin-left: auto;
}

.map-reference-info-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: #64748b;
    box-shadow: none;
}

.map-reference-info-button:hover,
.map-reference-info-button:focus-visible {
    color: #334155;
    border: 0;
    background: transparent;
    box-shadow: none;
    outline: none;
}

.map-expert-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.map-tool-rail {
    display: none;
    position: absolute;
    top: 0.4rem;
    right: var(--map-right-controls-right);
    z-index: 35;
    padding: 0;
    gap: var(--map-tool-stack-gap);
    border-radius: 0;
    background-color: transparent;
    flex-direction: column;
}

.map-zoom-rail,
.map-info-rail {
    display: none;
    position: absolute;
    z-index: 35;
    padding: 0;
    gap: var(--map-tool-stack-gap);
    border-radius: 0;
    background-color: transparent;
    flex-direction: column;
}

.map-zoom-rail {
    top: 0.4rem;
    left: 0.5em;
}

.map-info-rail {
    right: var(--map-right-controls-right);
    bottom: var(--map-right-controls-bottom);
}

.map-tool-control {
    background-color: var(--ol-subtle-background-color);
    border-radius: 4px;
}

.map-tool-button {
    width: var(--map-control-button-size);
    height: var(--map-control-button-size);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1px;
    padding: 0;
    border: none;
    border-radius: 2px;
    background: var(--ol-background-color);
    color: var(--ol-subtle-foreground-color);
}

.map-tool-button:hover,
.map-tool-button:focus-visible {
    color: var(--ol-foreground-color);
    outline: 1px solid var(--ol-subtle-foreground-color);
}

.map-tool-button i {
    font-size: 1rem;
    line-height: 1;
    pointer-events: none;
}

.map-tool-rail-secondary {
    display: flex;
    flex-direction: column;
    gap: var(--map-tool-stack-gap);
}

.map-tool-button-toggle i {
    transition: transform 0.18s ease;
}

.map-tool-rail.is-secondary-expanded .map-tool-button-toggle i {
    transform: rotate(180deg);
}

.map-compact-controls-bar {
    display: none;
    margin-top: 0.85rem;
}

.map-compact-controls-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.map-compact-controls-toggle i {
    transition: transform 0.18s ease;
}

.map-compact-controls-toggle[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.map-canvas .ol-attribution {
    right: var(--map-right-controls-right);
    bottom: var(--map-right-controls-bottom);
    z-index: 30;
}

.legend-header {
    font-size: 0.8rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.45rem;
}

.legend-group {
    margin-top: 1rem;
}

.legend-group-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    list-style: none;
    cursor: pointer;
}

.legend-group-title-row:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
    border-radius: 0.35rem;
}

.legend-group-title-row::-webkit-details-marker {
    display: none;
}

.legend-group-title-row .legend-group-title {
    margin-bottom: 0;
}

.legend-group-title {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 0.25rem;
}

.legend-info-details {
    margin-bottom: 0.35rem;
}

.legend-info-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.05rem;
    height: 1.05rem;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #475569;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
    flex: 0 0 auto;
}

.legend-info-details[open] .legend-info-button {
    border-color: #93c5fd;
    background: #eff6ff;
    color: #1d4ed8;
}

.legend-info-copy {
    margin: 0.15rem 0 0.55rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid #dbeafe;
    border-radius: 0.6rem;
    background: #f8fbff;
}

.legend-info-copy p {
    margin: 0.28rem 0 0;
    font-size: 0.72rem;
    line-height: 1.35;
    color: #334155;
}

.legend-info-copy p:first-child {
    margin-top: 0;
}

.legend-info-copy-lead {
    color: #0f172a;
}

.legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.42rem 0.75rem;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.77rem;
    color: #1f2937;
    line-height: 1.25;
}

.legend-dot {
    width: 0.9rem;
    height: 0.9rem;
    border-radius: 999px;
    border: 3px solid #94a3b8;
    background: #eef2f7;
    flex: 0 0 auto;
}

.legend-marker-shape {
    display: inline-block;
    width: 0.9rem;
    height: 0.9rem;
    flex: 0 0 auto;
}

.legend-marker-shape-circle {
    border-radius: 999px;
    border: 2px solid #475569;
    background: #cbd5e1;
}

.legend-marker-shape-triangle {
    width: 0;
    height: 0;
    border-left: 0.45rem solid transparent;
    border-right: 0.45rem solid transparent;
    border-bottom: 0.8rem solid #475569;
    position: relative;
}

.legend-marker-shape-triangle::after {
    content: '';
    position: absolute;
    left: -0.31rem;
    top: 0.14rem;
    width: 0;
    height: 0;
    border-left: 0.31rem solid transparent;
    border-right: 0.31rem solid transparent;
    border-bottom: 0.55rem solid #cbd5e1;
}

.legend-status-new {
    border-color: #1d4ed8;
}

.legend-status-reviewed {
    border-color: #111111;
}

.legend-status-implausible {
    border-color: #b91c1c;
}

.legend-condition-occupied,
.legend-condition-orphaned,
.legend-condition-destroyed,
.legend-condition-missing {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    font-family: "Segoe UI Symbol", "Noto Sans Symbols 2", sans-serif;
    background: #555555;
    border: none;
}

.legend-condition-minus {
    font-size: 1rem;
    padding-bottom: 0.2rem;
}

.legend-condition-cross {
    font-size: 0.92rem;
    padding-bottom: 0.1rem;
}

.legend-series-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    border-radius: 999px;
    border: 1px solid #475569;
    background: #ffffff;
    color: #334155;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1;
}

.legend-species-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem 0.6rem;
}

.legend-species-list .legend-item {
    max-width: 100%;
}

.legend-note {
    font-size: 0.74rem;
    color: #6b7280;
}

.legend-note + .legend-note {
    margin-top: 0.45rem;
}

.map-info-link {
    display: inline-flex;
    align-items: center;
    margin-top: 0.65rem;
    color: #2563eb;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
}

.map-info-link:hover,
.map-info-link:focus-visible {
    color: #1d4ed8;
    text-decoration: underline;
}

.map-base-layer-list {
    display: grid;
    gap: 0.75rem;
}

.map-base-layer-option {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.8rem;
    align-items: start;
    padding: 0.85rem 0.95rem;
    border: 1px solid #dbe2ea;
    border-radius: 0.75rem;
    background: #f8fafc;
    cursor: pointer;
    transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.map-base-layer-option:hover,
.map-base-layer-option:focus-within {
    border-color: #93c5fd;
    background: #f0f7ff;
}

.map-base-layer-option.is-active {
    border-color: #60a5fa;
    background: #eff6ff;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.08);
}

.map-base-layer-radio-wrap {
    padding-top: 0.15rem;
}

.map-base-layer-copy {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.map-base-layer-title {
    font-size: 0.86rem;
    font-weight: 700;
    color: #0f172a;
}

.map-base-layer-description {
    font-size: 0.75rem;
    line-height: 1.35;
    color: #64748b;
}

.map-share-sheet {
    display: grid;
    gap: 0.75rem;
}

.map-share-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.6rem;
    align-items: center;
}

.map-share-input {
    min-width: 0;
}

.map-activity-status {
    margin-top: 0.55rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid #dbe2ea;
    border-radius: 0.75rem;
    background: #f8fafc;
    font-size: 0.8rem;
    line-height: 1.4;
    color: #334155;
}

.map-activity-status.is-active {
    border-color: #f9a8d4;
    background: #fff1f6;
    color: #9d174d;
}

.map-activity-status.is-paused {
    border-color: #cbd5e1;
    background: #f8fafc;
    color: #475569;
}

.map-activity-status.is-saving {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
}

.map-activity-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
    margin-top: 0.75rem;
}

.map-activity-metric {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
    padding: 0.65rem 0.7rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.7rem;
    background: #ffffff;
}

.map-activity-metric strong {
    font-size: 0.9rem;
    color: #0f172a;
}

.map-activity-metric span {
    font-size: 0.72rem;
    color: #64748b;
}

.map-activity-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
    margin-top: 0.75rem;
}

.map-activity-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 0 0 0.8rem;
}

.map-activity-sheet-panel .report-form-section {
    display: grid;
    gap: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

.map-activity-sheet-panel {
    width: 100%;
    gap: 0;
}

.map-activity-sheet-panel .report-inline-info {
    min-height: 1rem;
}

.map-activity-sheet-panel #activityTrackingState + .field {
    margin-top: 0.9rem;
}

.map-activity-sheet-panel .map-activity-metrics,
.map-activity-sheet-panel .map-activity-actions,
.map-activity-sheet-panel .report-activity-observations {
    margin-top: 0.9rem;
}

.portal-map-shell [data-panel-section="activity"] {
    display: none;
}

.portal-map-shell [data-panel-section="activity"].is-in-map-sheet {
    display: block;
}

.map-tool-control-activity {
    display: none;
}

.map-popup-section-placeholder {
    display: none !important;
}

.ol-popup {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    flex-direction: column;
    height: auto;
    min-height: 0;
    max-height: var(--map-bottomsheet-max-height);
    background: rgba(255, 255, 255, 0.985);
    border-radius: 0.75rem 0.75rem 0 0;
    border: 1px solid rgba(0, 0, 0, 0.16);
    box-shadow: 0 0 14px rgba(0, 0, 0, 0.16);
    padding: 0;
    z-index: 40;
    touch-action: none;
    transition: transform 0.22s ease, opacity 0.22s ease;
}

.ol-popup.is-open {
    display: flex;
}

.map-desktop-tab-bar .map-tab-locked {
    opacity: 0.42;
    cursor: not-allowed;
    pointer-events: auto;
}

.map-tool-button.map-tool-locked {
    opacity: 0.42;
    cursor: not-allowed;
}

.ol-popup.is-dragging {
    transition: none;
}

.ol-popup.is-headerless .popup-body {
    padding-top: 1.35rem;
}

.ol-popup.is-headerless .ol-popup-closer {
    top: 0.5rem;
}

.ol-popup::after,
.ol-popup::before {
    display: none;
}

.ol-popup-closer {
    position: absolute;
    top: 0.6rem;
    right: 0.75rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid #dbe2ea;
    border-radius: 999px;
    background: #f8fafc;
    color: #475569;
    text-decoration: none;
}

.ol-popup-closer:hover {
    color: #1f2937;
    background: #eff6ff;
    border-color: #bfdbfe;
}

.ol-popup-closer i {
    font-size: 1rem;
    line-height: 1;
    pointer-events: none;
}

.ol-popup-content {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    max-height: 100%;
    font-size: 0.77rem;
    color: #1f2937;
    line-height: 1.25;
}

.ol-popup-content .popup-header {
    flex: 0 0 auto;
    min-height: 3rem;
    padding: 0.85rem 3.25rem 0.85rem 0.85rem;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.96rem;
    font-weight: 600;
    line-height: 1.35;
    color: #0f172a;
}

.ol-popup-content .popup-body {
    flex: 0 1 auto;
    min-height: 0;
    max-height: 100%;
    overflow: auto;
    padding: 0.65rem 0.85rem 0.9rem;
}

.ol-popup-content .popup-body > :first-child,
.ol-popup-content .popup-body .legend-group:first-child {
    margin-top: 0;
}

.ol-popup[data-popup-kind="tool"] .popup-body .map-activity-sheet-panel {
    margin-top: 0;
}

.ol-popup-content .popup-row {
    margin-bottom: 0.42rem;
}

.ol-popup-content .popup-row:last-child {
    margin-bottom: 0;
}

.ol-popup-content .popup-row strong {
    font-weight: 600;
    color: #111827;
}

.map-review-status-control {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    line-height: 1.35;
    vertical-align: baseline;
}

.map-review-status-trigger {
    padding: 0;
    margin: 0;
    background: transparent;
    border: 0;
    color: #1d4ed8;
    line-height: 1.35;
    font-weight: 600;
    text-decoration: none;
}

.map-review-status-trigger:hover,
.map-review-status-trigger:focus-visible {
    text-decoration: underline;
}

.map-review-status-control .form-select {
    margin-top: 0;
    min-width: 10.5rem;
}

.ol-popup .map-filter-section #buttonToggleMapFilters {
    display: none;
}

.ol-popup .filter-group,
.ol-popup .map-expert-tools {
    margin-top: 0;
    margin-bottom: 1rem;
}

.ol-popup .map-expert-tools {
    padding-top: 0;
    border-top: 0;
}

.ol-popup .card,
.ol-popup .card-body {
    border: 0;
    box-shadow: none;
    padding: 0;
    background: transparent;
}

.ol-popup .map-panel {
    width: 100%;
}

.ol-popup .map-secondary-filters-toggle {
    margin-top: 0.5rem;
}

.map-filter-section .filter-group {
    margin-top: 0.65rem;
    margin-bottom: 0.65rem;
}

.map-secondary-filters-toggle {
    display: block;
    margin: 0.75rem 0 0;
    padding: 0.7rem 0.85rem;
    border-color: #dbe2ea;
    background: #f8fafc;
    text-align: left;
}

.map-secondary-filters-toggle:hover,
.map-secondary-filters-toggle:focus-visible {
    border-color: #93c5fd;
    background: #eff6ff;
}

.map-secondary-filters-toggle.has-active-filters {
    border-color: #93c5fd;
    background: #f4f9ff;
}

.map-secondary-filters-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
}

.map-secondary-filters-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
    min-width: 0;
}

.map-secondary-filters-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #0f172a;
}

.map-secondary-filters-copy {
    font-size: 0.72rem;
    line-height: 1.3;
    color: #64748b;
}

.map-secondary-filters-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    flex: 0 0 auto;
}

.map-secondary-filters-toggle .badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.8rem;
}

.map-secondary-filters-toggle .badge.is-active {
    background: #dbeafe;
    color: #1d4ed8;
}

.map-secondary-filters-chevron {
    font-size: 0.95rem;
    color: #64748b;
    transition: transform 0.18s ease;
}

.map-secondary-filters-toggle[aria-expanded="true"] .map-secondary-filters-chevron {
    transform: rotate(180deg);
}

.map-secondary-filters-panel {
    margin-top: 0.6rem;
    padding: 0.15rem 0.85rem 0.15rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    background: #fbfdff;
}

.map-secondary-filters-panel .filter-group.form-check.form-switch {
    gap: 0.55rem;
    margin-bottom: 0.75rem;
}

.map-filter-select-group {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0 0.75rem;
    align-items: center;
}

.map-filter-select-group .subheader {
    display: flex !important;
    grid-column: 1 / span 2;
    grid-row: 1;
    margin: 0;
    font-size: 0.72rem;
    line-height: 1.25;
    color: #4b5563;
}

.map-filter-select-group .subheader .badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.75rem;
}

.map-filter-select-group > select,
.map-filter-select-group > .ts-wrapper {
    grid-column: 1;
    grid-row: 2;
    min-width: 0;
}

.map-filter-inline-switch.form-check.form-switch {
    grid-column: 2;
    grid-row: 2;
    display: flex;
    align-items: center;
    justify-self: end;
    align-self: center;
    gap: 0.35rem;
    margin: 0 !important;
    padding-top: 0;
    padding-left: 0;
    min-height: auto;
    white-space: nowrap;
}

.map-filter-inline-switch .form-check-input {
    float: none;
    margin: 0;
}

.map-filter-inline-switch .form-check-label {
    display: inline-flex;
    align-items: center;
    font-size: 0.8rem;
    margin: 0;
}

/* TomSelect styling to match Bootstrap form-select */
.map-panel .ts-wrapper {
    position: relative;
}

.map-panel .ts-control {
    background-color: var(--tblr-bg-forms, #fff);
    background-image: var(--tblr-form-select-bg-img, url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%239ca3af' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"));
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px 12px;
    border: 1px solid var(--tblr-border-color, #e5e7eb);
    border-radius: 0.375rem;
    box-shadow: 0 1px 1px rgba(var(--tblr-body-color-rgb), 0.06);
    color: #495057;
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    line-height: 1.5;
    min-height: 36px;
    padding: 0.425rem 2.5rem 0.425rem 0.65rem;
    width: 100%;
    cursor: pointer;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.map-panel .ts-control:focus,
.map-panel .ts-control:focus-visible {
    border-color: rgb(130, 183, 232);
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.map-panel .ts-control:hover {
    border-color: #adb5bd;
}

.map-panel .ts-control .ts-placeholder {
    color: #6c757d;
}

.map-panel .ts-control::after,
.map-panel .ts-wrapper .ts-arrow {
    display: none !important;
}

.map-panel .ts-dropdown {
    box-sizing: border-box;
    margin-top: 0.25rem;
}

.map-panel .ts-control .ts-item {
    display: inline-block;
    margin-right: 0.35rem;
    padding: 0;
    border: none;
    background: transparent;
    color: inherit;
    line-height: inherit;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.map-panel .ts-control .ts-item .remove {
    display: none;
}

.map-panel .ts-control .ts-input {
    flex: 1;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    outline: none;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
    min-width: 1px;
}

.map-panel .ts-dropdown {
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    margin-top: 0.125rem;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1250;
}

.ts-dropdown {
    z-index: 1250;
}

.map-panel .ts-dropdown .ts-dropdown-content {
    padding: 0;
}

.map-panel .ts-dropdown .option {
    padding: 0.375rem 0.75rem;
    cursor: pointer;
    color: #495057;
    font-size: 0.875rem;
    line-height: 1.5;
}

.map-panel .ts-dropdown .option:hover,
.map-panel .ts-dropdown .option.active {
    background-color: #f8f9fa;
    color: #495057;
}

.map-panel .ts-dropdown .option.active {
    background-color: #e9ecef;
}

#selectMode.form-select,
#selectBaseLayer.form-select {
    margin-top: 0.5rem;
}

.form-check.form-switch {
    margin-bottom: 1rem;
}

.filter-group.form-check.form-switch {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.filter-group.form-check.form-switch .form-check-label {
    margin-bottom: 0;
}

.search-autocomplete-wrap {
    position: relative;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ced4da;
    border-top: none;
    border-radius: 0 0 0.375rem 0.375rem;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1001;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: none;
}

.autocomplete-dropdown.has-items {
    display: block;
}

.autocomplete-item {
    display: block;
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    padding: 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.875rem;
    line-height: 1.4;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item:focus {
    background-color: #f8f9fa;
}

.autocomplete-item strong {
    display: block;
    color: #212529;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.autocomplete-item small {
    display: block;
    color: #6c757d;
    font-size: 0.8rem;
}

.autocomplete-item.no-results {
    color: #6c757d;
    text-align: center;
    cursor: default;
}

.autocomplete-item.no-results:hover {
    background-color: transparent;
}

.map-panel {
    position: relative;
}

@media (min-width: 1200px) {
    .portal-map-shell {
        flex-wrap: nowrap;
        --tblr-gutter-x: 1rem;
        gap: 0.5rem;
        --portal-map-sidebar-width: 360px;
        --portal-map-sidebar-collapsed-width: 2.9rem;
    }

    .portal-map-shell.is-sidebar-collapsed {
        gap: 0.5rem;
    }

    .portal-map-page-title-row {
        display: none;
        width: 360px;
        margin-bottom: 0.75rem;
    }

    .portal-map-page-title {
        margin: 0;
    }

    .portal-map-sidebar {
        order: 1;
        flex: 0 0 var(--portal-map-sidebar-width);
        min-width: 345px;
        width: var(--portal-map-sidebar-width);
        max-width: var(--portal-map-sidebar-width);
        height: calc(100svh - var(--portal-map-desktop-offset));
        height: calc(100dvh - var(--portal-map-desktop-offset));
        overflow: hidden;
        position: relative;
    }

    .portal-map-shell.is-sidebar-collapsed .portal-map-sidebar {
        flex-basis: var(--portal-map-sidebar-collapsed-width);
        min-width: var(--portal-map-sidebar-collapsed-width);
        width: var(--portal-map-sidebar-collapsed-width);
        max-width: var(--portal-map-sidebar-collapsed-width);
        opacity: 1;
        transform: none;
        pointer-events: auto;
    }

    .portal-map-sidebar-rail {
        display: none;
        position: absolute;
        inset: 0;
        padding: 0.35rem 0.25rem;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        border: 1px solid #dbe2ea;
        border-radius: 0.75rem;
        background: linear-gradient(180deg, #f8fafc 0%, #eef4fb 100%);
        box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.08);
    }

    .portal-map-sidebar-rail-label {
        position: absolute;
        top: 50%;
        left: 50%;
        writing-mode: vertical-rl;
        text-orientation: mixed;
        transform: translate(-50%, -50%) rotate(180deg);
        color: #6c757d;
        font-size: 0.78rem;
        font-weight: 400;
        letter-spacing: 1em;
        text-transform: uppercase;
        line-height: 1;
        text-align: center;
        white-space: nowrap;
        pointer-events: none;
        user-select: none;
    }

    .portal-map-shell.is-sidebar-collapsed .portal-map-sidebar-rail {
        display: flex;
    }

    .portal-map-shell.is-sidebar-collapsed .portal-map-sidebar-rail-label {
        display: block;
    }

    .portal-map-shell.is-sidebar-collapsed .portal-map-sidebar > .card,
    .portal-map-shell.is-sidebar-collapsed .portal-map-sidebar > form {
        display: none;
    }

    .portal-map-sidebar .card {
        height: 100%;
        max-height: none;
    }

    .portal-map-sidebar .card-body {
        overflow: hidden;
    }

    .map-desktop-tab-bar {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.45rem;
        margin-bottom: 0.85rem;
        padding-bottom: 0.85rem;
        border-bottom: 1px solid #e5e7eb;
    }

    .map-desktop-tab-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0.55rem 0.75rem;
        border: 1px solid #dbe2ea;
        border-radius: 999px;
        background: #f8fafc;
        color: #334155;
        font-size: 0.78rem;
        font-weight: 600;
        line-height: 1.2;
        transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
    }

    .map-desktop-tab-button:hover,
    .map-desktop-tab-button:focus-visible {
        border-color: #93c5fd;
        background: #eff6ff;
        color: #1d4ed8;
        outline: none;
    }

    .map-desktop-tab-button.is-active {
        border-color: #60a5fa;
        background: #dbeafe;
        color: #1d4ed8;
        box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.08);
    }

    .map-panel-sections {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        min-height: 0;
        overflow: auto;
        padding-right: 0.2rem;
    }

    .portal-map-sidebar [data-desktop-tab] {
        display: none;
    }

    .portal-map-main {
        order: 2;
        flex: 1 1 auto;
        width: calc(100% - var(--portal-map-sidebar-width) - 0.5rem);
        max-width: calc(100% - var(--portal-map-sidebar-width) - 0.5rem);
        min-height: 0;
        height: calc(100svh - var(--portal-map-desktop-offset));
        height: calc(100dvh - var(--portal-map-desktop-offset));
        gap: 0.35rem;
    }

    .portal-map-shell.is-sidebar-collapsed .portal-map-main {
        width: calc(100% - var(--portal-map-sidebar-collapsed-width) - 0.5rem);
        max-width: calc(100% - var(--portal-map-sidebar-collapsed-width) - 0.5rem);
    }

    .portal-map-mobile-header {
        display: none;
    }

    .map-panel-toggle-inline {
        display: inline-flex;
        flex: 0 0 auto;
    }

    .portal-map-shell.is-sidebar-collapsed .map-panel-toggle-rail {
        display: inline-flex;
        position: relative;
        z-index: 1;
        width: 2rem;
        min-width: 2rem;
        height: 2rem;
        padding: 0;
        border-radius: 999px;
    }

    .map-status {
        margin-bottom: 0.1rem !important;
    }

    .map-compact-controls-bar,
    .map-panel-close {
        display: none !important;
    }

    .map-tool-rail,
    .map-info-rail {
        display: flex;
    }

    .map-zoom-rail {
        display: none;
    }

    .map-canvas {
        flex: 1 1 auto;
        min-height: 0;
        height: auto;
    }

    #buttonToggleMapFilters {
        display: none;
    }

    #portalMapFilters {
        display: block !important;
        height: auto !important;
        visibility: visible !important;
    }

    .map-canvas .ol-attribution {
        display: none;
    }
}

@media (max-width: 1199px) {
    html:has(.portal-map-shell),
    body:has(.portal-map-shell) {
        overflow: hidden;
    }

    body:has(.portal-map-shell) .page-body {
        margin-top: 0 !important;
    }

    body:has(.portal-map-shell) .page-body {
        padding-top: 0;
    }

    body:has(.portal-map-shell) .page-body > .container-xl {
        max-width: 100%;
        padding-inline: 0;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    .portal-map-shell {
        --tblr-gutter-x: 0;
        --tblr-gutter-y: 0;
        --portal-map-mobile-offset: 3.5rem;
        --portal-map-mobile-bleed: 0px;
        gap: 0;
        margin: 0;
        padding-bottom: 0;
    }

    .portal-map-shell > [class*="col-"] {
        padding-right: 0;
        padding-left: 0;
    }

    .portal-map-page-title-row {
        display: none;
    }

    .portal-map-main {
        order: 1;
        width: 100%;
        max-width: 100%;
        min-height: 0;
        height: calc(100svh - var(--portal-map-mobile-offset) + var(--portal-map-mobile-bleed));
        height: calc(100dvh - var(--portal-map-mobile-offset) + var(--portal-map-mobile-bleed));
    }

    .portal-map-shell:not(.portal-report-page) .portal-map-sidebar {
        order: 2;
        display: block !important;
        position: absolute;
        left: 0;
        right: 0;
        bottom: var(--portal-visual-viewport-offset, 0px);
        z-index: 1085;
        width: 100%;
        max-width: 100%;
        padding: 0 0.5rem calc(env(safe-area-inset-bottom, 0px) + 0.5rem);
        pointer-events: none;
    }

    .portal-map-shell:not(.portal-report-page) .portal-map-sidebar .card {
        margin: 0;
        max-height: min(78vh, calc(100dvh - 4.25rem - var(--portal-visual-viewport-offset, 0px)));
        border-radius: 1rem;
        transform: translateY(calc(100% + 1rem));
        opacity: 0;
        transition: transform 0.22s ease, opacity 0.2s ease;
    }

    .portal-map-shell:not(.portal-report-page) .portal-map-sidebar.is-open {
        pointer-events: auto;
    }

    .portal-map-shell:not(.portal-report-page) .portal-map-sidebar.is-open .card {
        transform: translateY(0);
        opacity: 1;
    }

    .portal-map-shell:not(.portal-report-page) .portal-map-sidebar .card-body {
        overflow-y: auto;
        overflow-x: visible;
        max-height: min(74vh, calc(100dvh - 5.25rem - var(--portal-visual-viewport-offset, 0px)));
    }

    .map-desktop-tab-bar {
        display: none !important;
    }

    .portal-map-shell:not(.portal-report-page) .portal-map-sidebar [data-desktop-tab] {
        display: none;
    }

    .portal-map-shell [data-panel-section="activity"]:not(.is-in-map-sheet) {
        display: none !important;
    }

    .portal-map-shell:not(.portal-report-page) .portal-map-sidebar [data-desktop-tab].is-desktop-tab-active {
        display: block;
    }

    .portal-map-sidebar .panel-heading-title-desktop,
    .portal-map-sidebar .panel-heading-copy-desktop {
        display: none;
    }

    .portal-map-sidebar .panel-heading-title-compact,
    .portal-map-sidebar .panel-heading-copy-compact {
        display: block;
    }

    .portal-map-mobile-header {
        display: none !important;
    }

    .map-tool-rail {
        display: flex;
    }

    .map-tool-control-activity {
        display: flex;
    }

    .map-zoom-rail {
        display: none;
    }

    .map-info-rail {
        display: flex;
    }

    .map-canvas {
        height: 100%;
        min-height: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .map-canvas .ol-attribution,
    .map-canvas .ol-zoom,
    .map-canvas .ol-full-screen {
        display: none;
    }

    .map-panel-toggle-inline,
    .map-panel-toggle-rail {
        display: none !important;
    }

    .portal-report-page #mapToolRail [data-map-tool="toggle-secondary-tools"] {
        display: none !important;
    }

    .portal-report-page #mapToolRailSecondary,
    .portal-report-page #mapToolRailSecondary[hidden] {
        display: flex !important;
    }

    .portal-report-page .portal-report-sidebar > .portal-map-sidebar-rail,
    .portal-report-page .portal-report-sidebar > .card.map-panel,
    .portal-report-page .portal-report-sidebar > form {
        display: none !important;
    }

    .portal-report-page .portal-report-sidebar .portal-report-mobile-sheet-body > .report-form-shell--portal {
        flex: 1 1 auto;
        min-height: 0;
    }
}

@media (max-width: 1199px) {
    .portal-map-shell .ts-dropdown {
        max-height: min(62dvh, calc(100dvh - 8.5rem - var(--portal-visual-viewport-offset, 0px)));
    }
}

@media (max-width: 991px) {
    .portal-map-shell {
        --portal-map-mobile-canvas-offset: 10.75rem;
        --portal-map-mobile-canvas-offset-small: 10.75rem;
    }
}

@media (min-width: 992px) {
    .portal-map-mobile-header {
        display: none !important;
    }

    .map-tool-control-activity {
        display: none !important;
    }
}

@media (max-width: 767px) {
    .portal-map-shell {
        --map-tool-stack-gap: 6px;
    }

    .map-status {
        top: 0.6rem;
        width: min(calc(100% - 1rem), 32rem);
    }

    .map-status > div {
        padding: 0.32rem 0.72rem;
    }

    .map-expert-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .map-share-row {
        grid-template-columns: 1fr;
    }

    .map-activity-metrics,
    .map-activity-actions {
        grid-template-columns: minmax(0, 1fr);
    }

    .legend-species-list {
        grid-template-columns: minmax(0, 1fr);
    }

    .map-tool-rail {
        top: calc(0.5em + var(--map-control-button-size) + var(--map-tool-stack-gap) + var(--map-tool-rail-top-offset));
    }

    .map-canvas {
        height: 100%;
        min-height: 0;
    }
}

/* Unified map/report parity with original report page layout */
.portal-map-mobile-report-fab {
    display: none;
}

@media (min-width: 1200px) {
    .portal-map-shell:not(.portal-report-shell) {
        --portal-map-sidebar-width: max(345px, calc(33.333333% - 1.875rem));
        --portal-map-inline-popover-max-width: min(280px, calc(100vw - 40px));
    }

    .portal-map-page-title-row {
        width: var(--portal-map-sidebar-width);
    }

    .portal-map-shell [data-panel-section="report"] .report-form-shell--portal,
    .portal-map-shell [data-panel-section="report"] .report-form-shell--portal .report-form-card,
    .portal-map-shell [data-panel-section="report"] .report-form-shell--portal form {
        min-height: 0;
    }

    .portal-map-shell [data-panel-section="report"] .report-form-shell--portal {
        gap: 0;
        height: 100%;
    }

    .portal-map-shell [data-panel-section="report"] .report-form-shell--portal .report-form-card {
        height: 100%;
        display: flex;
        flex-direction: column;
        border: var(--tblr-card-border-width) solid var(--tblr-card-border-color);
        border-radius: var(--tblr-card-border-radius);
        box-shadow: var(--tblr-card-box-shadow);
        background: #ffffff;
        padding: 16px 20px 16px 20px;
    }

    .portal-map-shell [data-panel-section="report"] .report-form-shell--portal .report-form-card-header {
        margin-bottom: 0.75rem;
    }

    .portal-map-shell [data-panel-section="report"] .report-form-shell--portal .panel-heading-title-desktop,
    .portal-map-shell [data-panel-section="report"] .report-form-shell--portal .panel-heading-title-compact {
        font-size: 1rem;
        font-weight: 600;
        letter-spacing: normal;
        line-height: 1.5;
    }

    .portal-map-shell [data-panel-section="report"] .report-form-shell--portal .panel-subline {
        margin-top: 0.55rem;
        font-size: 0.875rem;
        line-height: 1.45;
    }

    .portal-map-shell [data-panel-section="report"] .report-form-shell--portal .report-panel-sections {
        display: grid;
        gap: 0;
        flex: 1 1 auto;
        min-height: 0;
        max-height: none;
        overflow-y: auto;
        overflow-x: hidden;
        padding-right: 0.2rem;
        scrollbar-gutter: stable;
    }

    .portal-map-shell [data-panel-section="report"] .report-form-shell--portal .report-form-section,
    .portal-map-shell [data-panel-section="report"] .report-form-shell--portal .report-form-context-panel {
        margin: 0;
        padding: 0.95rem 0;
        border: 0;
        border-top: 1px solid #e5e7eb;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        backdrop-filter: none;
    }

    .portal-map-shell [data-panel-section="report"] .report-form-shell--portal .report-panel-sections > :first-child {
        border-top: 0;
        padding-top: 0.2rem;
    }

    .portal-map-shell [data-panel-section="report"] .report-form-shell--portal [data-continuation-context-panel][hidden] + .report-form-section {
        border-top: 0;
        padding-top: 0.2rem;
    }

    .portal-map-shell [data-panel-section="report"] .report-form-shell--portal .visually-hidden[aria-hidden="true"] + .report-form-section {
        border-top: 0;
        padding-top: 0.2rem;
    }

    .portal-map-shell [data-panel-section="report"] .report-form-shell--portal .visually-hidden[aria-hidden="true"] + [data-continuation-context-panel][hidden] + .report-form-section {
        border-top: 0;
        padding-top: 0.2rem;
    }

    .portal-map-shell [data-panel-section="report"] .report-form-shell--portal .fast-emphasis {
        background: transparent;
    }

    .portal-map-shell [data-panel-section="report"] .report-form-shell--portal .field-grid {
        gap: 0.65rem 0.75rem;
        margin-top: 0.55rem;
    }

    .portal-map-shell [data-panel-section="report"] .report-form-shell--portal .field {
        gap: 0.3rem;
    }

    .portal-map-shell [data-panel-section="report"] .report-form-shell--portal .field label,
    .portal-map-shell [data-panel-section="report"] .report-form-shell--portal .field span {
        font-size: 0.76rem;
        font-weight: 600;
        color: #475569;
        letter-spacing: 0.02em;
    }

    .portal-map-shell [data-panel-section="report"] .report-form-shell--portal input,
    .portal-map-shell [data-panel-section="report"] .report-form-shell--portal textarea,
    .portal-map-shell [data-panel-section="report"] .report-form-shell--portal select {
        border-color: #dbe2ea;
        border-radius: 0.5rem;
        padding: 0.5rem 0.7rem;
        background: #ffffff;
        color: #0f172a;
        font-size: 0.9rem;
    }

    .portal-map-shell [data-panel-section="report"] .report-form-shell--portal select,
    .portal-map-shell [data-panel-section="report"] .report-form-shell--portal .report-select-affordance input {
        background-color: var(--tblr-bg-forms, #fff);
        border: 1px solid var(--tblr-border-color, #e5e7eb);
        border-radius: 0.375rem;
        box-shadow: 0 1px 1px rgba(31, 41, 55, 0.06);
        color: #495057;
        font-size: 0.875rem;
        line-height: 1.5;
        min-height: 44px;
        padding: 0.425rem 2.5rem 0.425rem 0.65rem;
    }

    .portal-map-shell [data-panel-section="report"] .report-form-shell--portal select {
        appearance: none;
        background-image: var(--tblr-form-select-bg-img, url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%239ca3af' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"));
        background-repeat: no-repeat;
        background-position: right 1rem center;
        background-size: 16px 12px;
    }
}

@media (max-width: 1199px) {
    .portal-map-mobile-report-fab {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        left: 50%;
        right: auto;
        bottom: calc(env(safe-area-inset-bottom, 0px) + 0.55rem);
        z-index: 1080;
        width: 3.4rem;
        height: 3.4rem;
        border: 0;
        border-radius: 999px;
        background: #2563eb;
        color: #ffffff;
        box-shadow: 0 12px 28px rgba(37, 99, 235, 0.38);
        pointer-events: auto;
        transform: translateX(-50%);
    }

    .portal-map-mobile-report-fab i {
        font-size: 1.45rem;
        line-height: 1;
    }
}

@media (min-width: 1200px) {
    /* Prevent redundant double-scroll in report tab: keep only inner form scroller */
    #portalMapSidebar[data-active-desktop-tab="report"] .map-panel-sections {
        overflow-y: hidden;
        padding-right: 0;
    }

    #portalMapSidebar[data-active-desktop-tab="report"] [data-panel-section="report"] .report-form-shell--portal .report-panel-sections {
        overflow-y: auto;
        padding-right: 0.2rem;
    }
}

@media (min-width: 1200px) {
    /* Map-embedded report form refinements: compact header/toggles and right-edge scroll alignment */
    .portal-map-shell [data-panel-section="report"] .report-form-shell--portal .panel-heading-title-desktop,
    .portal-map-shell [data-panel-section="report"] .report-form-shell--portal .panel-heading-title-compact,
    .portal-map-shell [data-panel-section="report"] .report-form-shell--portal .panel-heading-copy-desktop,
    .portal-map-shell [data-panel-section="report"] .report-form-shell--portal .panel-heading-copy-compact {
        display: none;
    }

    .portal-map-shell [data-panel-section="report"] .report-form-shell--portal .report-form-card {
        padding: 14px 12px 14px 16px;
    }

    .portal-map-shell [data-panel-section="report"] .report-form-shell--portal .report-form-card-header {
        margin-bottom: 0.35rem;
        gap: 0.45rem;
        align-items: center;
    }

    .portal-map-shell [data-panel-section="report"] .report-form-shell--portal .mode-toggle {
        gap: 15px;
        padding: 3px;
        border: 1px solid #dbe2ea;
        background: #f8fafc;
    }

    .portal-map-shell [data-panel-section="report"] .report-form-shell--portal .mode-button {
        padding: 6px 10px;
        font-size: 0.8rem;
        font-weight: 600;
        line-height: 1.1;
        color: #475569;
    }

    .portal-map-shell [data-panel-section="report"] .report-form-shell--portal .mode-button.is-active {
        background: #dbeafe;
        color: #1d4ed8;
        box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.08);
    }

    .portal-map-shell [data-panel-section="report"] .report-form-shell--portal .report-panel-sections,
    #portalMapSidebar[data-active-desktop-tab="report"] [data-panel-section="report"] .report-form-shell--portal .report-panel-sections {
        display: block;
        margin-left: -12px;
        padding-right: 12px;
        margin-right: -12px;
        scrollbar-gutter: auto;
    }
}

@media (min-width: 1200px) {
    /* Report panel refinements requested in QA round */

    .portal-map-shell [data-panel-section="report"] .report-form-shell--portal .report-form-card {
        border: 0;
        box-shadow: none;
        padding: 0px 12px 14px 12px;
    }

    .portal-map-shell [data-panel-section="report"] .report-form-shell--portal .report-location-actions.report-inline-top-gap {
        margin-top: 6px;
    }

    .portal-map-shell [data-panel-section="report"] .report-form-shell--portal .report-location-actions + .field-grid.report-top-gap {
        margin-top: 8px;
    }

    #portalMapSidebar[data-active-desktop-tab="report"] [data-panel-section="report"] .report-form-shell--portal .report-panel-sections {
        max-height: none;
        min-height: 0;
        height: auto;
        padding-bottom: 0;
        overscroll-behavior: contain;
    }

    /* Keep action controls identical to original report form styling */
    .portal-map-shell [data-panel-section="report"] .report-form-shell--portal .primary-button,
    .portal-map-shell [data-panel-section="report"] .report-form-shell--portal .secondary-button {
        min-height: 44px;
        padding: 0.65rem 1rem;
        font-size: 0.88rem;
        font-weight: 600;
        border-radius: 0.5rem;
        transition: none;
    }

    .portal-map-shell [data-panel-section="report"] .report-form-shell--portal .primary-button {
        background: #2563eb;
        color: #fff8ef;
        box-shadow: none;
    }

    .portal-map-shell [data-panel-section="report"] .report-form-shell--portal .secondary-button {
        background: #ffffff;
        color: #475569;
        border: 1px solid #dbe2ea;
        box-shadow: none;
    }

    .portal-map-shell [data-panel-section="report"] .report-form-shell--portal .primary-button:hover,
    .portal-map-shell [data-panel-section="report"] .report-form-shell--portal .secondary-button:hover {
        transform: none;
        box-shadow: none;
    }

    .portal-map-shell [data-panel-section="report"] .report-form-shell--portal [data-geolocate-button],
    .portal-map-shell [data-panel-section="report"] .report-form-shell--portal [data-submit-button] {
        width: 100%;
        justify-content: center;
    }

    .portal-map-shell [data-panel-section="report"] .report-form-shell--portal #id_media {
        padding: 0.35rem;
        line-height: 1.35;
    }

    .portal-map-shell [data-panel-section="report"] .report-form-shell--portal #id_media::file-selector-button {
        margin-right: 0.65rem;
        padding: 0.45rem 0.7rem;
        border: 1px solid #dbe2ea;
        border-radius: 0.45rem;
        background: #f8fafc;
        color: #334155;
        font: inherit;
        font-size: 0.84rem;
        font-weight: 600;
        cursor: pointer;
    }

    .portal-map-shell [data-panel-section="report"] .report-form-shell--portal .report-location-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        column-gap: 0.55rem;
        row-gap: 0.55rem;
        align-items: center;
    }

    .portal-map-shell [data-panel-section="report"] .report-form-shell--portal .report-location-actions .report-inline-info {
        position: static;
        justify-self: end;
    }

    .portal-map-shell [data-panel-section="layers"] .map-reference-inline-info {
        position: relative;
        overflow: visible;
    }

    .portal-map-shell [data-panel-section="report"] .report-form-shell--portal .report-location-actions .report-location-feedback {
        grid-column: 1 / -1;
    }

    .portal-map-shell [data-panel-section="layers"] .map-reference-inline-info .report-inline-info-popover {
        position: absolute;
        display: none;
        top: auto;
        bottom: calc(100% + 8px);
        left: auto;
        right: 0;
        z-index: 1200;
        width: 280px;
        max-width: var(--portal-map-inline-popover-max-width);
        padding: 10px 12px;
        border: 1px solid rgba(24, 38, 31, 0.12);
        border-radius: 12px;
        background: #f8fbff;
        color: #18261f;
        font-size: 0.84rem;
        font-weight: 400;
        line-height: 1.45;
        letter-spacing: normal;
        text-transform: none;
        box-shadow: 0 18px 36px rgba(24, 38, 31, 0.18);
        white-space: normal;
        overflow-wrap: anywhere;
        opacity: 0;
        transform: translateY(-4px);
        pointer-events: none;
        transition: opacity 140ms ease, transform 140ms ease;
    }

    .portal-map-shell [data-panel-section="layers"] .map-reference-inline-info.is-open .report-inline-info-popover {
        display: block;
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }
}

@media (min-width: 1200px) {
    /* Fix report form end clipping: constrain panel and keep form-body as sole scroller */
    #portalMapSidebar[data-active-desktop-tab="report"] .map-panel-sections {
        display: flex;
        flex-direction: column;
        min-height: 0;
        overflow-x: visible;
        overflow-y: hidden;
    }

    #portalMapSidebar[data-active-desktop-tab="report"] [data-panel-section="report"] {
        display: flex;
        flex-direction: column;
        flex: 1 1 auto;
        min-height: 0;
    }

    #portalMapSidebar[data-active-desktop-tab="report"] [data-panel-section="report"] .report-form-shell--portal,
    #portalMapSidebar[data-active-desktop-tab="report"] [data-panel-section="report"] .report-form-card {
        display: flex;
        flex-direction: column;
        flex: 1 1 auto;
        min-height: 0;
        height: auto;
    }

    #portalMapSidebar[data-active-desktop-tab="report"] [data-panel-section="report"] .report-form-shell--portal .report-panel-sections {
        flex: 1 1 auto;
        min-height: 0;
        height: auto;
        max-height: none;
        overflow-y: auto;
        padding-bottom: 0;
    }
}
