:root {
    --accent-color: #64b5f6;
    --accent-light: #91cfff;
    --accent-hover: #79c1f8;
    --accent-rgb: 100, 181, 246;

    --accent-primary: var(--accent-color);
    --accent-green: var(--accent-color);
}

@font-face {
    font-family: 'Aliceregular';
    src: url('../fonts/alice-fontfacekit/web%20fonts/alice_regular_macroman/Alice-Regular-webfont.woff2') format('woff2'),
         url('../fonts/alice-fontfacekit/web%20fonts/alice_regular_macroman/Alice-Regular-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

/* HTML label overlay container */
#map-label-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 5;
}

.map-zone-label {
    position: absolute;
    font-family: 'Nunito', system-ui, -apple-system, sans-serif;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    transform: translate(-50%, -50%);
    transition: opacity 0.2s ease, font-size 0.2s ease;
    letter-spacing: 0.02em;
    user-select: none;
    pointer-events: none;
}

/* PAGE: MAPS TILE OVERRIDES AND LAYOUT */
html.page-maps-tile-html {
    height: 100% !important;
    height: 100dvh !important;
    overflow: hidden !important;
    width: 100% !important;
}

body.page-maps-tile {
    --overlay-bg: rgba(0, 0, 0, 0.42);
    display: flex;
    flex-direction: column;
    height: 100% !important;
    height: 100vh !important;
    height: 100dvh !important;
    width: 100% !important;
    position: fixed !important;
    inset: 0 !important;
    overflow: hidden !important;
    background-color: var(--color-bg);
}

/* Sticky top header consistent with site */
.page-maps-tile .intro-header {
    position: relative;
    z-index: 2000;
    padding: calc(0.55rem + env(safe-area-inset-top, 0px)) 1.25rem 0.55rem 1.25rem !important;
    text-align: left;
    background: #0a0a0a;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: none;
    flex-shrink: 0;
}


.page-maps-tile .logo--header {
    height: 52px;
    width: auto;
    max-width: 180px;
    margin-bottom: 0;
    display: block;
    object-fit: contain;
}

/* Main Tile Interface Layout */
.maps-tile-main {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    /* Important for flex child overflow scrolling */
    width: 100%;
}

/* Header Row inside Sidebar */
.maps-tile-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: calc(0.75rem + env(safe-area-inset-top, 0px)) 1rem 0.4rem 1rem !important;
    background: #000000;
    border-bottom: none !important;
    flex-shrink: 0;
    gap: 0.6rem;
    position: relative;
    z-index: 100 !important;
    width: 100%;
}

.maps-tile-header__left {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    min-width: 0;
}

.header-view-tabs {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.header-view-tab {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 9999px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.78rem;
    font-weight: 500;
    padding: 0.22rem 0.65rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    line-height: 1.2;
}

.header-view-tab:hover {
    background: rgba(var(--accent-rgb), 0.18);
    border-color: rgba(var(--accent-rgb), 0.4);
    color: var(--accent-primary);
}

.header-view-toggle-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

/* Header View Toggle Dropdown Button (Transparent background fill, no outline) */
.header-view-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.65rem;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    border-radius: 6px;
    color: #a1a1aa;
    font-family: 'Roboto', system-ui, -apple-system, sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    cursor: pointer;
    line-height: 1;
    white-space: nowrap;
    transition: all var(--transition-fast);
    flex-shrink: 0;
    margin-left: 0.2rem;
}

.header-view-toggle__icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #a1a1aa;
    transition: color var(--transition-fast);
}

.header-view-toggle:hover .header-view-toggle__icon-wrap {
    color: #ffffff;
}

.header-view-toggle__icon-wrap svg {
    width: 12px;
    height: 12px;
    stroke: currentColor;
    stroke-width: 2.2;
}

.header-view-toggle:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff;
}

.header-view-toggle[aria-expanded="true"] .header-view-toggle__chevron {
    transform: rotate(180deg);
}

.header-view-toggle__chevron {
    width: 11px;
    height: 11px;
    stroke: #a1a1aa;
    stroke-width: 2.5;
    transition: transform var(--transition-fast), stroke var(--transition-fast);
}

.header-view-toggle:hover .header-view-toggle__chevron {
    stroke: #ffffff;
}

/* Floating Options Dropdown Popup Menu (Black fill, 333333 outline, rounded edges matching help popup) */
.header-view-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0 !important;
    left: auto !important;
    z-index: 99999999 !important;
    min-width: 145px;
    background: #000000 !important;
    border: 1px solid #333333 !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.9) !important;
    border-radius: 12px !important;
    padding: 0.35rem !important;
    display: none;
    flex-direction: column;
    gap: 0.15rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.header-view-menu[aria-hidden="false"] {
    display: flex !important;
    animation: menuFadeIn 0.15s cubic-bezier(0, 0, 0.2, 1) forwards;
}

@keyframes menuFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header-view-menu__left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.header-view-menu__icon {
    width: 13px;
    height: 13px;
    stroke: #e4e4e7;
    stroke-width: 2.2;
    flex-shrink: 0;
    transition: stroke var(--transition-fast);
}

.header-view-menu__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.45rem 0.65rem;
    border-radius: 8px;
    color: #e4e4e7 !important;
    font-family: 'Roboto', system-ui, -apple-system, sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    user-select: none;
    gap: 1rem;
}

.header-view-menu__item:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff !important;
}

.header-view-menu__item:hover .header-view-menu__icon {
    stroke: #ffffff;
}

.header-view-menu__item.is-active {
    color: var(--accent-primary) !important;
    font-weight: 600;
}

.header-view-menu__item.is-active .header-view-menu__icon {
    stroke: var(--accent-primary);
}

.header-view-menu__check {
    stroke: var(--accent-primary);
    stroke-width: 2.5;
    flex-shrink: 0;
}

.maps-tile-header__center {
    display: flex;
    align-items: center;
}

.maps-tile-header__title {
    margin: 0 !important;
    font-family: 'Roboto', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #e4e4e7 !important;
    line-height: 1.2;
    flex: 1;
    min-width: 0;
    white-space: normal;
    word-break: break-word;
    overflow: hidden;
    /* Cap at 2 lines: 2 * line-height (1.2em) */
    max-height: calc(1.2em * 2);
}

.maps-tile-header__actions {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    flex-wrap: nowrap;
    width: auto;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    background: rgba(0, 0, 0, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border-radius: 20px;
    padding: 4px;
    gap: 4px;
    margin-top: 0.75rem !important;
    margin-left: 0 !important;
    margin-right: auto !important;
}

.maps-tile-header__actions::-webkit-scrollbar {
    display: none;
}

.action-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    height: 26px !important;
    width: auto !important;
    padding: 0 0.65rem !important;
    background: transparent;
    border: none;
    border-radius: 16px !important;
    color: #d1d1d6 !important;
    font-size: 0.78rem !important;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    position: relative;
    flex-shrink: 0 !important;
}

.action-icon-btn span {
    display: inline-block !important;
    font-size: 0.78rem !important;
    white-space: nowrap;
    color: #d1d1d6;
    transition: color var(--transition-fast);
}

.action-icon-btn:hover,
.action-icon-btn.is-active {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    color: var(--accent-primary) !important;
    transform: none !important;
}

.action-icon-btn:hover span,
.action-icon-btn.is-active span {
    color: var(--accent-primary) !important;
}

.action-icon-btn:hover svg,
.action-icon-btn.is-active svg {
    stroke: var(--accent-primary) !important;
}

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

.action-icon-btn svg {
    width: 14px !important;
    height: 14px !important;
    stroke: #d1d1d6;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
    transition: stroke var(--transition-fast);
}

/* Content Row (Specification section 2) */
.maps-tile-content {
    display: flex;
    flex: 1;
    min-height: 0;
    width: 100%;
    position: relative;
}

/* Mobile Resize Bar (Hidden on Desktop) */
.mobile-resize-bar {
    display: none;
}

/* Left 1/4 Width: Independent Scrollbox Sidebar */
.maps-tile-sidebar {
    width: 25%;
    min-width: 280px;
    max-width: 380px;
    background: #000000;
    border-right: none;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}



.maps-tile-sidebar__header {
    padding: 0.6rem 0.75rem;
    background: #000000;
    border-bottom: none;
    display: flex;
    align-items: center;
    position: relative;
    overflow: visible;
    min-height: 48px;
    box-sizing: border-box;
    z-index: 10;
}

.maps-tile-sidebar__header::after {
    content: "";
    position: absolute;
    top: calc(100% - 1px);
    left: 0;
    right: 0;
    height: 32px;
    background: linear-gradient(to bottom, #000000 0%, rgba(0, 0, 0, 0) 100%);
    pointer-events: none;
    z-index: 20;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.maps-tile-sidebar__header.is-scrolled::after {
    opacity: 1;
}

.sidebar-capsules-wrapper {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.sidebar-capsules-scroll {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.5rem;
    flex: 1;
    min-width: 0;
}

.sidebar-back-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    margin-top: 3px;
    background: transparent !important;
    border: none !important;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.sidebar-back-btn.is-disabled,
.sidebar-back-btn:disabled,
.sidebar-back-btn[disabled] {
    opacity: 0.22 !important;
    cursor: default !important;
    pointer-events: none !important;
}

.sidebar-back-btn:not(.is-disabled):not(:disabled):hover {
    background: transparent !important;
    color: #ffffff;
    transform: translateX(-2px);
}

.sidebar-search-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.sidebar-search-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

/* Expanded Full-Row Search Field */
.sidebar-search-expanded {
    position: absolute;
    inset: 0;
    padding: 0.4rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #000000;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 30;
}

.maps-tile-sidebar__header.is-searching .sidebar-capsules-wrapper {
    opacity: 0;
    pointer-events: none;
    transform: translateY(4px);
}

.maps-tile-sidebar__header.is-searching .sidebar-search-expanded {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.sidebar-search-input-container {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.sidebar-search-input-icon {
    position: absolute;
    left: 10px;
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
}

.sidebar-search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 0.35rem 0.75rem 0.35rem 2rem;
    color: #ffffff;
    font-size: 16px !important;
    outline: none;
    transition: border-color var(--transition-fast);
}

.sidebar-search-input:focus {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-search-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    flex-shrink: 0;
    transition: color var(--transition-fast);
}

.sidebar-search-close-btn:hover {
    color: #ffffff;
}

.sidebar-capsule {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.85rem;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    outline: none;
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.sidebar-capsule:hover {
    background: rgba(255, 255, 255, 0.09);
    color: rgba(255, 255, 255, 0.7);
}

.sidebar-capsule.is-active,
.sidebar-capsule.is-active:hover {
    background: rgba(var(--accent-rgb), 0.16) !important;
    color: var(--accent-primary) !important;
    font-weight: 700;
}

.sidebar-capsule--icon {
    padding: 0.35rem 0.6rem;
    justify-content: center;
}

.maps-tile-sidebar__scroll {
    flex: 1;
    overflow-y: auto;
    padding: 0.25rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

/* Custom Minimalist Floating Scrollbar for sidebar list */
.maps-tile-sidebar__scroll::-webkit-scrollbar {
    width: 4px;
}

.maps-tile-sidebar__scroll::-webkit-scrollbar-track {
    background: transparent;
}

.maps-tile-sidebar__scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 10px;
}

.maps-tile-sidebar__scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* Sidebar Empty State for Zone Subset Features View */
.sidebar-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3.5rem 1.5rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.88rem;
    font-weight: 500;
    gap: 0.75rem;
}

.sidebar-empty-state__icon {
    color: rgba(255, 255, 255, 0.35);
    display: block;
}

.sidebar-empty-state__text {
    letter-spacing: 0.03em;
}

/* Sidebar Overview View Panel */
.sidebar-about-panel,
.sidebar-about-wrapper {
    display: flex;
    flex-direction: column;
    padding: 0.4rem 0.75rem 1.25rem 0.75rem;
    color: rgba(255, 255, 255, 0.85);
}

.sidebar-about-content {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

/* Sidebar Overview People Section */
.sidebar-overview-people {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.35rem;
    width: 100%;
}

.sidebar-overview-people__header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0.2rem 0.25rem 0.2rem 0.25rem;
    user-select: none;
}

.sidebar-overview-people__title {
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--text-color);
    letter-spacing: -0.01em;
}

.sidebar-overview-people__table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    margin-top: 0.15rem;
}

.sidebar-overview-people__table th {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--subtext-color, rgba(255, 255, 255, 0.45));
    padding: 0.4rem 0.35rem;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}

.sidebar-overview-people__th-role {
    width: 42%;
}

.sidebar-overview-people__th-name {
    width: 58%;
}

.sidebar-overview-people__table td {
    padding: 0.65rem 0.35rem;
    font-size: 0.88rem;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.sidebar-overview-people__td-role {
    color: var(--subtext-color, rgba(255, 255, 255, 0.7));
    font-weight: 400;
}

.sidebar-overview-people__person {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.sidebar-overview-people__person-name {
    font-weight: 400;
    color: var(--text-color);
}

.sidebar-overview-people__actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.sidebar-overview-people__icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--subtext-color, rgba(255, 255, 255, 0.6));
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
    padding: 0;
    line-height: 1;
}

.sidebar-overview-people__icon-btn:hover {
    color: var(--accent-color);
    transform: scale(1.15);
}

/* Sidebar Overview Resources Section */
.sidebar-overview-resources {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.5rem;
    width: 100%;
}

.sidebar-overview-resources__header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0.2rem 0.25rem 0.2rem 0.25rem;
    user-select: none;
}

.sidebar-overview-resources__title {
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--text-color);
    letter-spacing: -0.01em;
}

.sidebar-overview-resources__empty {
    font-size: 0.84rem;
    color: var(--subtext-color, rgba(255, 255, 255, 0.45));
    font-style: italic;
    padding: 0.2rem 0.35rem;
}

/* Sidebar Overview Feature Preview Section (below Organizers) */
.sidebar-overview-preview {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 0.5rem;
    margin-bottom: 0.25rem;
    padding-bottom: 0;
    border-bottom: none;
    width: 100%;
}

.sidebar-overview-preview__header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0.35rem 0.25rem 0.6rem 0.25rem;
    user-select: none;
}

.sidebar-overview-preview__title {
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--text-color);
    letter-spacing: -0.01em;
}

.sidebar-overview-preview__footer {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0.65rem 0.35rem 0.15rem 0.35rem;
    margin-top: 0.35rem;
    background: transparent;
    border: none;
    cursor: pointer;
    user-select: none;
    width: 100%;
    transition: opacity 0.2s ease;
}

.sidebar-overview-preview__footer:hover {
    opacity: 0.8;
}

.sidebar-overview-preview__action {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent-color);
}

.sidebar-overview-preview__list {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    max-height: 218px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 0.2rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.sidebar-overview-preview__list::-webkit-scrollbar {
    width: 4px;
}

.sidebar-overview-preview__list::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-overview-preview__list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.sidebar-overview-preview__list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.overview-preview-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.68rem 0.35rem;
    min-height: 42px;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background-color 0.2s ease, padding 0.2s ease;
    user-select: none;
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
}

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

.overview-preview-item:hover {
    background: rgba(255, 255, 255, 0.04);
    padding-left: 0.65rem;
    padding-right: 0.65rem;
    border-radius: 6px;
}

.overview-preview-item__name {
    font-size: 0.92rem;
    font-weight: 400;
    color: var(--text-color);
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.overview-preview-item:hover .overview-preview-item__name {
    color: var(--accent-primary, var(--accent-color));
}

[data-theme="light"] .overview-preview-item:hover,
html.theme-light .overview-preview-item:hover,
body.theme-light .overview-preview-item:hover {
    background: rgba(0, 0, 0, 0.035);
}

.overview-preview-item--bird {
    cursor: pointer !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

.overview-preview-item--bird .overview-preview-item__ext,
.tile-zone-item--bird-link .tile-zone-item__ext-icon {
    opacity: 0.35;
    transition: opacity var(--transition-fast), transform var(--transition-fast), color var(--transition-fast);
    flex-shrink: 0;
}

.overview-preview-item--bird:hover .overview-preview-item__ext,
.tile-zone-item--bird-link:hover .tile-zone-item__ext-icon {
    opacity: 0.95;
    color: var(--accent-primary) !important;
    transform: translate(1px, -1px);
}

.tile-zone-item--bird-link {
    cursor: pointer !important;
    text-decoration: none !important;
}

.tile-zone-item--bird-link .tile-zone-item__title {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
}

.tile-zone-item--bird-link:hover .tile-zone-item__title span {
    color: var(--accent-primary) !important;
}

.tile-zone-item__ext-btn,
.overview-preview-item__ext-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    text-decoration: none;
    padding: 2px 4px;
    border-radius: 4px;
}

.tile-zone-item__ext-btn:hover,
.overview-preview-item__ext-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .tile-zone-item__ext-btn:hover,
[data-theme="light"] .overview-preview-item__ext-link:hover,
html.theme-light .tile-zone-item__ext-btn:hover,
html.theme-light .overview-preview-item__ext-link:hover,
body.theme-light .tile-zone-item__ext-btn:hover,
body.theme-light .overview-preview-item__ext-link:hover {
    background: rgba(0, 0, 0, 0.06);
}

/* iNaturalist Bird Observations in Map */
.bird-observation-popup .maplibregl-popup-content {
    background: #0f172a;
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 0.75rem 0.85rem;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    font-family: inherit;
    max-width: 260px;
}

[data-theme="light"] .bird-observation-popup .maplibregl-popup-content,
html.theme-light .bird-observation-popup .maplibregl-popup-content,
body.theme-light .bird-observation-popup .maplibregl-popup-content {
    background: #ffffff;
    color: #0f172a;
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.bird-observation-popup .maplibregl-popup-close-button {
    color: inherit;
    padding: 4px 8px;
    font-size: 14px;
}

.bird-obs-popup__img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    background: #000000;
}

.bird-obs-popup__title {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.bird-obs-popup__meta {
    font-size: 0.8rem;
    color: #94a3b8;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

[data-theme="light"] .bird-obs-popup__meta,
html.theme-light .bird-obs-popup__meta,
body.theme-light .bird-obs-popup__meta {
    color: #64748b;
}

.bird-obs-popup__link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-primary, #00ff48);
    text-decoration: none;
}

.bird-obs-popup__link:hover {
    text-decoration: underline;
}

/* Bird Selection Panel in Sidebar */
.sidebar-bird-panel {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 0.25rem 0.25rem 1rem 0.25rem;
}

.sidebar-bird-panel__card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

[data-theme="light"] .sidebar-bird-panel__card,
html.theme-light .sidebar-bird-panel__card,
body.theme-light .sidebar-bird-panel__card {
    background: #f8fafc;
    border-color: rgba(0, 0, 0, 0.08);
}

.sidebar-bird-panel__ebird-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.6rem 1.25rem;
    background: var(--accent-color, #64b5f6);
    color: #000000 !important;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-fast);
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    width: 100%;
}

.sidebar-bird-panel__ebird-btn:hover {
    background: var(--accent-hover, #79c1f8);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    color: #000000 !important;
}

.sidebar-bird-panel__ebird-btn svg {
    stroke: #000000;
}

.sidebar-bird-panel__obs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-color);
}

.sidebar-bird-panel__count-badge {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent-primary);
}

.sidebar-bird-obs-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.65rem;
    border-radius: 6px;
    cursor: pointer;
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all var(--transition-fast);
}

[data-theme="light"] .sidebar-bird-obs-item,
html.theme-light .sidebar-bird-obs-item,
body.theme-light .sidebar-bird-obs-item {
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

.sidebar-bird-obs-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .sidebar-bird-obs-item:hover,
html.theme-light .sidebar-bird-obs-item:hover,
body.theme-light .sidebar-bird-obs-item:hover {
    background: rgba(0, 0, 0, 0.04);
}

.sidebar-bird-obs-item__thumb {
    width: 38px;
    height: 38px;
    border-radius: 4px;
    object-fit: cover;
    background: #000000;
    flex-shrink: 0;
}

.sidebar-bird-obs-item__info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.sidebar-bird-obs-item__user {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-bird-obs-item__date {
    font-size: 0.76rem;
    color: #94a3b8;
}

[data-theme="light"] .sidebar-bird-obs-item__date,
html.theme-light .sidebar-bird-obs-item__date,
body.theme-light .sidebar-bird-obs-item__date {
    color: #64748b;
}

.sidebar-about-text {
    font-size: 0.88rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.65);
    margin: 0;
    font-weight: 400;
}

.sidebar-about-media {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.08);
    aspect-ratio: 16 / 10;
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-top: 0.25rem;
}

.sidebar-about-media:hover {
    border-color: rgba(var(--accent-rgb), 0.5);
    transform: scale(1.015);
}

.sidebar-about-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Sidebar List Item (Line divider between tiles, no box outline) */
.tile-zone-item {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 1.0rem;
    align-items: center;
    padding: 0.65rem 0.65rem !important;
    background: transparent !important;
    border: none !important;
    border-bottom: none !important;
    border-radius: 10px !important;
    color: #ffffff;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.tile-zone-item:last-child {
    border-bottom: none !important;
}

.tile-zone-item:hover,
.tile-zone-item.is-hovered {
    background: rgba(255, 255, 255, 0.08) !important;
    border-radius: 10px !important;
}

.tile-zone-item:hover .tile-zone-item__title,
.tile-zone-item.is-hovered .tile-zone-item__title {
    color: #ffffff !important;
}

.tile-zone-item.is-active {
    background: rgba(var(--accent-rgb), 0.08) !important;
    border-radius: 10px !important;
}

.tile-zone-item.is-active .tile-zone-item__title {
    color: var(--accent-primary) !important;
    font-weight: 700;
}

.tile-zone-item__thumb {
    aspect-ratio: 4 / 3;
    border-radius: 4px;
    overflow: hidden;
    background: #000000;
}

.tile-zone-item__thumb-placeholder {
    aspect-ratio: 4 / 3;
    border-radius: 4px;
    overflow: hidden;
    background: transparent;
    color: #ffffff;
    opacity: 0.35;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.tile-zone-item__thumb-placeholder svg {
    width: 22px;
    height: 22px;
}

.tile-zone-item__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background-color: #000000;
}

.tile-zone-item__thumb svg {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 4px;
}

.tile-zone-item__thumb--logo img {
    object-fit: contain;
    padding: 6px;
    box-sizing: border-box;
    background-color: #000000;
}

.tile-zone-item__info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.tile-zone-item__title {
    font-family: 'Roboto', sans-serif;
    font-size: 0.95rem;
    font-weight: 400;
    color: #e4e4e7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color var(--transition-fast);
}

.tile-zone-item.is-active .tile-zone-item__title {
    color: var(--color-focus);
}

.tile-zone-item__meta {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tile-zone-item__meta-item {
    white-space: nowrap;
}

.tile-zone-item__meta-prefix {
    color: #45c466;
    font-weight: 700;
    margin-right: 0.15rem;
}

.tile-zone-item--organizer {
    grid-template-columns: 80px 1fr auto !important;
    cursor: default;
}

.tile-zone-item__thumb--organizer {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: rgba(255, 255, 255, 0.65) !important;
    border-radius: 4px !important;
}

.tile-zone-item__thumb--organizer svg {
    width: 24px !important;
    height: 24px !important;
    display: block !important;
    background: transparent !important;
}

.tile-zone-item__thumb--organizer svg path,
.tile-zone-item__thumb--organizer svg circle {
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 1.8 !important;
}

.tile-zone-item--no-thumb {
    display: block !important;
    padding: 0.6rem 0.75rem !important;
    cursor: default;
}

.tile-zone-item__actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding-right: 0.25rem;
}

.tile-zone-item__thumb--bird {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: rgba(255, 255, 255, 0.65) !important;
    border-radius: 4px !important;
}

.tile-zone-item__thumb--bird svg {
    width: 24px !important;
    height: 24px !important;
    display: block !important;
    background: transparent !important;
}

.tile-zone-item__thumb--bird svg path,
.tile-zone-item__thumb--bird svg circle {
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 1.8 !important;
}

.sidebar-birds-intro {
    padding: 0.4rem 0.5rem 0.75rem 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    line-height: 1.55;
    color: var(--subtext-color, rgba(255, 255, 255, 0.75));
    border-bottom: 1px solid var(--border-color);
}

/* Circle Reset / Overview button in Sidebar */
.circle-overview-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 0.85rem;
    background: rgba(0, 255, 72, 0.06);
    border: 1px dashed rgba(0, 255, 72, 0.3);
    border-radius: var(--radius-sm);
    color: var(--color-focus);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.circle-overview-item:hover {
    background: rgba(0, 255, 72, 0.14);
    border-color: var(--color-focus);
}

.circle-overview-item.is-active {
    background: rgba(0, 255, 72, 0.18);
    border-style: solid;
}

/* Right 3/4 Width Map Area with Margins on All Sides */
.maps-tile-map-area {
    flex: 1;
    height: auto; /* Let flexbox stretch handle height with margins */
    margin-top: 0; /* Bar now fills the gap itself */
    padding: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    min-height: 0;
    position: relative;
    overflow: hidden; /* Clips the map as the back bar expands */
}

/* Desktop nav tabs container sitting in the gap above the map frame */
.desktop-nav-tabs {
    display: flex;
    flex-direction: row;
    gap: 2px;
    width: 100%;
    /* Half the sidebar selection header height */
    height: calc(18px + 0.4rem);
    margin-bottom: 0.45rem;
    flex-shrink: 0;
    transition: height 0.5s cubic-bezier(0.25, 1, 0.5, 1), margin-bottom 0.5s cubic-bezier(0.25, 1, 0.5, 1), gap 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: height, margin-bottom, gap;
}

.desktop-nav-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1;
    height: 100%;
    background: #0f0f0f;
    text-decoration: none;
    color: var(--color-text-muted, rgba(255,255,255,0.45));
    cursor: pointer;
    transition: color 0.18s ease, background 0.18s ease, height 0.5s cubic-bezier(0.25, 1, 0.5, 1), border-radius 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: height, border-radius;
}

.desktop-nav-tab__label {
    font-size: 0.65rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.02em;
    white-space: nowrap;
    transition: color 0.18s ease;
}

.desktop-nav-tab:hover .desktop-nav-tab__label {
    color: rgba(255, 255, 255, 0.85);
}

#desktop-nav-tab-tools {
    border-radius: 0 0 0 24px; /* bottom-left rounded (outer: 24px), bottom-right straight */
}

#desktop-nav-tab-home {
    border-radius: 0;          /* middle: both straight */
}

#desktop-nav-tab-settings {
    border-radius: 0 0 24px 0; /* bottom-right rounded outer corner */
}

.desktop-nav-tab__icon {
    display: block;
    filter: invert(1) brightness(0.45) grayscale(100%);  /* match the muted text colour and desaturate */
    transition: opacity 0.3s ease, filter 0.18s ease;
}

.desktop-nav-tab__icon--home {
    width: 12px;
    height: 12px;
}

.desktop-nav-tab__icon--tools,
.desktop-nav-tab__icon--settings {
    width: 14px;
    height: 14px;
}

.desktop-nav-tab:hover .desktop-nav-tab__icon {
    filter: invert(1) brightness(0.85) grayscale(100%);
}

.desktop-nav-tab:hover {
    color: rgba(255, 255, 255, 0.85);
    background: #1c1c1c;
}

/* Map loading placeholder covering map with slightly brighter grey than view tabs (#0f0f0f) */
#map-loading-placeholder {
    display: none !important;
}

/* Page transition overlay: starts full black in dark mode, full white in light mode, loads elements behind scenes, fades out */
#page-transition-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    z-index: 999999;
    opacity: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: all;
    will-change: opacity;
}

.page-loader-spinner {
    width: 52px;
    height: 52px;
    border: 3.5px solid rgba(255, 255, 255, 0.15);
    border-top-color: var(--accent-primary, #64b5f6);
    border-radius: 50%;
    animation: pageLoaderSpin 0.8s cubic-bezier(0.4, 0.1, 0.4, 0.9) infinite;
    box-sizing: border-box;
}

[data-theme="light"] .page-loader-spinner,
html.theme-light .page-loader-spinner,
body.theme-light .page-loader-spinner {
    border-color: rgba(0, 0, 0, 0.10);
    border-top-color: var(--accent-primary, #64b5f6);
}

@keyframes pageLoaderSpin {
    to { transform: rotate(360deg); }
}

[data-theme="light"] #page-transition-overlay,
html.theme-light #page-transition-overlay,
body.theme-light #page-transition-overlay {
    background: #ffffff !important;
}

#page-transition-overlay.is-loaded {
    opacity: 0 !important;
    pointer-events: none !important;
}

#page-transition-overlay.is-active {
    opacity: 1 !important;
    pointer-events: all !important;
}



/* Leaflet Window Container extending to edges */
.maps-tile-map-container {
    flex: 1;
    height: 100%;
    width: 100%;
    position: relative;
    background: #090b0a;
    border-radius: 24px 0 0 0 !important;
    overflow: hidden !important;
    box-shadow: none;
    border: none;
}

/* Dark gradient fade overlay on all sides of the map frame */
.map-fade-overlay {
    display: none !important;
}

/* Map hint text (no box, slides up on cursor hover) */
.map-fullscreen-hint {
    position: absolute;
    bottom: 16px;
    right: 16px;
    z-index: 600;
    background: transparent;
    color: rgba(200, 200, 200, 0.8);
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0;
    border: none;
    pointer-events: none;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.maps-tile-map-container:hover .map-fullscreen-hint {
    opacity: 1;
    transform: translateY(0);
    color: rgba(230, 230, 230, 0.9);
}

/* Fullscreen state */
.maps-tile-map-container.is-fullscreen {
    position: fixed !important;
    inset: 0 !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    z-index: 99999 !important;
    border-radius: 0 !important;
    margin: 0 !important;
    border: none !important;
}

.maps-tile-map-container.is-fullscreen #tile-map,
.maps-tile-map-container.is-fullscreen #tile-map .maplibregl-canvas-container,
.maps-tile-map-container.is-fullscreen #tile-map .maplibregl-canvas,
.maps-tile-map-container.is-fullscreen #tile-map canvas {
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    border-radius: 0 !important;
}

.maps-tile-map-container.is-fullscreen .map-fade-overlay,
.maps-tile-map-container.is-fullscreen .map-fullscreen-hint {
    display: none !important;
}

.maps-tile-map-container,
.maps-tile-map-container #tile-map {
    background-color: #000000 !important;
    background: #000000 !important;
}

#tile-map {
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: 24px 0 0 0 !important;
    overflow: hidden !important;
}

#tile-map .maplibregl-canvas-container,
#tile-map .maplibregl-canvas,
#tile-map canvas {
    border-radius: 24px 0 0 0 !important;
}

/* Custom control overlay container — fills the map, pointer-events pass-through */
.maps-tile-map-container .map-ctrl-container {
    position: absolute !important;
    inset: 0 !important;
    pointer-events: none !important;
    z-index: 1000 !important;
    overflow: visible !important;
}

/* Top-level flex panels — each is a flex column anchored to a corner */
.maps-tile-map-container .map-ctrl-panel {
    position: absolute !important;
    pointer-events: none !important;
    overflow: visible !important;
    display: flex !important;
    align-items: flex-start !important;
}

/* Desktop default: all controls stack vertically at bottom-left.
   column-reverse means first child in DOM = visually lowest (bottom). */
.maps-tile-map-container .map-ctrl-panel.map-ctrl-panel--left {
    left: 20px !important;
    right: auto !important;
    bottom: 20px !important;
    top: auto !important;
    flex-direction: column-reverse !important;
    gap: 8px !important;
}

/* Right panel — used only on mobile for zoom */
.maps-tile-map-container .map-ctrl-panel.map-ctrl-panel--right {
    right: 20px !important;
    left: auto !important;
    top: 72px !important;
    bottom: auto !important;
    flex-direction: column !important;
    gap: 8px !important;
}

/* All direct controls are in-flow within the flex parent, except layers which needs relative */
.maps-tile-map-container .map-ctrl-panel .map-ctrl:not(.map-ctrl-styles) {
    pointer-events: auto !important;
    position: static !important;
    margin: 0 !important;
}
.maps-tile-map-container .map-ctrl-panel .map-ctrl.map-ctrl-styles {
    pointer-events: auto !important;
    position: relative !important;
    margin: 0 !important;
}

/* Zoom control: vertical column of two buttons */
.maps-tile-map-container .map-ctrl-zoom {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

/* Single-button controls */
.maps-tile-map-container .map-ctrl-locate,
.maps-tile-map-container .map-ctrl-fullscreen {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 26px !important;
    height: 26px !important;
}

/* Dark Mode palette tuning for Carto tiles */
.maps-tile-map-container .carto-dark-tile {
    filter: brightness(1.18) contrast(1.12) hue-rotate(195deg) saturate(1.4);
}

.maps-tile-map-container .google-sat-tile,
.maps-tile-map-container img.google-sat-tile {
    filter: none !important;
}

/* Dark theme overrides for Leaflet controls on tile map */

.maps-tile-map-container .map-ctrl-zoom {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Header Logo Container */
.header-logo-container {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.header-logo-container .home-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}


/* Leaflet Control Containers (Zoom, Locate, Fullscreen) Styled as transparent containers */
.maps-tile-map-container .map-ctrl-zoom,
.maps-tile-map-container .map-ctrl-locate,
.maps-tile-map-container .map-ctrl-fullscreen {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    overflow: visible !important;
}

.maps-tile-map-container .map-ctrl-zoom,
.maps-tile-map-container .map-ctrl-locate,
.maps-tile-map-container .map-ctrl-fullscreen {
    filter: none !important;
}

.maps-tile-map-container .map-ctrl-styles:not(.map-ctrl-styles--expanded) .map-ctrl-styles__toggle {
    filter: none !important;
}

/* Map Style Switcher (Transparent wrapper when collapsed, expanding into panel) */
.maps-tile-map-container .map-ctrl-styles {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    overflow: visible !important;
    box-sizing: border-box !important;
    transition: none !important;
}

/* Expanded style panel animation state (transparent container with shadow-only elements) */
.maps-tile-map-container .map-ctrl-styles.map-ctrl-styles--expanded {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    width: 26px !important;
    height: 26px !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    overflow: visible !important;
}

.maps-tile-map-container .map-ctrl-zoom a,
.maps-tile-map-container .map-ctrl-locate a,
.maps-tile-map-container .map-ctrl-fullscreen a,
.maps-tile-map-container .map-ctrl-styles__toggle {
    background: transparent !important;
    border: none !important;
    border-radius: 50% !important;
    color: #d1d1d6 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
    min-height: 26px !important;
    font-size: 18px !important;
    font-weight: 400 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    transition: all var(--transition-fast) !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.8)) !important;
}

/* Map control buttons styling when light basemap (Positron / Esri Street / Topo) is active */
.is-light-basemap .map-ctrl-zoom,
.is-light-basemap .map-ctrl-locate,
.is-light-basemap .map-ctrl-fullscreen,
.is-light-basemap .map-ctrl-styles:not(.map-ctrl-styles--expanded) .map-ctrl-styles__toggle,
.maps-tile-map-container.is-light-basemap .map-ctrl-zoom,
.maps-tile-map-container.is-light-basemap .map-ctrl-locate,
.maps-tile-map-container.is-light-basemap .map-ctrl-fullscreen,
.maps-tile-map-container.is-light-basemap .map-ctrl-styles:not(.map-ctrl-styles--expanded) .map-ctrl-styles__toggle {
    filter: none !important;
}

.is-light-basemap .map-ctrl-zoom a,
.is-light-basemap .map-ctrl-locate a,
.is-light-basemap .map-ctrl-fullscreen a,
.is-light-basemap .map-ctrl-styles__toggle,
.maps-tile-map-container.is-light-basemap .map-ctrl-zoom a,
.maps-tile-map-container.is-light-basemap .map-ctrl-locate a,
.maps-tile-map-container.is-light-basemap .map-ctrl-fullscreen a,
.maps-tile-map-container.is-light-basemap .map-ctrl-styles__toggle {
    filter: drop-shadow(0 1px 2px rgba(255, 255, 255, 0.9)) !important;
}

/* Black icon text & stroke for map control buttons when light basemap (Esri Street / Topo) is active */
.is-light-basemap .map-ctrl-zoom a,
.is-light-basemap .map-ctrl-zoom-in,
.is-light-basemap .map-ctrl-zoom-out,
.is-light-basemap .map-ctrl-locate a,
.is-light-basemap .map-ctrl-fullscreen a,
.is-light-basemap .map-ctrl-styles__toggle,
.is-light-basemap .map-ctrl-styles__toggle button,
.is-light-basemap .map-ctrl-locate-btn,
.maps-tile-map-container.is-light-basemap .map-ctrl-zoom a,
.maps-tile-map-container.is-light-basemap .map-ctrl-zoom-in,
.maps-tile-map-container.is-light-basemap .map-ctrl-zoom-out,
.maps-tile-map-container.is-light-basemap .map-ctrl-locate a,
.maps-tile-map-container.is-light-basemap .map-ctrl-fullscreen a,
.maps-tile-map-container.is-light-basemap .map-ctrl-styles__toggle {
    color: #000000 !important;
}

.is-light-basemap .map-ctrl-styles__toggle svg,
.is-light-basemap .map-ctrl-locate-btn svg,
.is-light-basemap .map-ctrl-fullscreen a svg,
.maps-tile-map-container.is-light-basemap .map-ctrl-styles__toggle svg,
.maps-tile-map-container.is-light-basemap .map-ctrl-locate-btn svg,
.maps-tile-map-container.is-light-basemap .map-ctrl-fullscreen a svg {
    stroke: #000000 !important;
}

.maps-tile-map-container .map-ctrl-styles__toggle {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    transition: opacity 0.2s ease !important;
    z-index: 10 !important;
}

.maps-tile-map-container .map-ctrl-styles--expanded .map-ctrl-styles__toggle {
    display: inline-flex !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    color: var(--accent-primary) !important;
}

/* Switcher option items list content */
.maps-tile-map-container .map-ctrl-styles__list {
    position: absolute !important;
    bottom: 34px !important;
    left: 0 !important;
    width: 260px !important;
    opacity: 0 !important;
    transform: translateY(-8px) !important;
    transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    pointer-events: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #000000 !important;
    border-radius: 20px !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8) !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    max-height: calc(100vh - 178px) !important;
}

.maps-tile-map-container .map-ctrl-styles--expanded .map-ctrl-styles__list {
    opacity: 1 !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
}

.maps-tile-map-container .map-ctrl-zoom a:hover,
.maps-tile-map-container .map-ctrl-locate a:hover,
.maps-tile-map-container .map-ctrl-fullscreen a:hover,
.maps-tile-map-container .map-ctrl-styles__toggle:hover {
    background: transparent !important;
    color: var(--accent-primary) !important;
    transform: translateY(-1px) !important;
}

/* Layer Control Toggle Button Custom Styling */
.maps-tile-map-container .map-ctrl-styles__toggle svg {
    display: block !important;
    width: 16px !important;
    height: 16px !important;
    transition: stroke 0.2s ease !important;
}

.maps-tile-map-container .map-ctrl-styles__overlays label {
    display: none !important;
}

/* Modal Header and Layout matching Sidebar Capsules and Search style */
.maps-tile-map-container .map-ctrl-styles__header {
    position: relative !important;
    padding: 10px 12px 6px 12px !important;
    border-bottom: none !important;
    box-sizing: border-box !important;
}

.maps-tile-map-container .modal-title-wrapper {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 8px !important;
    padding-left: 2px !important;
}

.maps-tile-map-container .modal-title {
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.maps-tile-map-container .modal-close-btn {
    background: transparent !important;
    border: none !important;
    padding: 4px !important;
    cursor: pointer !important;
    color: rgba(255, 255, 255, 0.45) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    border-radius: 50% !important;
}

.maps-tile-map-container .modal-close-btn:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

.maps-tile-map-container .modal-capsules-wrapper {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.5rem !important;
    width: 100% !important;
    transition: opacity 0.2s ease, transform 0.2s ease !important;
}

.maps-tile-map-container .modal-capsules-scroll {
    display: flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    flex: 1 !important;
    min-width: 0 !important;
    scrollbar-width: none !important;
}

.maps-tile-map-container .modal-capsules-scroll::-webkit-scrollbar {
    display: none !important;
}

.maps-tile-map-container .modal-capsule {
    display: inline-flex !important;
    align-items: center !important;
    padding: 0.28rem 0.7rem !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: none !important;
    outline: none !important;
    border-radius: 20px !important;
    color: rgba(255, 255, 255, 0.45) !important;
    font-size: 0.74rem !important;
    font-weight: normal !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    transition: all var(--transition-fast) !important;
    line-height: 1.2 !important;
}

.maps-tile-map-container .modal-capsule:hover {
    background: rgba(255, 255, 255, 0.09) !important;
    color: rgba(255, 255, 255, 0.7) !important;
}

.maps-tile-map-container .modal-capsule.is-active {
    background: rgba(var(--accent-rgb), 0.16) !important;
    color: var(--accent-primary) !important;
    font-weight: normal !important;
}

.maps-tile-map-container .modal-capsule--icon {
    padding: 0.28rem 0.5rem !important;
    justify-content: center !important;
}

.maps-tile-map-container .modal-search-toggle-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 24px !important;
    height: 24px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: none !important;
    color: rgba(255, 255, 255, 0.5) !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    transition: all var(--transition-fast) !important;
}

.maps-tile-map-container .modal-search-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
}

.maps-tile-map-container .modal-search-expanded {
    position: absolute !important;
    inset: 0 !important;
    padding: 0.3rem 0.6rem !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
    background: #000000 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(-4px) !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    z-index: 30 !important;
}

.maps-tile-map-container .map-ctrl-styles__header.is-searching .modal-search-expanded {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
}

.maps-tile-map-container .map-ctrl-styles__header.is-searching .modal-capsules-wrapper {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(4px) !important;
}

.maps-tile-map-container .modal-search-input-container {
    flex: 1 !important;
    position: relative !important;
    display: flex !important;
    align-items: center !important;
}

.maps-tile-map-container .modal-search-input-icon {
    position: absolute !important;
    left: 8px !important;
    color: rgba(255, 255, 255, 0.4) !important;
    pointer-events: none !important;
}

.maps-tile-map-container .modal-search-input {
    width: 100% !important;
    background: rgba(255, 255, 255, 0.07) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 20px !important;
    padding: 0.3rem 0.5rem 0.3rem 1.8rem !important;
    color: #ffffff !important;
    font-size: 12px !important;
    outline: none !important;
    transition: border-color var(--transition-fast) !important;
    box-sizing: border-box !important;
}

.maps-tile-map-container .modal-search-input:focus {
    border-color: rgba(255, 255, 255, 0.4) !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

.maps-tile-map-container .modal-search-close-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 24px !important;
    height: 24px !important;
    border-radius: 50% !important;
    background: transparent !important;
    border: none !important;
    color: rgba(255, 255, 255, 0.5) !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    transition: color var(--transition-fast) !important;
}

.maps-tile-map-container .modal-search-close-btn:hover {
    color: #ffffff !important;
}

/* Modal Body area with minimalist scrollbar */
.maps-tile-map-container .map-ctrl-styles__body {
    flex: 1 !important;
    overflow-y: auto !important;
    padding: 10px 12px !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    scrollbar-width: thin !important;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent !important;
}

.maps-tile-map-container .map-ctrl-styles__body::-webkit-scrollbar {
    width: 3px !important;
}

.maps-tile-map-container .map-ctrl-styles__body::-webkit-scrollbar-track {
    background: transparent !important;
}

.maps-tile-map-container .map-ctrl-styles__body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15) !important;
    border-radius: 10px !important;
}

/* Switcher Modal Tile Layout styles matching Features column */
.maps-tile-map-container .map-ctrl-styles__list .tile-zone-item {
    display: grid !important;
    grid-template-columns: 64px 1fr !important; /* Slightly narrower thumbnail to fit 260px popup width nicely */
    gap: 0.75rem !important;
    align-items: center !important;
    padding: 0.6rem 0.5rem !important;
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 10px !important;
    color: #ffffff !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all var(--transition-fast) !important;
    box-shadow: none !important;
}

.maps-tile-map-container .map-ctrl-styles__list .tile-zone-item:last-child {
    border-bottom: none !important;
}

.maps-tile-map-container .map-ctrl-styles__list .tile-zone-item:has(+ .is-child) {
    border-bottom: 1px solid transparent !important;
}

.maps-tile-map-container .map-ctrl-styles__list .tile-zone-item.is-child {
    position: relative !important;
    margin-left: 36px !important;
    padding-left: 0.5rem !important;
    overflow: visible !important;
}

.maps-tile-map-container .map-ctrl-styles__list .tile-zone-item.is-child::before {
    content: "" !important;
    position: absolute !important;
    left: -20px !important;
    top: -24px !important;
    width: 12px !important;
    height: calc(50% + 24px) !important;
    border-left: 1.5px solid rgba(255, 255, 255, 0.25) !important;
    border-bottom: 1.5px solid rgba(255, 255, 255, 0.25) !important;
    border-bottom-left-radius: 4px !important;
    pointer-events: none !important;
}

.maps-tile-map-container .map-ctrl-styles__list .tile-zone-item.is-child::after {
    content: "" !important;
    position: absolute !important;
    left: -9px !important;
    top: 50% !important;
    width: 4px !important;
    height: 4px !important;
    border-right: 1.5px solid rgba(255, 255, 255, 0.25) !important;
    border-top: 1.5px solid rgba(255, 255, 255, 0.25) !important;
    transform: translateY(-50%) rotate(45deg) !important;
    pointer-events: none !important;
}

.maps-tile-map-container .map-ctrl-styles__list .tile-zone-item__title {
    font-family: 'Roboto', sans-serif !important;
    font-weight: 400 !important;
    color: #e4e4e7 !important;
    transition: color var(--transition-fast);
}

.maps-tile-map-container .map-ctrl-styles__list .tile-zone-item:hover .tile-zone-item__title,
.maps-tile-map-container .map-ctrl-styles__list .tile-zone-item.is-hovered .tile-zone-item__title {
    color: #ffffff !important;
}

.maps-tile-map-container .map-ctrl-styles__list .tile-zone-item.is-active .tile-zone-item__title {
    font-weight: 700 !important;
    color: var(--accent-primary) !important;
    text-shadow: 0 0 6px rgba(var(--accent-rgb), 0.5) !important;
}

.maps-tile-map-container .map-ctrl-styles__list .tile-zone-item.is-active {
    border-radius: 12px !important;
    border-bottom: 1px solid transparent !important;
    box-shadow: none !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

.maps-tile-map-container .map-ctrl-styles__list .tile-zone-item__thumb .thumbnail {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    background-size: 114% 114% !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

/* Default Map Preview thumbnail */
.maps-tile-map-container .map-ctrl-styles__list .default-map-thumbnail,
.maps-tile-map-container .default-map-thumbnail,
.maps-tile-map-container .map-ctrl-styles__list .dark-map-thumbnail,
.maps-tile-map-container .dark-map-thumbnail {
    background-image: url("../images/dark_map-02.png") !important;
}

[data-theme="light"] .maps-tile-map-container .map-ctrl-styles__list .default-map-thumbnail,
[data-theme="light"] .maps-tile-map-container .default-map-thumbnail,
html.theme-light .maps-tile-map-container .default-map-thumbnail,
body.theme-light .maps-tile-map-container .default-map-thumbnail {
    background-image: url("../images/street2.jpg") !important;
}

/* Satellite Preview thumbnail */
.maps-tile-map-container .map-ctrl-styles__list .satellite-thumbnail,
.maps-tile-map-container .satellite-thumbnail {
    background-image: url("../images/Google_satellite-02.png") !important;
}

/* Esri Street Preview thumbnail */
.maps-tile-map-container .map-ctrl-styles__list .esri-street-thumbnail,
.maps-tile-map-container .esri-street-thumbnail {
    background-image: url("../images/street2.jpg") !important;
}

/* Esri Topo Preview thumbnail */
.maps-tile-map-container .map-ctrl-styles__list .esri-topo-thumbnail,
.maps-tile-map-container .esri-topo-thumbnail {
    background-image: url("../images/topo.jpg") !important;
}

.maps-tile-map-container .modal-no-results {
    text-align: center !important;
    font-size: 0.76rem !important;
    color: rgba(255, 255, 255, 0.4) !important;
    padding: 20px 0 !important;
}

.maps-tile-map-container .map-ctrl-locate.is-active a {
    color: var(--accent-primary) !important;
    background-color: transparent !important;
}

.user-location-marker {
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-location-dot {
    width: 14px;
    height: 14px;
    background-color: var(--accent-primary);
    border: 2px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.9), 0 2px 6px rgba(0, 0, 0, 0.5);
    animation: pulse-user-location 2s infinite;
}

@keyframes pulse-user-location {
    0% {
        box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.8);
    }

    70% {
        box-shadow: 0 0 0 14px rgba(var(--accent-rgb), 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0);
    }
}

/* User Location Zone Badge (Top Left of Map Frame) */
.map-location-badge {
    position: absolute;
    top: 14px;
    left: 56px;
    z-index: 1000;
    background: transparent;
    color: #ffffff;
    border: none;
    padding: 0;
    border-radius: 0;
    font-size: 0.95rem;
    font-weight: 700;
    display: none;
    align-items: center;
    gap: 8px;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9), 0 0 10px rgba(0, 0, 0, 0.8);
    pointer-events: none;
}

.map-location-badge.is-visible {
    display: flex;
}

.map-location-badge__dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-primary);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-primary);
    flex-shrink: 0;
}

/* Toast Notification for Copy Link, Location, Help Mode, Tools/Settings (styled to match top toolbar, centered at bottom of map frame with float animation) */
.toast-notification,
.maps-tile-map-area .toast-notification {
    position: absolute;
    bottom: 24px !important;
    top: auto !important;
    left: 50% !important;
    transform: translateX(-50%) translateY(20px) scale(0.95);
    background: rgba(0, 0, 0, 0.75) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    color: #d1d1d6 !important;
    padding: 10px 22px !important;
    border-radius: 24px !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6) !important;
    font-size: 0.88rem !important;
    font-weight: 600 !important;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    text-shadow: none !important;
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    white-space: nowrap;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.6rem !important;
}

.toast-notification span,
.maps-tile-map-area .toast-notification span {
    color: #d1d1d6 !important;
    font-size: 0.88rem !important;
    font-weight: 600 !important;
}

.toast-notification.is-visible,
.maps-tile-map-area .toast-notification.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
}

.toast-notification.toast-notification--disabled,
.maps-tile-map-area .toast-notification.toast-notification--disabled {
    color: #ff453a !important;
    border-color: rgba(255, 69, 58, 0.25) !important;
    background: rgba(20, 0, 0, 0.85) !important;
}

.toast-notification.toast-notification--disabled span,
.maps-tile-map-area .toast-notification.toast-notification--disabled span {
    color: #ff453a !important;
}

.toast-notification__icon {
    width: 16px !important;
    height: 16px !important;
    flex-shrink: 0;
}

/* Responsive adjustments for mobile/tablet */
@media (max-width: 768px) {
    @keyframes mobileHomeSlideDown {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .maps-tile-header,
    .maps-tile-sidebar,
    .animate-mobile-slide-down {
        animation: mobileHomeSlideDown 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }



    /* Mobile: non-zoom buttons as a row anchored to bottom-right */
    .maps-tile-map-container .map-ctrl-panel.map-ctrl-panel--left {
        flex-direction: row !important;
        align-items: center !important;
        bottom: 20px !important;
        right: 20px !important;
        left: auto !important;
        top: auto !important;
    }

    /* Mobile: right panel = zoom column at top-right, below header */
    .maps-tile-map-container .map-ctrl-panel.map-ctrl-panel--right {
        top: 72px !important;
        right: 20px !important;
        flex-direction: column !important;
    }

    .maps-tile-map-container .map-ctrl-styles.map-ctrl-styles--expanded {
        z-index: 99999 !important;
        overflow: visible !important;
    }

    .maps-tile-map-container .map-ctrl-styles__list {
        left: auto !important;
        right: 0 !important;
        max-height: 300px !important;
    }

    .map-fullscreen-hint {
        display: none !important;
    }

    .sidebar-about-content {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 1.15rem !important;
        width: 100% !important;
    }

    .sidebar-overview-preview {
        order: 1 !important;
    }

    .sidebar-overview-people {
        order: 2 !important;
    }

    .sidebar-overview-resources {
        order: 3 !important;
    }

    .sidebar-about-text {
        width: 100% !important;
        font-size: 0.86rem !important;
        line-height: 1.6 !important;
        margin: 0 !important;
        order: 10 !important;
    }

    .sidebar-about-media {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        height: auto !important;
        max-height: none !important;
        aspect-ratio: 16 / 10 !important;
        margin: 0.25rem 0 0 0 !important;
        flex-shrink: 0 !important;
        border-radius: 8px !important;
        order: 11 !important;
    }

    .sidebar-about-wrapper,
    .sidebar-about-panel {
        padding: 0.4rem 0.65rem 1.25rem 0.65rem !important;
        width: 100% !important;
    }

    .maps-tile-main {
        display: flex !important;
        flex-direction: column !important;
    }

    .maps-tile-content {
        display: contents !important;
    }

    .maps-tile-map-area {
        order: 1 !important;
        height: calc(50% - 9px) !important;
        padding: 0 6px !important;
        margin: 0 !important; /* Reset desktop margins on mobile */
        transition: height 0.32s cubic-bezier(0.16, 1, 0.3, 1) !important;
    }

    .maps-tile-map-container {
        position: relative !important;
        overflow: hidden !important;
    }

    #tile-map {
        height: 100vh !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
    }

    /* Hide the desktop-only top bars on mobile */
    .desktop-nav-tabs {
        display: none !important;
    }

    .maps-tile-map-container .map-ctrl-panel.map-ctrl-panel--right {
        top: calc(0.25rem + env(safe-area-inset-top, 0px)) !important;
    }

    .mobile-resize-bar {
        order: 2 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        height: 18px !important;
        min-height: 18px !important;
        background: var(--color-bg, #000000);
        cursor: ns-resize !important;
        touch-action: none !important;
        user-select: none !important;
        -webkit-user-select: none !important;
        z-index: 50 !important;
        margin: 0 !important;
        padding: 0 !important;
        flex-shrink: 0 !important;
    }

    .mobile-resize-handle {
        width: 36px;
        height: 4px;
        background: rgba(255, 255, 255, 0.35);
        border-radius: 2px;
        transition: background var(--transition-fast);
    }

    .mobile-resize-bar:active .mobile-resize-handle,
    .mobile-resize-bar:hover .mobile-resize-handle {
        background: var(--accent-primary);
    }

    /* Gradient below the resize knob: fades in once the user has scrolled
       down so the top of the content column has no hard edge */
    .mobile-resize-bar {
        position: relative !important;
    }

    .mobile-resize-bar::after {
        content: "";
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        height: 28px;
        background: linear-gradient(to bottom, #000000 0%, rgba(0, 0, 0, 0) 100%);
        pointer-events: none;
        z-index: 49;
        opacity: 0;
        transition: opacity 0.25s ease;
    }

    /* body.sidebar-is-scrolled toggled by JS on the scroll listener */
    body.sidebar-is-scrolled .mobile-resize-bar::after {
        opacity: 1;
    }

    /* Suppress the header and bottom gradients on mobile */
    .maps-tile-sidebar__header::after,
    .maps-tile-sidebar::after {
        display: none !important;
    }

    .maps-tile-sidebar {
        order: 3 !important;
        width: 100% !important;
        max-width: none !important;
        height: calc(50% - 9px) !important;
        border-right: none !important;
        border-top: none !important;
        position: relative !important;
        display: flex !important;
        flex-direction: column !important;
        transition: height 0.32s cubic-bezier(0.16, 1, 0.3, 1) !important;
    }

    .maps-tile-header {
        flex-shrink: 0 !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.6rem !important;
        padding-top: 0.6rem !important;
        padding-bottom: 0.75rem !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .maps-tile-header__left {
        width: 100% !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 0.75rem !important;
        min-width: 0 !important;
        padding-bottom: 0.2rem !important;
    }

    .page-maps-tile .logo--header {
        height: 44px !important;
        width: auto !important;
    }

    .maps-tile-map-container,
    #tile-map,
    #tile-map .maplibregl-canvas-container,
    #tile-map .maplibregl-canvas,
    #tile-map canvas {
        border-radius: 24px !important;
    }

    .maps-tile-header__actions {
        position: absolute !important;
        top: 10px !important;
        bottom: auto !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        right: auto !important;
        z-index: 9999999999 !important;
        margin: 0 !important;
        padding: 4px !important;
        width: auto !important;
        max-width: calc(100% - 2rem) !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        background: rgba(15, 15, 15, 0.7) !important;
        border: 1px solid rgba(255, 255, 255, 0.12) !important;
        border-radius: 20px !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6) !important;
    }

    body.is-selection-full .maps-tile-header__actions {
        display: none !important;
    }

    .maps-tile-header__actions .action-buttons-list {
        display: flex !important;
        flex-direction: row !important;
        gap: 0.25rem !important;
        align-items: center !important;
    }
}

/* Shared action buttons capsule inside map area (Desktop & Mobile) */
.maps-tile-header__actions {
    position: absolute !important;
    z-index: 1000 !important;
    margin: 0 !important;
    padding: 4px !important;
    width: auto !important;
    max-width: max-content !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    background: rgba(15, 15, 15, 0.75) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 20px !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6) !important;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
    --mouse-x: 50%;
    --mouse-y: 50%;
    --glow-opacity: 0;
    --spotlight-size: 240px;
}

/* Radial Gradient Proximity Highlight Fill on Toolbar Container Frame */
.maps-tile-header__actions::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: var(--glow-opacity, 0);
    transition: opacity 0.1s linear;
    z-index: 0;
    background: radial-gradient(
        var(--spotlight-size) circle at var(--mouse-x) var(--mouse-y),
        rgba(255, 255, 255, 0.04) 0%,
        rgba(255, 255, 255, 0.01) 50%,
        transparent 75%
    );
}

.maps-tile-header__actions:hover::after {
    opacity: 0.45 !important;
}

.maps-tile-header__actions:hover::before {
    opacity: 0.85 !important;
}

/* Radial Gradient Proximity Outline Highlight on Toolbar Frame */
.maps-tile-header__actions::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 21px;
    padding: 1px;
    background: radial-gradient(
        var(--spotlight-size) circle at var(--mouse-x) var(--mouse-y),
        rgba(255, 255, 255, 0.35) 0%,
        rgba(255, 255, 255, 0.1) 40%,
        transparent 75%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: var(--glow-opacity, 0);
    transition: opacity 0.1s linear;
    z-index: 1;
}

/* Animated expansion when modal is open inside capsule */
body.has-active-modal .maps-tile-header__actions {
    width: 380px !important;
    max-width: calc(100% - 2rem) !important;
    padding: 0.75rem 1rem 1.25rem 1rem !important;
    gap: 1rem !important;
}

.maps-tile-header__actions .action-buttons-list {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    align-self: flex-start !important;
    gap: 4px !important;
}

/* Modal element inside merged capsule (Desktop & Mobile) */
.maps-tile-header__actions .maps-tile-modal {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: calc(100vh - 10rem) !important;
    z-index: 1001 !important;
    display: none;
    overflow-y: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.maps-tile-header__actions .maps-tile-modal[aria-hidden="false"] {
    display: block !important;
    animation: desktopModalFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.maps-tile-header__actions .maps-tile-modal .modal__backdrop {
    display: none !important;
}

.maps-tile-header__actions .maps-tile-modal .maps-tile-modal__panel {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    gap: 1rem !important;
}

.maps-tile-header__actions .maps-tile-modal .modal__close,
.maps-tile-header__actions .maps-tile-modal .maps-tile-modal__close,
.maps-tile-header__actions .maps-tile-modal .maps-tile-modal__header,
.maps-tile-header__actions .maps-tile-modal .maps-tile-modal__title {
    display: none !important;
}

/* Desktop-only positioning overrides */
@media (min-width: 769px) {
    .maps-tile-header {
        padding-top: 2.5rem !important;
        padding-bottom: 0.75rem !important;
    }

    .maps-tile-sidebar__header {
        padding-bottom: 0.5rem !important;
    }

    .maps-tile-header__actions {
        top: 1rem !important;
        left: 1rem !important;
        bottom: auto !important;
        transform: none !important;
    }

    .maps-tile-map-container .map-ctrl-panel.map-ctrl-panel--left {
        z-index: 900 !important;
    }
}

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

.maps-tile-modal__panel {
    width: min(580px, 92vw) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 20px !important;
    padding: 1.5rem !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex !important;
    flex-direction: column !important;
    gap: 1.25rem !important;
    position: relative;
    overflow: visible !important;
}

/* Disabled internal gradient overlay to eliminate rough edges */
.maps-tile-modal__panel::after {
    display: none !important;
}

.maps-tile-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.75rem;
    border-bottom: none !important;
    position: relative;
    z-index: 10;
}

.maps-tile-modal__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.maps-tile-modal__close {
    position: static !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06) !important;
    color: rgba(255, 255, 255, 0.6) !important;
    border: none !important;
    cursor: pointer;
    transition: all var(--transition-fast) !important;
}

.maps-tile-modal__close:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
}

.maps-tile-download-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    position: relative;
    z-index: 10;
}

@media (max-width: 540px) {
    .maps-tile-download-grid {
        grid-template-columns: 1fr;
    }
}

.maps-tile-download-col {
    background: rgba(255, 255, 255, 0.03) !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 1rem !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
}

.maps-tile-download-col__title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

.maps-tile-download-list {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.maps-tile-download-item {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
    padding: 0.4rem 0.75rem !important;
    background: rgba(255, 255, 255, 0.10) !important;
    border: none !important;
    border-radius: 20px !important;
    color: #ffffff !important;
    font-size: 0.76rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    box-shadow: none !important;
    box-sizing: border-box;
}

.maps-tile-download-item:hover,
.maps-tile-download-item.is-active:hover {
    background: rgba(var(--accent-rgb), 0.22) !important;
    color: var(--accent-primary) !important;
    transform: translateY(-1px);
    box-shadow: none !important;
}

.maps-tile-download-item.is-disabled {
    background: rgba(255, 255, 255, 0.02) !important;
    border: none !important;
    color: rgba(255, 255, 255, 0.3) !important;
    cursor: not-allowed !important;
}

.maps-tile-download-tag {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.35);
}

/* ── Suggested Apps Quick Launcher ── */
.suggested-apps-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 1.1rem 0 0.2rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.suggested-apps-grid {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 0.35rem;
    box-sizing: border-box;
}

.suggested-app-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.2rem;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    min-width: 48px;
    flex-shrink: 0;
    box-shadow: none !important;
    box-sizing: border-box;
    perspective: 500px;
    transform-style: preserve-3d;
}

.suggested-app-card.is-preparing {
    opacity: 0.7 !important;
    cursor: wait !important;
    pointer-events: none !important;
}

.suggested-app-card.is-preparing .suggested-app-icon-wrap {
    animation: pulseAppPreparing 0.9s infinite alternate ease-in-out;
}

@keyframes pulseAppPreparing {
    0% { transform: scale(0.95); opacity: 0.7; }
    100% { transform: scale(1.05); opacity: 1; }
}

.suggested-app-card:hover {
    background: transparent !important;
}

.suggested-app-card:active {
    transform: scale(0.94);
}

.suggested-app-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 11px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16);
    transform-style: preserve-3d;
    will-change: transform, box-shadow;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.suggested-app-card.is-active .suggested-app-icon-wrap {
    box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.4), 0 4px 12px rgba(0, 0, 0, 0.3);
}

.suggested-app-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.suggested-app-label {
    font-size: 0.7rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.45);
    white-space: nowrap;
    transition: all 0.2s ease;
}

.suggested-app-card:hover .suggested-app-label {
    color: #ffffff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.35);
}

/* View All App Card Styling */
.suggested-app-icon-wrap--view-all {
    background: rgba(255, 255, 255, 0.06) !important;
    border: none !important;
    outline: none !important;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}

.suggested-app-card--view-all:hover .suggested-app-icon-wrap--view-all {
    background: var(--accent-primary) !important;
    color: #000000 !important;
    border: none !important;
    outline: none !important;
    box-shadow: 0 0 16px rgba(100, 181, 246, 0.4) !important;
}

/* All Compatible Apps Full Black Screen Modal Panel */
.all-apps-full-modal {
    padding: 0 !important;
}

.all-apps-modal-panel {
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    background: #000000 !important;
    border: none !important;
    box-shadow: none !important;
    padding: clamp(3rem, 7vw, 5.5rem) clamp(1.2rem, 5vw, 4rem) clamp(1.2rem, 3vw, 2.5rem) clamp(1.2rem, 5vw, 4rem) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    box-sizing: border-box;
    transform: scale(0.96);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.all-apps-full-modal.is-open .all-apps-modal-panel {
    transform: scale(1);
}

.all-apps-modal-header {
    width: 100%;
    max-width: 640px;
    margin: 0 auto 2.2rem auto;
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
}

.all-apps-modal-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.all-apps-modal-header-top .avenza-modal-title {
    font-size: 1.55rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    line-height: 1.22;
    letter-spacing: -0.01em;
}

/* Live Search Box inside Open in... modal */
.all-apps-search-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #000000 !important;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 9999px;
    padding: 0.75rem 1.25rem;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.25s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.all-apps-search-box:focus-within {
    background: rgba(255, 255, 255, 0.09) !important;
    border-color: rgba(255, 255, 255, 0.28);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.all-apps-search-box .search-icon {
    color: rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.all-apps-search-box:focus-within .search-icon {
    color: rgba(255, 255, 255, 0.8);
}

.all-apps-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 0.95rem;
    font-family: inherit;
}

@media (max-width: 768px) {
    .all-apps-search-input {
        font-size: 16px !important;
    }
}

.all-apps-search-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.all-apps-search-clear {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.all-apps-search-clear:hover {
    color: #ffffff;
}

/* Grid Container */
.all-apps-grid-container {
    flex: 1;
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    overflow-y: auto;
}

.all-apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
    gap: 1.8rem 1.1rem;
    justify-items: center;
    padding: 0.5rem 0 2.5rem 0;
    width: 100%;
}

.all-apps-no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
}

.suggested-app-card.is-active .suggested-app-label {
    color: var(--accent-primary) !important;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(var(--accent-rgb), 0.4);
}

/* App Compatibility Search & Autocomplete Styles */
.maps-tile-download-search-wrapper {
    position: relative;
    width: 100%;
    max-width: 280px;
    margin-top: 0.75rem;
    margin-bottom: 1rem;
    margin-left: auto;
    margin-right: auto;
    z-index: 30;
    box-sizing: border-box;
}

.maps-tile-download-search-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 0.6rem 0.85rem;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.maps-tile-download-search-box:focus-within {
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.22);
}

.maps-tile-download-search-box .search-icon {
    color: rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
}

.maps-tile-download-search-input {
    position: relative;
    z-index: 2;
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 0.78rem;
    font-family: inherit;
    width: 100%;
    min-width: 0;
    text-overflow: ellipsis;
    box-sizing: border-box;
}

.maps-tile-download-search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.maps-tile-download-search-clear {
    position: relative;
    z-index: 2;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease;
}

.maps-tile-download-search-clear:hover {
    color: #ffffff;
}

.maps-tile-download-item.is-preparing {
    opacity: 0.7 !important;
    cursor: wait !important;
    pointer-events: none !important;
}

.maps-tile-download-autocomplete {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #000000 !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7);
    z-index: 50;
    padding: 0.4rem;
    overflow: visible !important;
    --mouse-x: 50%;
    --mouse-y: 50%;
    --glow-opacity: 0;
    --spotlight-size: 200px;
}

/* Proximity Glow for Download Autocomplete Box */
.maps-tile-download-autocomplete::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: var(--glow-opacity, 0);
    transition: opacity 0.1s linear;
    z-index: 0;
    background: radial-gradient(
        var(--spotlight-size) circle at var(--mouse-x) var(--mouse-y),
        rgba(255, 255, 255, 0.04) 0%,
        rgba(255, 255, 255, 0.01) 50%,
        transparent 75%
    );
}

.maps-tile-download-autocomplete::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 17px;
    padding: 1px;
    background: radial-gradient(
        var(--spotlight-size) circle at var(--mouse-x) var(--mouse-y),
        rgba(255, 255, 255, 0.35) 0%,
        rgba(255, 255, 255, 0.1) 40%,
        transparent 75%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: var(--glow-opacity, 0);
    transition: opacity 0.1s linear;
    z-index: 1;
}

.download-autocomplete-scroll-container {
    max-height: 212px;
    overflow-y: auto;
    border-radius: 12px;
    position: relative;
    z-index: 2;
}

.download-autocomplete-item {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.55rem 0.75rem;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.download-autocomplete-item:hover {
    background: rgba(255, 255, 255, 0.10);
}

.download-autocomplete-item__name {
    font-size: 0.82rem;
    font-weight: 600;
    color: #ffffff;
}

.download-autocomplete-item__formats {
    display: flex;
    gap: 0.25rem;
}

.download-format-pill {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
}

.maps-tile-download-item.is-dimmed {
    opacity: 0.25 !important;
    pointer-events: none !important;
    filter: grayscale(0.8) !important;
}

.maps-tile-download-item.is-filtered-match {
    background: rgba(255, 255, 255, 0.20) !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35) !important;
}

/* Copy Link Modal Body Styles */
.maps-tile-copy-body {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    position: relative;
    z-index: 10;
}

.maps-tile-copy-desc {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    line-height: 1.4;
}

.maps-tile-copy-input-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 9999px;
    padding: 0.35rem 0.35rem 0.35rem 1.1rem;
}

.maps-tile-copy-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 0.82rem;
    font-family: monospace;
    outline: none;
    min-width: 0;
    text-overflow: ellipsis;
}

.maps-tile-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.1rem;
    background: var(--accent-primary) !important;
    border: none !important;
    border-radius: 9999px !important;
    color: #000000 !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: none !important;
    flex-shrink: 0;
}

.maps-tile-copy-btn:hover {
    background: var(--accent-hover) !important;
    color: #000000 !important;
    transform: translateY(-1px);
}

.maps-tile-qr-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1.25rem;
    padding-top: 0.4rem;
    padding-bottom: 1.4rem;
    border-top: none !important;
    width: 100%;
}

.maps-tile-qr-wrapper {
    position: relative;
    width: 250px;
    height: 250px;
    max-width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
}

.maps-tile-qr-img {
    width: 100%;
    height: 100%;
    max-width: 250px;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.4));
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    z-index: 2;
}

/* Premium shimmer loading skeleton */
.maps-tile-qr-wrapper.loading::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.05),
        transparent
    );
    transform: translateX(-100%);
    animation: maps-tile-qr-shimmer 1.5s infinite;
    z-index: 1;
}

@keyframes maps-tile-qr-shimmer {
    100% {
        transform: translateX(100%);
    }
}

/* Suggest Modal & Form Styles */
.maps-tile-suggest-body {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    position: relative;
    z-index: 10;
}

.suggest-form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.suggest-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.suggest-form-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 0.2px;
}

.suggest-form-input,
.suggest-form-textarea {
    background: rgba(255, 255, 255, 0.06) !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    border-radius: 12px !important;
    padding: 0.6rem 0.85rem !important;
    color: #ffffff !important;
    font-size: 0.84rem !important;
    font-family: inherit !important;
    transition: all 0.2s ease !important;
}

.suggest-form-input:focus,
.suggest-form-textarea:focus {
    background: rgba(255, 255, 255, 0.10) !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

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

.suggest-draw-toolbar {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.suggest-draw-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem !important;
    background: rgba(255, 255, 255, 0.10) !important;
    border: none !important;
    border-radius: 20px !important;
    color: #ffffff !important;
    font-size: 0.76rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: none !important;
}

.suggest-draw-btn:hover {
    background: rgba(var(--accent-rgb), 0.22) !important;
    color: var(--accent-primary) !important;
    transform: translateY(-1px);
}

.suggest-draw-btn.is-active {
    background: rgba(var(--accent-rgb), 0.28) !important;
    color: var(--accent-primary) !important;
}

.suggest-draw-btn--clear {
    background: rgba(255, 69, 58, 0.14) !important;
    color: #ff453a !important;
}

.suggest-draw-btn--clear:hover {
    background: rgba(255, 69, 58, 0.28) !important;
    color: #ff453a !important;
}

.suggest-draw-btn.is-clear-mode {
    background: rgba(255, 69, 58, 0.14) !important;
    color: #ff453a !important;
}

.suggest-draw-btn.is-clear-mode:hover {
    background: rgba(255, 69, 58, 0.28) !important;
    color: #ff453a !important;
}

.suggest-annotation-status {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 0.35rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.suggest-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--accent-primary);
    font-weight: 600;
    background: rgba(var(--accent-rgb), 0.16);
    padding: 0.2rem 0.55rem;
    border-radius: 20px;
    font-size: 0.73rem;
}

.suggest-status-badge[data-action] {
    cursor: pointer;
    transition: all 0.2s ease;
}

.suggest-status-badge[data-action]:hover {
    background: rgba(255, 69, 58, 0.22);
    color: #ff453a;
}

.suggest-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.65rem 1rem;
    background: var(--accent-primary) !important;
    color: #000000 !important;
    border: none !important;
    border-radius: 20px !important;
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: none !important;
    margin-top: 0.35rem;
}

.suggest-submit-btn:hover {
    background: var(--accent-hover, #93c5fd) !important;
    color: #000000 !important;
    transform: translateY(-1px);
    box-shadow: none !important;
}

/* Help Modal & Interactive Guide Styles */
.maps-tile-help-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    z-index: 10;
}

.maps-tile-help-desc {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.65);
    margin: 0;
    line-height: 1.4;
}

.help-toggle-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    background: rgba(255, 255, 255, 0.04);
    border: none;
    border-radius: 12px;
    padding: 0.85rem 1rem;
}

.help-toggle-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.help-toggle-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: #ffffff;
    display: flex;
    align-items: center;
}

.help-shortcut-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--accent-rgb), 0.16) !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 0.15rem 0.5rem;
    font-size: 0.7rem;
    font-family: inherit;
    font-weight: 700;
    color: var(--accent-primary) !important;
    margin-left: 0.4rem;
    box-shadow: none !important;
}

.help-toggle-subtitle {
    font-size: 0.76rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Toggle Switch Control */
.help-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.help-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.help-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.2);
    transition: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 24px;
}

.help-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #ffffff;
    transition: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.help-switch input:checked+.help-slider {
    background-color: var(--accent-primary);
}

.help-switch input:checked+.help-slider:before {
    transform: translateX(20px);
}

.help-doc-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.06);
    border: none;
    border-radius: 12px;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.help-doc-link:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--accent-primary);
}

/* Floating Interactive Tooltip Mode */
.help-mode-tooltip {
    position: fixed;
    pointer-events: none;
    z-index: 99999999 !important;
    background: #000000 !important;
    border: 1px solid #333333 !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.9) !important;
    border-radius: 20px !important;
    padding: 0.65rem 0.9rem !important;
    max-width: 280px !important;
    color: #ffffff !important;
    font-size: 0.8rem !important;
    line-height: 1.4 !important;
    display: none;
    flex-direction: column;
    gap: 0.25rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.help-mode-tooltip[aria-hidden="false"] {
    display: flex !important;
}

.help-mode-tooltip__title {
    font-weight: 700;
    color: var(--accent-primary);
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.help-mode-tooltip__desc {
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
}

.help-mode-tooltip__shortcut {
    margin-top: 0.35rem;
    padding: 0.35rem 0.75rem;
    background: rgba(255, 255, 255, 0.12) !important;
    border: none !important;
    border-radius: 10px !important;
    font-size: 0.74rem;
    color: rgba(255, 255, 255, 0.65) !important;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    align-self: flex-start;
    box-shadow: none !important;
}

.help-mode-tooltip__shortcut svg {
    color: rgba(255, 255, 255, 0.6) !important;
    stroke: rgba(255, 255, 255, 0.6) !important;
    flex-shrink: 0;
}

.help-mode-tooltip__shortcut-label {
    color: rgba(255, 255, 255, 0.65) !important;
    font-weight: 500;
}

.help-mode-tooltip__shortcut-val {
    color: var(--accent-primary) !important;
    font-weight: 700;
}

body.is-help-mode-active [data-help-title]:hover {
    cursor: help !important;
}

.help-mode-highlight {
    position: fixed;
    pointer-events: none;
    z-index: 99999998 !important;
    border: 2px dashed var(--accent-primary) !important;
    border-radius: 6px;
    transition: left 0.06s ease-out, top 0.06s ease-out, width 0.06s ease-out, height 0.06s ease-out;
    display: none;
    box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.4), inset 0 0 8px rgba(var(--accent-rgb), 0.15) !important;
}

.help-mode-highlight[aria-hidden="false"] {
    display: block !important;
}

/* Floating Exit Help Mode Button */
.mobile-help-exit-btn {
    display: none;
}

body.is-help-mode-active .mobile-help-exit-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 0.5rem;
    position: fixed;
    z-index: 999999999 !important;
    background: rgba(35, 8, 10, 0.96) !important;
    color: #ff453a !important;
    border: none !important;
    outline: none !important;
    border-radius: 30px !important;
    padding: 0.65rem 1.25rem !important;
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.85) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    cursor: pointer;
    overflow: visible !important;
}

/* ── Annotation Mode Exit Prompt ──────────────────────────────────── */
.annotation-exit-btn {
    display: none;
}

body.is-annotation-mode .annotation-exit-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 0.5rem;
    position: fixed;
    z-index: 999999998 !important;
    background: rgba(35, 8, 10, 0.96) !important;
    color: #ff453a !important;
    border: none !important;
    outline: none !important;
    border-radius: 30px !important;
    padding: 0.65rem 1.25rem !important;
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.85) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    cursor: pointer;
    bottom: 24px !important;
    right: 24px !important;
    left: auto !important;
    transform: none !important;
    animation: annotationExitSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ── Suggest Mode Lock Exit Prompt ──────────────────────────────────── */
.suggest-exit-btn {
    display: none;
}

body.is-suggest-locked .suggest-exit-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 0.5rem;
    position: fixed;
    z-index: 999999998 !important;
    background: rgba(35, 8, 10, 0.96) !important;
    color: #ff453a !important;
    border: none !important;
    outline: none !important;
    border-radius: 30px !important;
    padding: 0.65rem 1.25rem !important;
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.85) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    cursor: pointer;
    bottom: 24px !important;
    right: 24px !important;
    left: auto !important;
    transform: none !important;
    animation: annotationExitSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

body.is-suggest-locked .suggest-exit-btn:hover {
    background: rgba(48, 12, 14, 0.98) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.9) !important;
}

body.is-annotation-mode .suggest-exit-btn {
    display: none !important;
}

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

.exit-annotation-key-badge {
    display: none;
}

@media (min-width: 769px) {
    .exit-annotation-key-badge {
        display: inline-flex !important;
        position: absolute !important;
        top: -14px !important;
        right: -6px !important;
        left: auto !important;
        transform: none !important;
        align-items: center;
        justify-content: center;
        width: auto;
        min-height: 18px;
        padding: 0.15rem 0.5rem;
        box-sizing: border-box;
        background: #1e090b !important;
        border: 1px solid rgba(255, 69, 58, 0.6) !important;
        border-radius: 6px;
        font-size: 0.7rem;
        font-family: inherit;
        font-weight: 800;
        color: #ff453a !important;
        line-height: 1;
        white-space: nowrap;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.9) !important;
        pointer-events: none;
    }

    body.is-annotation-mode .annotation-exit-btn {
        bottom: 24px !important;
        right: 24px !important;
        left: auto !important;
        transform: none !important;
        animation: annotationExitSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }
}

@media (max-width: 768px) {
    /* Prevent iOS Safari forced auto-zoom & view hijacking on input focus */
    input[type="text"],
    input[type="search"],
    input[type="email"],
    textarea,
    .sidebar-search-input,
    .maps-tile-copy-input {
        font-size: 16px !important;
    }

    body.is-annotation-mode .annotation-exit-btn {
        bottom: calc(16px + env(safe-area-inset-bottom, 0px)) !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        animation: annotationExitSlideUpMobile 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

    body.is-suggest-locked .suggest-exit-btn {
        bottom: calc(16px + env(safe-area-inset-bottom, 0px)) !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        max-width: calc(100vw - 32px) !important;
        white-space: normal !important;
        text-align: center !important;
        animation: annotationExitSlideUpMobile 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

    @keyframes annotationExitSlideUpMobile {
        from { opacity: 0; transform: translate(-50%, 20px); }
        to   { opacity: 1; transform: translate(-50%, 0); }
    }
}

.exit-help-key-badge {
    display: none;
}

@media (min-width: 769px) {
    .exit-help-key-badge {
        display: inline-flex !important;
        position: absolute !important;
        top: -14px !important;
        right: -6px !important;
        left: auto !important;
        transform: none !important;
        align-items: center;
        justify-content: center;
        width: auto;
        min-height: 18px;
        padding: 0.15rem 0.5rem;
        box-sizing: border-box;
        background: #1e090b !important;
        border: 1px solid rgba(255, 69, 58, 0.6) !important;
        border-radius: 6px;
        font-size: 0.7rem;
        font-family: inherit;
        font-weight: 800;
        color: #ff453a !important;
        line-height: 1;
        white-space: nowrap;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.9) !important;
        pointer-events: none;
    }

    body.is-help-mode-active .mobile-help-exit-btn {
        bottom: 24px !important;
        right: 24px !important;
        left: auto !important;
        transform: none !important;
        animation: desktopExitSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

    @keyframes desktopExitSlideUp {
        from {
            opacity: 0;
            transform: translateY(20px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

.swipe-back-indicator {
    display: none;
}

@media (max-width: 768px) {
    body.is-help-mode-active .mobile-help-exit-btn {
        bottom: calc(16px + env(safe-area-inset-bottom, 0px)) !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        animation: mobileExitSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

    @keyframes mobileExitSlideUp {
        from {
            opacity: 0;
            transform: translate(-50%, 20px);
        }

        to {
            opacity: 1;
            transform: translate(-50%, 0);
        }
    }

    /* Mobile-only sidebar zone list swiping transition animation classes */
    #sidebar-zone-list {
        will-change: transform, opacity;
        background: var(--color-bg, #000000); /* solid background to cover indicator */
        position: relative !important;
        z-index: 5 !important; /* render strictly above the indicator which has z-index: 1 */
    }

    #sidebar-zone-list.fly-out-right {
        transform: translateX(100%) !important;
        opacity: 0 !important;
        transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }

    #sidebar-zone-list.fly-in-left-start {
        transform: translateX(-100%) !important;
        opacity: 0 !important;
        transition: none !important;
    }

    #sidebar-zone-list.fly-in-left-active {
        transform: translateX(0) !important;
        opacity: 1 !important;
        transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
    }

    .swipe-back-indicator {
        position: absolute !important;
        left: 24px !important;
        top: 60% !important; /* centered vertically in scrolling zone list */
        transform: translateY(-50%) !important;
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        color: rgba(255, 255, 255, 0.4) !important; /* soft grey */
        font-size: 14px !important;
        font-weight: 500 !important;
        pointer-events: none !important;
        z-index: 1 !important; /* sits behind #sidebar-zone-list */
        opacity: 0;
    }

    .swipe-back-indicator.is-visible {
        opacity: 1 !important;
        animation: swipeBackIndicatorIntro 0.5s cubic-bezier(0.25, 1, 0.5, 1) forwards !important;
    }

    @keyframes swipeBackIndicatorIntro {
        0% {
            opacity: 0;
            transform: translate(-20px, -50%) rotate(0deg);
        }
        40% {
            opacity: 1;
            transform: translate(0, -50%) rotate(0deg);
        }
        55% {
            transform: translate(0, -50%) rotate(-8deg); /* tilt left */
        }
        70% {
            transform: translate(0, -50%) rotate(6deg);  /* tilt right */
        }
        85% {
            transform: translate(0, -50%) rotate(-3deg); /* tilt left minor */
        }
        100% {
            opacity: 1;
            transform: translate(0, -50%) rotate(0deg);  /* return upright */
        }
    }
}

/* Image Lightbox Modal Styles */
.image-lightbox-modal {
    z-index: 9999999 !important;
    display: none;
    align-items: center;
    justify-content: center;
    position: fixed;
    inset: 0;
    padding: 1.5rem;
    box-sizing: border-box;
}

.image-lightbox-modal[aria-hidden="false"] {
    display: flex !important;
}

.image-lightbox-modal .modal__backdrop {
    background: rgba(0, 0, 0, 0.92) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.image-lightbox-container {
    position: relative;
    z-index: 10;
    max-width: 92vw;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
}

.image-lightbox-container img {
    max-width: 100%;
    max-height: 72vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.image-lightbox-text {
    font-size: 0.92rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    text-align: center;
    max-width: 680px;
    font-weight: 400;
}

.image-lightbox-credit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.75);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 20px;
    padding: 0.35rem 0.9rem;
    margin: -0.25rem 0 0 0;
    text-align: center;
    font-weight: 500;
    letter-spacing: 0.02em;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.image-lightbox-close {
    position: absolute;
    top: -45px;
    right: 0;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #ffffff;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    z-index: 20;
}

.image-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}



.sidebar-list-container {
    position: relative;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}



@media (max-width: 768px) {
    /* Clear bottom nav layout */
    .maps-tile-sidebar__scroll {
        padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
    }

    /* Hide zoom controls on mobile */
    .maps-tile-map-container .map-ctrl-zoom,
    .map-ctrl-zoom {
        display: none !important;
    }

    /* --- Unified scroll container on mobile ---
       The sidebar itself becomes the scrolling element so the sub-header
       (capsule tabs row) and the feature tile list all scroll together as
       one continuous column, just like a regular page. The header naturally
       disappears as you scroll down without any sticky freeze. */
    .maps-tile-sidebar {
        overflow-y: auto !important;
        overflow-x: hidden !important;
        /* Must NOT be overflow:hidden so scrolling is possible */
        flex-direction: column !important;
    }

    /* The sub-header is now in-flow (not sticky), so just ensure it has no
       position overrides that would make it stick */
    .maps-tile-sidebar__header {
        position: relative !important;
        /* Remove any z-index that could cause stacking weirdness */
        z-index: auto !important;
        flex-shrink: 0 !important;
    }

    /* The list container no longer needs its own overflow: the sidebar scrolls */
    .sidebar-list-container {
        flex: unset !important;
        min-height: 0 !important;
        height: auto !important;
    }

    /* The zone-list scroll container should NOT scroll independently —
       let the sidebar be the single scroll root */
    .maps-tile-sidebar__scroll {
        overflow: visible !important;
        flex: unset !important;
        height: auto !important;
        min-height: 0 !important;
        /* Keep bottom padding so last tile isn't hidden behind bottom nav */
        padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important;
    }
}






/* Sidebar Hierarchy Navigation Transitions */
@keyframes navFlyOutLeft {
    0% {
        transform: translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateX(-40px);
        opacity: 0;
    }
}

@keyframes navFlyInRight {
    0% {
        transform: translateX(40px);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes navFlyOutRight {
    0% {
        transform: translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateX(40px);
        opacity: 0;
    }
}

@keyframes navFlyInLeft {
    0% {
        transform: translateX(-40px);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.anim-fly-out-left {
    animation: navFlyOutLeft 0.18s cubic-bezier(0.4, 0.0, 0.2, 1) forwards !important;
}

.anim-fly-in-right {
    animation: navFlyInRight 0.22s cubic-bezier(0.0, 0.0, 0.2, 1) forwards !important;
}

.anim-fly-out-right {
    animation: navFlyOutRight 0.18s cubic-bezier(0.4, 0.0, 0.2, 1) forwards !important;
}

.anim-fly-in-left {
    animation: navFlyInLeft 0.22s cubic-bezier(0.0, 0.0, 0.2, 1) forwards !important;
}

/* ── Full Screen Blackout Avenza Instruction Modal ── */
.avenza-blackout-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.2rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.avenza-blackout-modal.is-open {
    opacity: 1;
    pointer-events: auto;
}

.avenza-modal-backdrop {
    position: fixed;
    inset: 0;
    background: #000000 !important;
    opacity: 0.96 !important;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

.avenza-modal-panel {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 380px;
    background: rgba(18, 18, 20, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 24px;
    padding: 1.5rem 1.4rem 1.4rem 1.4rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9), 0 0 40px rgba(100, 181, 246, 0.15);
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    color: #ffffff;
    box-sizing: border-box;
    transform: scale(0.92);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.avenza-blackout-modal.is-open .avenza-modal-panel {
    transform: scale(1);
}

.avenza-modal-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-align: center;
}

.avenza-transfer-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
}

.avenza-modal-icon-badge {
    width: 60px;
    height: 60px;
    border-radius: 17px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.avenza-selection-badge,
.avenza-modal-header .avenza-selection-badge {
    width: auto !important;
    height: 54px !important;
    border: none !important;
    border-radius: 0 !important;
    overflow: visible !important;
    box-shadow: none !important;
    background: transparent !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.avenza-selection-badge img,
#avenza-selection-thumb {
    height: 54px !important;
    width: auto !important;
    max-width: 90px !important;
    object-fit: contain !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    filter: none !important;
}

.avenza-transfer-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8e8e93 !important;
    opacity: 1 !important;
}

.avenza-modal-app-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avenza-modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.02em;
    margin: 0;
}

.avenza-target-name {
    color: var(--accent-primary, #64b5f6) !important;
    font-weight: 700;
}

.avenza-step-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.avenza-step-item {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    background: rgba(255, 255, 255, 0.035);
    border: none !important;
    border-radius: 18px;
    padding: 0.95rem 1rem;
}

.avenza-step-badge {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--accent-primary, #64b5f6);
    color: #000000;
    font-size: 0.82rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 0.05rem;
}

.avenza-step-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
    min-width: 0;
}

.avenza-step-heading {
    font-size: 0.92rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    line-height: 1.3;
}

.avenza-step-text {
    font-size: 0.82rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.avenza-modal-close {
    position: absolute !important;
    top: 1.2rem !important;
    right: 1.2rem !important;
    z-index: 10 !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.08) !important;
    color: rgba(255, 255, 255, 0.7) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.avenza-modal-close:hover {
    background: rgba(255, 255, 255, 0.18) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.24) !important;
}

.avenza-filename-pill {
    display: inline-block;
    padding: 0.12rem 0.45rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.95);
    border-radius: 6px;
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.78rem;
    font-weight: 500;
    word-break: break-all;
}

.avenza-ui-badge {
    display: inline-block;
    padding: 0.05rem 0.4rem;
    background: rgba(255, 255, 255, 0.14);
    border-radius: 5px;
    font-weight: 700;
    color: #ffffff;
    font-size: 0.8rem;
}

.avenza-step-action-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    align-self: flex-start !important;
    padding: 0.4rem 0.85rem !important;
    background: var(--accent-primary, #64b5f6) !important;
    color: #000000 !important;
    border: none !important;
    border-radius: 9999px !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    gap: 0.35rem;
    margin-top: 0.35rem;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: none !important;
}

.avenza-continue-btn {
    width: 100%;
    padding: 0.75rem 1.2rem !important;
    background: var(--accent-primary, #64b5f6) !important;
    color: #000000 !important;
    border: none !important;
    border-radius: 9999px !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: none !important;
}

.avenza-step-action-btn:hover,
.avenza-continue-btn:hover {
    background: var(--accent-hover, #93c5fd) !important;
    color: #000000 !important;
    transform: translateY(-1px);
    box-shadow: none !important;
}

.avenza-step-action-btn:active,
.avenza-continue-btn:active {
    transform: scale(0.98);
}

.avenza-step-action-btn.is-downloaded {
    background: #34c759 !important;
    color: #000000 !important;
}

/* Hide mobile bottom navigation bar when Avenza instruction blackout screen is open */
body:has(#avenza-instruction-modal.is-open) .mobile-bottom-nav-container,
body.has-avenza-modal .mobile-bottom-nav-container,
.avenza-blackout-modal.is-open ~ .mobile-bottom-nav-container {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(120px) !important;
}

/* ==========================================================================
   LIGHT THEME (LIGHT MODE) OVERRIDES FOR MAPS PAGE
   ========================================================================== */

:root[data-theme="light"],
html.theme-light,
body.theme-light {
    --color-bg: #ffffff;
    --color-text: #111827;
    --overlay-bg: rgba(255, 255, 255, 0.7);
    --color-surface: #f9fafb;
    --color-heading: #111827;
    --color-body: #374151;
    --color-border: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] body.page-maps-tile,
html.theme-light body.page-maps-tile,
body.page-maps-tile.theme-light {
    background-color: #ffffff !important;
}

[data-theme="light"] .page-maps-tile .intro-header,
html.theme-light .page-maps-tile .intro-header,
body.theme-light .page-maps-tile .intro-header {
    background: #ffffff !important;
    border: none !important;
    border-bottom: none !important;
}

[data-theme="light"] .header-view-toggle,
html.theme-light .header-view-toggle,
body.theme-light .header-view-toggle {
    color: #111827 !important;
    background: transparent !important;
    border: none !important;
}

[data-theme="light"] .header-view-toggle:hover,
html.theme-light .header-view-toggle:hover,
body.theme-light .header-view-toggle:hover {
    color: #000000 !important;
    background: rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] .header-view-toggle__icon-wrap,
html.theme-light .header-view-toggle__icon-wrap,
body.theme-light .header-view-toggle__icon-wrap {
    color: #111827 !important;
}

[data-theme="light"] .header-view-toggle:hover .header-view-toggle__icon-wrap,
html.theme-light .header-view-toggle:hover .header-view-toggle__icon-wrap,
body.theme-light .header-view-toggle:hover .header-view-toggle__icon-wrap {
    color: #000000 !important;
}

[data-theme="light"] .header-view-toggle__chevron,
html.theme-light .header-view-toggle__chevron,
body.theme-light .header-view-toggle__chevron {
    stroke: #111827 !important;
}

[data-theme="light"] .header-view-toggle:hover .header-view-toggle__chevron,
html.theme-light .header-view-toggle:hover .header-view-toggle__chevron,
body.theme-light .header-view-toggle:hover .header-view-toggle__chevron {
    stroke: #000000 !important;
}

[data-theme="light"] .header-view-menu,
html.theme-light .header-view-menu,
body.theme-light .header-view-menu {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12) !important;
}

[data-theme="light"] .header-view-menu__item,
html.theme-light .header-view-menu__item,
body.theme-light .header-view-menu__item {
    color: #374151 !important;
}

[data-theme="light"] .header-view-menu__item:hover,
html.theme-light .header-view-menu__item:hover,
body.theme-light .header-view-menu__item:hover {
    background: rgba(0, 0, 0, 0.05) !important;
    color: #111827 !important;
}

[data-theme="light"] .header-view-menu__icon,
html.theme-light .header-view-menu__icon,
body.theme-light .header-view-menu__icon {
    stroke: #374151 !important;
}

[data-theme="light"] .header-view-menu__item:hover .header-view-menu__icon,
html.theme-light .header-view-menu__item:hover .header-view-menu__icon,
body.theme-light .header-view-menu__item:hover .header-view-menu__icon {
    stroke: #111827 !important;
}

[data-theme="light"] .header-logo-container,
html.theme-light .header-logo-container,
body.theme-light .header-logo-container {
    background: transparent !important;
    border-radius: 0 !important;
    margin-left: 0 !important;
    padding: 0 !important;
}

[data-theme="light"] .page-maps-tile .logo--header,
html.theme-light .page-maps-tile .logo--header,
body.theme-light .page-maps-tile .logo--header {
    height: 52px !important;
    border-radius: 0 !important;
    filter: invert(1) !important;
}

[data-theme="light"] .maps-tile-sidebar,
[data-theme="light"] #sidebar-zone-list,
[data-theme="light"] .maps-tile-sidebar__scroll,
[data-theme="light"] .maps-tile-main,
[data-theme="light"] .maps-tile-content,
html.theme-light .maps-tile-sidebar,
html.theme-light #sidebar-zone-list,
html.theme-light .maps-tile-sidebar__scroll,
html.theme-light .maps-tile-main,
html.theme-light .maps-tile-content,
body.theme-light .maps-tile-sidebar,
body.theme-light #sidebar-zone-list,
body.theme-light .maps-tile-sidebar__scroll,
body.theme-light .maps-tile-main,
body.theme-light .maps-tile-content {
    background: #ffffff !important;
    background-color: #ffffff !important;
    border: none !important;
    border-right: none !important;
}



[data-theme="light"] .maps-tile-sidebar__header,
html.theme-light .maps-tile-sidebar__header,
body.theme-light .maps-tile-sidebar__header {
    background: #ffffff !important;
    border: none !important;
}

[data-theme="light"] .maps-tile-sidebar__header::after,
html.theme-light .maps-tile-sidebar__header::after,
body.theme-light .maps-tile-sidebar__header::after {
    background: linear-gradient(to bottom, #ffffff 0%, rgba(255, 255, 255, 0) 100%) !important;
}

[data-theme="light"] .mobile-resize-bar,
html.theme-light .mobile-resize-bar,
body.theme-light .mobile-resize-bar {
    background: #ffffff !important;
    border: none !important;
}

[data-theme="light"] .mobile-resize-bar::after,
html.theme-light .mobile-resize-bar::after,
body.theme-light .mobile-resize-bar::after {
    background: linear-gradient(to bottom, #ffffff 0%, rgba(255, 255, 255, 0) 100%) !important;
}

[data-theme="light"] .maps-tile-header,
html.theme-light .maps-tile-header,
body.theme-light .maps-tile-header {
    background: #ffffff !important;
    margin: 0 !important;
    padding: calc(0.75rem + env(safe-area-inset-top, 0px)) 1rem 0.4rem 1rem !important;
    width: 100% !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

[data-theme="light"] .maps-tile-header__title,
html.theme-light .maps-tile-header__title,
body.theme-light .maps-tile-header__title {
    color: #111827 !important;
}

[data-theme="light"] .header-logo-text,
html.theme-light .header-logo-text,
body.theme-light .header-logo-text {
    color: #111827 !important;
}

[data-theme="light"] .sidebar-capsule,
html.theme-light .sidebar-capsule,
body.theme-light .sidebar-capsule {
    background: rgba(0, 0, 0, 0.05) !important;
    color: #4b5563 !important;
    border: none !important;
}

[data-theme="light"] .sidebar-capsule:hover,
html.theme-light .sidebar-capsule:hover,
body.theme-light .sidebar-capsule:hover {
    background: rgba(0, 0, 0, 0.09) !important;
    color: #111827 !important;
}

[data-theme="light"] .sidebar-capsule.is-active,
[data-theme="light"] .sidebar-capsule.is-active:hover,
html.theme-light .sidebar-capsule.is-active,
html.theme-light .sidebar-capsule.is-active:hover,
body.theme-light .sidebar-capsule.is-active,
body.theme-light .sidebar-capsule.is-active:hover {
    background: rgba(var(--accent-rgb), 0.28) !important;
    color: var(--accent-primary) !important;
    font-weight: 700 !important;
}

[data-theme="light"] .tile-zone-item,
html.theme-light .tile-zone-item,
body.theme-light .tile-zone-item {
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 0 !important;
}

[data-theme="light"] .tile-zone-item:last-child,
html.theme-light .tile-zone-item:last-child,
body.theme-light .tile-zone-item:last-child {
    border-bottom: none !important;
}

[data-theme="light"] .tile-zone-item:hover,
[data-theme="light"] .tile-zone-item.is-hovered,
html.theme-light .tile-zone-item:hover,
html.theme-light .tile-zone-item.is-hovered,
body.theme-light .tile-zone-item:hover,
body.theme-light .tile-zone-item.is-hovered {
    background: rgba(0, 0, 0, 0.04) !important;
    border-radius: 8px !important;
}

[data-theme="light"] .tile-zone-item__title,
[data-theme="light"] .tile-zone-item:hover .tile-zone-item__title,
[data-theme="light"] .tile-zone-item.is-hovered .tile-zone-item__title,
html.theme-light .tile-zone-item__title,
html.theme-light .tile-zone-item:hover .tile-zone-item__title,
html.theme-light .tile-zone-item.is-hovered .tile-zone-item__title,
body.theme-light .tile-zone-item__title,
body.theme-light .tile-zone-item:hover .tile-zone-item__title,
body.theme-light .tile-zone-item.is-hovered .tile-zone-item__title {
    color: #111827 !important;
}

[data-theme="light"] .tile-zone-item.is-active .tile-zone-item__title,
html.theme-light .tile-zone-item.is-active .tile-zone-item__title,
body.theme-light .tile-zone-item.is-active .tile-zone-item__title {
    color: var(--accent-primary) !important;
    font-weight: 700 !important;
}

[data-theme="light"] .tile-zone-item__meta,
[data-theme="light"] .tile-zone-item:hover .tile-zone-item__meta,
html.theme-light .tile-zone-item__meta,
html.theme-light .tile-zone-item:hover .tile-zone-item__meta,
body.theme-light .tile-zone-item__meta,
body.theme-light .tile-zone-item:hover .tile-zone-item__meta {
    color: #4b5563 !important;
}

[data-theme="light"] .tile-zone-item__thumb,
html.theme-light .tile-zone-item__thumb,
body.theme-light .tile-zone-item__thumb {
    background: #f3f4f6 !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .tile-zone-item__thumb svg,
html.theme-light .tile-zone-item__thumb svg,
body.theme-light .tile-zone-item__thumb svg {
    background: #f3f4f6 !important;
}

[data-theme="light"] .tile-zone-item__thumb:not(.tile-zone-item__thumb--organizer):not(.tile-zone-item__thumb--bird) svg path,
html.theme-light .tile-zone-item__thumb:not(.tile-zone-item__thumb--organizer):not(.tile-zone-item__thumb--bird) svg path,
body.theme-light .tile-zone-item__thumb:not(.tile-zone-item__thumb--organizer):not(.tile-zone-item__thumb--bird) svg path {
    fill: #e5e7eb !important;
    stroke: #6b7280 !important;
}

[data-theme="light"] .tile-zone-item__thumb--organizer,
html.theme-light .tile-zone-item__thumb--organizer,
body.theme-light .tile-zone-item__thumb--organizer,
[data-theme="light"] .tile-zone-item__thumb--bird,
html.theme-light .tile-zone-item__thumb--bird,
body.theme-light .tile-zone-item__thumb--bird {
    background: #f4f4f5 !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    color: #52525b !important;
}

[data-theme="light"] .tile-zone-item__thumb--organizer svg path,
[data-theme="light"] .tile-zone-item__thumb--organizer svg circle,
html.theme-light .tile-zone-item__thumb--organizer svg path,
html.theme-light .tile-zone-item__thumb--organizer svg circle,
body.theme-light .tile-zone-item__thumb--organizer svg path,
body.theme-light .tile-zone-item__thumb--organizer svg circle,
[data-theme="light"] .tile-zone-item__thumb--bird svg path,
[data-theme="light"] .tile-zone-item__thumb--bird svg circle,
html.theme-light .tile-zone-item__thumb--bird svg path,
html.theme-light .tile-zone-item__thumb--bird svg circle,
body.theme-light .tile-zone-item__thumb--bird svg path,
body.theme-light .tile-zone-item__thumb--bird svg circle {
    fill: none !important;
    stroke: #52525b !important;
}

[data-theme="light"] .tile-zone-item__thumb-placeholder,
html.theme-light .tile-zone-item__thumb-placeholder,
body.theme-light .tile-zone-item__thumb-placeholder {
    background: #f3f4f6 !important;
    color: #9ca3af !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .sidebar-overview-people__title,
html.theme-light .sidebar-overview-people__title,
body.theme-light .sidebar-overview-people__title {
    color: #111827 !important;
}

[data-theme="light"] .sidebar-overview-people__table th,
html.theme-light .sidebar-overview-people__table th,
body.theme-light .sidebar-overview-people__table th {
    color: #6b7280 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .sidebar-overview-people__table td,
html.theme-light .sidebar-overview-people__table td,
body.theme-light .sidebar-overview-people__table td {
    color: #111827 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .sidebar-overview-people__td-role,
html.theme-light .sidebar-overview-people__td-role,
body.theme-light .sidebar-overview-people__td-role {
    color: #4b5563 !important;
}

[data-theme="light"] .sidebar-overview-people__person-name,
html.theme-light .sidebar-overview-people__person-name,
body.theme-light .sidebar-overview-people__person-name {
    color: #111827 !important;
}

[data-theme="light"] .sidebar-overview-people__icon-btn,
html.theme-light .sidebar-overview-people__icon-btn,
body.theme-light .sidebar-overview-people__icon-btn {
    background: transparent !important;
    border: none !important;
    color: #6b7280 !important;
}

[data-theme="light"] .sidebar-overview-people__icon-btn:hover,
html.theme-light .sidebar-overview-people__icon-btn:hover,
body.theme-light .sidebar-overview-people__icon-btn:hover {
    background: transparent !important;
    border: none !important;
    color: var(--accent-primary) !important;
}

[data-theme="light"] .sidebar-overview-resources__title,
html.theme-light .sidebar-overview-resources__title,
body.theme-light .sidebar-overview-resources__title {
    color: #111827 !important;
}

[data-theme="light"] .sidebar-overview-resources__empty,
html.theme-light .sidebar-overview-resources__empty,
body.theme-light .sidebar-overview-resources__empty {
    color: #6b7280 !important;
}

[data-theme="light"] .sidebar-overview-preview,
html.theme-light .sidebar-overview-preview,
body.theme-light .sidebar-overview-preview {
    border-bottom: none !important;
}

[data-theme="light"] .sidebar-overview-preview__title,
html.theme-light .sidebar-overview-preview__title,
body.theme-light .sidebar-overview-preview__title {
    color: #111827 !important;
}

[data-theme="light"] .sidebar-overview-preview__action,
html.theme-light .sidebar-overview-preview__action,
body.theme-light .sidebar-overview-preview__action {
    color: var(--accent-primary) !important;
}

[data-theme="light"] .overview-preview-item,
html.theme-light .overview-preview-item,
body.theme-light .overview-preview-item {
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .overview-preview-item:last-child,
html.theme-light .overview-preview-item:last-child,
body.theme-light .overview-preview-item:last-child {
    border-bottom: none !important;
}

[data-theme="light"] .overview-preview-item:hover,
html.theme-light .overview-preview-item:hover,
body.theme-light .overview-preview-item:hover {
    background: rgba(0, 0, 0, 0.04) !important;
    border-radius: 8px !important;
}

[data-theme="light"] .overview-preview-item__name,
html.theme-light .overview-preview-item__name,
body.theme-light .overview-preview-item__name {
    color: #111827 !important;
    font-weight: 400 !important;
}

[data-theme="light"] .overview-preview-item:hover .overview-preview-item__name,
html.theme-light .overview-preview-item:hover .overview-preview-item__name,
body.theme-light .overview-preview-item:hover .overview-preview-item__name {
    color: var(--accent-primary) !important;
}

[data-theme="light"] .sidebar-about-wrapper,
[data-theme="light"] .sidebar-about-panel,
html.theme-light .sidebar-about-wrapper,
html.theme-light .sidebar-about-panel,
body.theme-light .sidebar-about-wrapper,
body.theme-light .sidebar-about-panel {
    color: #111827 !important;
}

[data-theme="light"] .sidebar-about-text,
[data-theme="light"] .sidebar-about-content p,
[data-theme="light"] .sidebar-birds-intro,
[data-theme="light"] .sidebar-overview-resources__empty,
[data-theme="light"] .tile-zone-item__meta,
[data-theme="light"] .tile-zone-item__meta-item,
html.theme-light .sidebar-about-text,
html.theme-light .sidebar-about-content p,
html.theme-light .sidebar-birds-intro,
html.theme-light .sidebar-overview-resources__empty,
html.theme-light .tile-zone-item__meta,
html.theme-light .tile-zone-item__meta-item,
body.theme-light .sidebar-about-text,
body.theme-light .sidebar-about-content p,
body.theme-light .sidebar-birds-intro,
body.theme-light .sidebar-overview-resources__empty,
body.theme-light .tile-zone-item__meta,
body.theme-light .tile-zone-item__meta-item {
    color: #4b5563 !important;
}

[data-theme="light"] .sidebar-birds-intro,
html.theme-light .sidebar-birds-intro,
body.theme-light .sidebar-birds-intro {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .sidebar-about-media,
html.theme-light .sidebar-about-media,
body.theme-light .sidebar-about-media {
    background: #f3f4f6 !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .sidebar-empty-state,
html.theme-light .sidebar-empty-state,
body.theme-light .sidebar-empty-state {
    color: #6b7280 !important;
}

[data-theme="light"] .sidebar-empty-state__icon,
html.theme-light .sidebar-empty-state__icon,
body.theme-light .sidebar-empty-state__icon {
    color: #9ca3af !important;
}

[data-theme="light"] .sidebar-empty-state__text,
html.theme-light .sidebar-empty-state__text,
body.theme-light .sidebar-empty-state__text {
    color: #6b7280 !important;
}

[data-theme="light"] .maps-tile-header__actions,
html.theme-light .maps-tile-header__actions,
body.theme-light .maps-tile-header__actions {
    background: rgba(255, 255, 255, 0.96) !important;
    border: 1px solid rgba(0, 0, 0, 0.10) !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .action-icon-btn,
html.theme-light .action-icon-btn,
body.theme-light .action-icon-btn {
    color: #111827 !important;
}

[data-theme="light"] .action-icon-btn span,
html.theme-light .action-icon-btn span,
body.theme-light .action-icon-btn span {
    color: #111827 !important;
}

[data-theme="light"] .action-icon-btn svg,
html.theme-light .action-icon-btn svg,
body.theme-light .action-icon-btn svg {
    stroke: #111827 !important;
}

[data-theme="light"] .action-icon-btn:hover,
[data-theme="light"] .action-icon-btn.is-active,
html.theme-light .action-icon-btn:hover,
html.theme-light .action-icon-btn.is-active,
body.theme-light .action-icon-btn:hover,
body.theme-light .action-icon-btn.is-active {
    color: var(--accent-primary) !important;
}

[data-theme="light"] .action-icon-btn:hover span,
[data-theme="light"] .action-icon-btn.is-active span,
html.theme-light .action-icon-btn:hover span,
html.theme-light .action-icon-btn.is-active span,
body.theme-light .action-icon-btn:hover span,
body.theme-light .action-icon-btn.is-active span {
    color: var(--accent-primary) !important;
}

[data-theme="light"] .action-icon-btn:hover svg,
[data-theme="light"] .action-icon-btn.is-active svg,
html.theme-light .action-icon-btn:hover svg,
html.theme-light .action-icon-btn.is-active svg,
body.theme-light .action-icon-btn:hover svg,
body.theme-light .action-icon-btn.is-active svg {
    stroke: var(--accent-primary) !important;
}

/* Sidebar Class Tabs Search, Back, and Info Icons */
[data-theme="light"] .sidebar-back-btn,
html.theme-light .sidebar-back-btn,
body.theme-light .sidebar-back-btn {
    color: #111827 !important;
}

[data-theme="light"] .sidebar-back-btn.is-disabled,
[data-theme="light"] .sidebar-back-btn:disabled,
html.theme-light .sidebar-back-btn.is-disabled,
html.theme-light .sidebar-back-btn:disabled,
body.theme-light .sidebar-back-btn.is-disabled,
body.theme-light .sidebar-back-btn:disabled {
    opacity: 0.22 !important;
    color: #9ca3af !important;
    cursor: default !important;
    pointer-events: none !important;
}

[data-theme="light"] .sidebar-back-btn svg,
html.theme-light .sidebar-back-btn svg,
body.theme-light .sidebar-back-btn svg {
    stroke: #111827 !important;
}

[data-theme="light"] .sidebar-back-btn:not(.is-disabled):not(:disabled):hover,
html.theme-light .sidebar-back-btn:not(.is-disabled):not(:disabled):hover,
body.theme-light .sidebar-back-btn:not(.is-disabled):not(:disabled):hover {
    color: #000000 !important;
}

[data-theme="light"] .sidebar-back-btn:not(.is-disabled):not(:disabled):hover svg,
html.theme-light .sidebar-back-btn:not(.is-disabled):not(:disabled):hover svg,
body.theme-light .sidebar-back-btn:not(.is-disabled):not(:disabled):hover svg {
    stroke: #000000 !important;
}

[data-theme="light"] .sidebar-search-toggle-btn,
html.theme-light .sidebar-search-toggle-btn,
body.theme-light .sidebar-search-toggle-btn {
    background: rgba(0, 0, 0, 0.05) !important;
    color: #111827 !important;
}

[data-theme="light"] .sidebar-search-toggle-btn:hover,
html.theme-light .sidebar-search-toggle-btn:hover,
body.theme-light .sidebar-search-toggle-btn:hover {
    background: rgba(0, 0, 0, 0.10) !important;
    color: #000000 !important;
}

[data-theme="light"] .sidebar-search-toggle-btn svg,
html.theme-light .sidebar-search-toggle-btn svg,
body.theme-light .sidebar-search-toggle-btn svg {
    stroke: #111827 !important;
}

[data-theme="light"] .sidebar-search-toggle-btn:hover svg,
html.theme-light .sidebar-search-toggle-btn:hover svg,
body.theme-light .sidebar-search-toggle-btn:hover svg {
    stroke: #000000 !important;
}

[data-theme="light"] .sidebar-capsule--icon,
html.theme-light .sidebar-capsule--icon,
body.theme-light .sidebar-capsule--icon {
    color: #111827 !important;
}

[data-theme="light"] .sidebar-capsule--icon svg,
html.theme-light .sidebar-capsule--icon svg,
body.theme-light .sidebar-capsule--icon svg {
    stroke: #111827 !important;
}

[data-theme="light"] .sidebar-search-expanded,
html.theme-light .sidebar-search-expanded,
body.theme-light .sidebar-search-expanded {
    background: #ffffff !important;
}

[data-theme="light"] .sidebar-search-container .search-icon,
[data-theme="light"] .sidebar-search-expanded .search-icon,
html.theme-light .sidebar-search-container .search-icon,
html.theme-light .sidebar-search-expanded .search-icon,
body.theme-light .sidebar-search-container .search-icon,
body.theme-light .sidebar-search-expanded .search-icon {
    color: #111827 !important;
    stroke: #111827 !important;
}

[data-theme="light"] .sidebar-search-close-btn,
html.theme-light .sidebar-search-close-btn,
body.theme-light .sidebar-search-close-btn {
    color: #111827 !important;
}

/* Top Desktop Nav Bar (Tools, Home, Settings) in Light Mode */
[data-theme="light"] .desktop-nav-tab,
html.theme-light .desktop-nav-tab,
body.theme-light .desktop-nav-tab {
    background: #e5e7eb !important;
    color: #000000 !important;
}

[data-theme="light"] .desktop-nav-tab:hover,
html.theme-light .desktop-nav-tab:hover,
body.theme-light .desktop-nav-tab:hover {
    background: #d1d5db !important;
    color: #000000 !important;
}

[data-theme="light"] .desktop-nav-tab__label,
html.theme-light .desktop-nav-tab__label,
body.theme-light .desktop-nav-tab__label {
    color: #000000 !important;
}

[data-theme="light"] .desktop-nav-tab:hover .desktop-nav-tab__label,
html.theme-light .desktop-nav-tab:hover .desktop-nav-tab__label,
body.theme-light .desktop-nav-tab:hover .desktop-nav-tab__label {
    color: #000000 !important;
}

[data-theme="light"] .desktop-nav-tab__icon,
html.theme-light .desktop-nav-tab__icon,
body.theme-light .desktop-nav-tab__icon {
    filter: brightness(0) !important;
    opacity: 0.85 !important;
}

[data-theme="light"] .desktop-nav-tab:hover .desktop-nav-tab__icon,
html.theme-light .desktop-nav-tab:hover .desktop-nav-tab__icon,
body.theme-light .desktop-nav-tab:hover .desktop-nav-tab__icon {
    filter: brightness(0) !important;
    opacity: 1 !important;
}

[data-theme="light"] .map-ctrl-btn,
html.theme-light .map-ctrl-btn,
body.theme-light .map-ctrl-btn {
    background: rgba(255, 255, 255, 0.94) !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    color: #111827 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .map-ctrl-btn:hover,
html.theme-light .map-ctrl-btn:hover,
body.theme-light .map-ctrl-btn:hover {
    background: #f3f4f6 !important;
    color: #000000 !important;
}

[data-theme="light"] #map-loading-placeholder,
html.theme-light #map-loading-placeholder,
body.theme-light #map-loading-placeholder {
    background: #f3f4f6 !important;
}

[data-theme="light"] .maps-tile-modal,
html.theme-light .maps-tile-modal,
body.theme-light .maps-tile-modal {
    background: transparent !important;
    border: none !important;
    color: #111827 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

[data-theme="light"] .maps-tile-modal__panel,
html.theme-light .maps-tile-modal__panel,
body.theme-light .maps-tile-modal__panel {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

[data-theme="light"] .maps-tile-modal__title,
html.theme-light .maps-tile-modal__title,
body.theme-light .maps-tile-modal__title {
    color: #111827 !important;
}

[data-theme="light"] .maps-tile-modal__description,
html.theme-light .maps-tile-modal__description,
body.theme-light .maps-tile-modal__description {
    color: #4b5563 !important;
}

[data-theme="light"] .sidebar-search-container,
html.theme-light .sidebar-search-container,
body.theme-light .sidebar-search-container {
    background: #f3f4f6 !important;
    border: 1px solid #e5e7eb !important;
}

[data-theme="light"] .sidebar-search-input,
html.theme-light .sidebar-search-input,
body.theme-light .sidebar-search-input {
    color: #111827 !important;
}

[data-theme="light"] .map-zone-label,
html.theme-light .map-zone-label,
body.theme-light .map-zone-label,
.is-light-basemap .map-zone-label {
    color: #000000 !important;
    text-shadow: none !important;
}

/* ==========================================================================
   LIGHT THEME MODAL & TOOLBAR COMPONENT OVERRIDES
   ========================================================================== */

[data-theme="light"] .maps-tile-header__actions,
html.theme-light .maps-tile-header__actions,
body.theme-light .maps-tile-header__actions {
    background: rgba(255, 255, 255, 0.88) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    color: #111827 !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .maps-tile-download-col,
html.theme-light .maps-tile-download-col,
body.theme-light .maps-tile-download-col {
    background: rgba(0, 0, 0, 0.03) !important;
    border: none !important;
}

[data-theme="light"] .maps-tile-download-col__title,
html.theme-light .maps-tile-download-col__title,
body.theme-light .maps-tile-download-col__title {
    color: #6b7280 !important;
}

[data-theme="light"] .maps-tile-download-item,
html.theme-light .maps-tile-download-item,
body.theme-light .maps-tile-download-item {
    background: rgba(0, 0, 0, 0.06) !important;
    color: #111827 !important;
    border: none !important;
}

[data-theme="light"] .maps-tile-download-item:hover,
html.theme-light .maps-tile-download-item:hover,
body.theme-light .maps-tile-download-item:hover {
    background: rgba(0, 0, 0, 0.12) !important;
    color: #000000 !important;
}

[data-theme="light"] .suggested-app-label,
html.theme-light .suggested-app-label,
body.theme-light .suggested-app-label {
    color: #4b5563 !important;
}

[data-theme="light"] .suggested-app-icon-wrap,
html.theme-light .suggested-app-icon-wrap,
body.theme-light .suggested-app-icon-wrap {
    box-shadow: 0 1.5px 5px rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .suggested-app-card:hover .suggested-app-label,
html.theme-light .suggested-app-card:hover .suggested-app-label,
body.theme-light .suggested-app-card:hover .suggested-app-label {
    color: #111827 !important;
    text-shadow: none !important;
}

[data-theme="light"] .suggested-app-icon-wrap--view-all,
html.theme-light .suggested-app-icon-wrap--view-all,
body.theme-light .suggested-app-icon-wrap--view-all {
    background: rgba(0, 0, 0, 0.05) !important;
    color: #111827 !important;
    border: none !important;
}

[data-theme="light"] .maps-tile-download-search-box,
html.theme-light .maps-tile-download-search-box,
body.theme-light .maps-tile-download-search-box {
    background: rgba(0, 0, 0, 0.04) !important;
    border: none !important;
}

[data-theme="light"] .maps-tile-download-search-input,
html.theme-light .maps-tile-download-search-input,
body.theme-light .maps-tile-download-search-input {
    color: #111827 !important;
}

[data-theme="light"] .maps-tile-download-search-input::placeholder,
html.theme-light .maps-tile-download-search-input::placeholder,
body.theme-light .maps-tile-download-search-input::placeholder {
    color: #9ca3af !important;
}

[data-theme="light"] .maps-tile-download-autocomplete,
html.theme-light .maps-tile-download-autocomplete,
body.theme-light .maps-tile-download-autocomplete {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.10) !important;
}

[data-theme="light"] .maps-tile-download-autocomplete .autocomplete-item,
html.theme-light .maps-tile-download-autocomplete .autocomplete-item,
body.theme-light .maps-tile-download-autocomplete .autocomplete-item {
    color: #111827 !important;
}

[data-theme="light"] .maps-tile-copy-desc,
html.theme-light .maps-tile-copy-desc,
body.theme-light .maps-tile-copy-desc {
    color: #4b5563 !important;
}

[data-theme="light"] .maps-tile-copy-input-row,
html.theme-light .maps-tile-copy-input-row,
body.theme-light .maps-tile-copy-input-row {
    background: rgba(0, 0, 0, 0.04) !important;
    border: none !important;
}

[data-theme="light"] .maps-tile-copy-input,
html.theme-light .maps-tile-copy-input,
body.theme-light .maps-tile-copy-input {
    color: #111827 !important;
}

[data-theme="light"] .maps-tile-qr-wrapper,
html.theme-light .maps-tile-qr-wrapper,
body.theme-light .maps-tile-qr-wrapper {
    background: transparent !important;
    border: none !important;
}

[data-theme="light"] .maps-tile-qr-img,
html.theme-light .maps-tile-qr-img,
body.theme-light .maps-tile-qr-img {
    filter: none !important;
}

[data-theme="light"] .suggest-form-label,
html.theme-light .suggest-form-label,
body.theme-light .suggest-form-label {
    color: #374151 !important;
}

[data-theme="light"] .suggest-form-input,
[data-theme="light"] .suggest-form-textarea,
html.theme-light .suggest-form-input,
html.theme-light .suggest-form-textarea,
body.theme-light .suggest-form-input,
body.theme-light .suggest-form-textarea {
    background: rgba(0, 0, 0, 0.04) !important;
    border: none !important;
    color: #111827 !important;
}

[data-theme="light"] .suggest-form-input:focus,
[data-theme="light"] .suggest-form-textarea:focus,
html.theme-light .suggest-form-input:focus,
html.theme-light .suggest-form-textarea:focus,
body.theme-light .suggest-form-input:focus,
body.theme-light .suggest-form-textarea:focus {
    background: rgba(0, 0, 0, 0.07) !important;
    border: none !important;
    outline: none !important;
}

[data-theme="light"] .suggest-draw-btn,
html.theme-light .suggest-draw-btn,
body.theme-light .suggest-draw-btn {
    background: rgba(0, 0, 0, 0.05) !important;
    color: #374151 !important;
    border: none !important;
}

[data-theme="light"] .suggest-draw-btn:hover,
html.theme-light .suggest-draw-btn:hover,
body.theme-light .suggest-draw-btn:hover {
    background: rgba(0, 0, 0, 0.10) !important;
    color: #111827 !important;
}

[data-theme="light"] .suggest-draw-btn.is-active,
html.theme-light .suggest-draw-btn.is-active,
body.theme-light .suggest-draw-btn.is-active {
    background: #111827 !important;
    color: #ffffff !important;
}

[data-theme="light"] .suggest-submit-btn,
html.theme-light .suggest-submit-btn,
body.theme-light .suggest-submit-btn {
    background: #111827 !important;
    color: #ffffff !important;
    border: none !important;
}

[data-theme="light"] .maps-tile-help-desc,
html.theme-light .maps-tile-help-desc,
body.theme-light .maps-tile-help-desc {
    color: #4b5563 !important;
}

[data-theme="light"] .help-toggle-card,
html.theme-light .help-toggle-card,
body.theme-light .help-toggle-card {
    background: rgba(0, 0, 0, 0.03) !important;
    border: none !important;
}

[data-theme="light"] .help-toggle-title,
html.theme-light .help-toggle-title,
body.theme-light .help-toggle-title {
    color: #111827 !important;
}

[data-theme="light"] .help-toggle-subtitle,
html.theme-light .help-toggle-subtitle,
body.theme-light .help-toggle-subtitle {
    color: #6b7280 !important;
}

[data-theme="light"] .help-slider,
html.theme-light .help-slider,
body.theme-light .help-slider {
    background-color: #cbd5e1 !important;
}

[data-theme="light"] .help-slider:before,
html.theme-light .help-slider:before,
body.theme-light .help-slider:before {
    background-color: #ffffff !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25) !important;
}

[data-theme="light"] .help-switch input:checked + .help-slider,
html.theme-light .help-switch input:checked + .help-slider,
body.theme-light .help-switch input:checked + .help-slider {
    background-color: var(--accent-primary) !important;
}

[data-theme="light"] .help-shortcut-badge,
html.theme-light .help-shortcut-badge,
body.theme-light .help-shortcut-badge {
    background: rgba(0, 0, 0, 0.07) !important;
    color: #111827 !important;
    border: none !important;
}

[data-theme="light"] .help-doc-link,
html.theme-light .help-doc-link,
body.theme-light .help-doc-link {
    background: rgba(0, 0, 0, 0.04) !important;
    color: #111827 !important;
    border: none !important;
}

/* All Compatible Apps Modal in Light Mode */
[data-theme="light"] .all-apps-full-modal,
html.theme-light .all-apps-full-modal,
body.theme-light .all-apps-full-modal {
    background: transparent !important;
}

[data-theme="light"] .all-apps-full-modal .all-apps-modal-panel,
html.theme-light .all-apps-full-modal .all-apps-modal-panel,
body.theme-light .all-apps-full-modal .all-apps-modal-panel {
    background: #ffffff !important;
    color: #111827 !important;
}

[data-theme="light"] .all-apps-modal-header-top .avenza-modal-title,
html.theme-light .all-apps-modal-header-top .avenza-modal-title,
body.theme-light .all-apps-modal-header-top .avenza-modal-title {
    color: #111827 !important;
}

[data-theme="light"] .all-apps-full-modal .avenza-modal-close,
html.theme-light .all-apps-full-modal .avenza-modal-close,
body.theme-light .all-apps-full-modal .avenza-modal-close {
    background: rgba(0, 0, 0, 0.05) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    color: rgba(0, 0, 0, 0.55) !important;
}

[data-theme="light"] .all-apps-full-modal .avenza-modal-close:hover,
html.theme-light .all-apps-full-modal .avenza-modal-close:hover,
body.theme-light .all-apps-full-modal .avenza-modal-close:hover {
    background: rgba(0, 0, 0, 0.09) !important;
    color: #111827 !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
}

[data-theme="light"] .all-apps-search-box,
html.theme-light .all-apps-search-box,
body.theme-light .all-apps-search-box {
    background: #f4f4f5 !important;
    border: 1px solid rgba(0, 0, 0, 0.10) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06) !important;
}

[data-theme="light"] .all-apps-search-box:focus-within,
html.theme-light .all-apps-search-box:focus-within,
body.theme-light .all-apps-search-box:focus-within {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.28) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] .all-apps-search-box .search-icon,
html.theme-light .all-apps-search-box .search-icon,
body.theme-light .all-apps-search-box .search-icon {
    color: rgba(0, 0, 0, 0.4) !important;
}

[data-theme="light"] .all-apps-search-box:focus-within .search-icon,
html.theme-light .all-apps-search-box:focus-within .search-icon,
body.theme-light .all-apps-search-box:focus-within .search-icon {
    color: #111827 !important;
}

[data-theme="light"] .all-apps-search-input,
html.theme-light .all-apps-search-input,
body.theme-light .all-apps-search-input {
    color: #111827 !important;
    background: transparent !important;
}

[data-theme="light"] .all-apps-search-input::placeholder,
html.theme-light .all-apps-search-input::placeholder,
body.theme-light .all-apps-search-input::placeholder {
    color: #9ca3af !important;
}

[data-theme="light"] .all-apps-search-clear,
html.theme-light .all-apps-search-clear,
body.theme-light .all-apps-search-clear {
    color: rgba(0, 0, 0, 0.4) !important;
}

[data-theme="light"] .all-apps-search-clear:hover,
html.theme-light .all-apps-search-clear:hover,
body.theme-light .all-apps-search-clear:hover {
    color: #111827 !important;
}

[data-theme="light"] .all-apps-grid .suggested-app-label,
html.theme-light .all-apps-grid .suggested-app-label,
body.theme-light .all-apps-grid .suggested-app-label {
    color: #4b5563 !important;
}

[data-theme="light"] .all-apps-grid .suggested-app-card:hover .suggested-app-label,
html.theme-light .all-apps-grid .suggested-app-card:hover .suggested-app-label,
body.theme-light .all-apps-grid .suggested-app-card:hover .suggested-app-label {
    color: #111827 !important;
}

[data-theme="light"] .all-apps-grid .suggested-app-card.is-active .suggested-app-label,
html.theme-light .all-apps-grid .suggested-app-card.is-active .suggested-app-label,
body.theme-light .all-apps-grid .suggested-app-card.is-active .suggested-app-label {
    color: var(--accent-primary) !important;
    text-shadow: none !important;
}

[data-theme="light"] .all-apps-no-results,
html.theme-light .all-apps-no-results,
body.theme-light .all-apps-no-results {
    color: rgba(0, 0, 0, 0.45) !important;
}

/* Avenza Instruction Modal in Light Mode */
[data-theme="light"] .avenza-modal-backdrop,
html.theme-light .avenza-modal-backdrop,
body.theme-light .avenza-modal-backdrop {
    background: rgba(255, 255, 255, 0.85) !important;
}

[data-theme="light"] .avenza-modal-panel,
html.theme-light .avenza-modal-panel,
body.theme-light .avenza-modal-panel {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.12) !important;
    color: #111827 !important;
}

[data-theme="light"] .avenza-modal-title,
html.theme-light .avenza-modal-title,
body.theme-light .avenza-modal-title {
    color: #111827 !important;
}

[data-theme="light"] .avenza-step-item,
html.theme-light .avenza-step-item,
body.theme-light .avenza-step-item {
    background: rgba(0, 0, 0, 0.035) !important;
}

[data-theme="light"] .avenza-step-heading,
html.theme-light .avenza-step-heading,
body.theme-light .avenza-step-heading {
    color: #111827 !important;
}

[data-theme="light"] .avenza-step-text,
html.theme-light .avenza-step-text,
body.theme-light .avenza-step-text {
    color: #4b5563 !important;
}

[data-theme="light"] .avenza-modal-close,
html.theme-light .avenza-modal-close,
body.theme-light .avenza-modal-close {
    background: rgba(0, 0, 0, 0.05) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    color: rgba(0, 0, 0, 0.55) !important;
}

[data-theme="light"] .avenza-modal-close:hover,
html.theme-light .avenza-modal-close:hover,
body.theme-light .avenza-modal-close:hover {
    background: rgba(0, 0, 0, 0.09) !important;
    color: #111827 !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
}

[data-theme="light"] .avenza-modal-icon-badge,
html.theme-light .avenza-modal-icon-badge,
body.theme-light .avenza-modal-icon-badge {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.06) !important;
}

[data-theme="light"] .avenza-selection-badge,
[data-theme="light"] .avenza-modal-header .avenza-selection-badge,
html.theme-light .avenza-selection-badge,
html.theme-light .avenza-modal-header .avenza-selection-badge,
body.theme-light .avenza-selection-badge,
body.theme-light .avenza-modal-header .avenza-selection-badge {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

[data-theme="light"] .avenza-selection-badge img,
[data-theme="light"] #avenza-selection-thumb,
html.theme-light .avenza-selection-badge img,
html.theme-light #avenza-selection-thumb,
body.theme-light .avenza-selection-badge img,
body.theme-light #avenza-selection-thumb {
    filter: invert(1) !important;
    border: none !important;
    box-shadow: none !important;
}

[data-theme="light"] .avenza-filename-pill,
html.theme-light .avenza-filename-pill,
body.theme-light .avenza-filename-pill {
    background: rgba(0, 0, 0, 0.05) !important;
    border: 1px solid rgba(0, 0, 0, 0.10) !important;
    color: #111827 !important;
}

[data-theme="light"] .avenza-ui-badge,
html.theme-light .avenza-ui-badge,
body.theme-light .avenza-ui-badge {
    background: rgba(0, 0, 0, 0.08) !important;
    color: #111827 !important;
}

/* Map Elements / Styles Switcher Popup in Light Mode */
[data-theme="light"] .maps-tile-map-container .map-ctrl-styles__list,
html.theme-light .maps-tile-map-container .map-ctrl-styles__list,
body.theme-light .maps-tile-map-container .map-ctrl-styles__list {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .maps-tile-map-container .modal-capsule,
html.theme-light .maps-tile-map-container .modal-capsule,
body.theme-light .maps-tile-map-container .modal-capsule {
    background: rgba(0, 0, 0, 0.05) !important;
    color: rgba(0, 0, 0, 0.55) !important;
}

[data-theme="light"] .maps-tile-map-container .modal-capsule:hover,
html.theme-light .maps-tile-map-container .modal-capsule:hover,
body.theme-light .maps-tile-map-container .modal-capsule:hover {
    background: rgba(0, 0, 0, 0.09) !important;
    color: #111827 !important;
}

[data-theme="light"] .maps-tile-map-container .modal-capsule.is-active,
html.theme-light .maps-tile-map-container .modal-capsule.is-active,
body.theme-light .maps-tile-map-container .modal-capsule.is-active {
    background: rgba(var(--accent-rgb), 0.14) !important;
    color: var(--accent-primary) !important;
}

[data-theme="light"] .maps-tile-map-container .modal-search-toggle-btn,
html.theme-light .maps-tile-map-container .modal-search-toggle-btn,
body.theme-light .maps-tile-map-container .modal-search-toggle-btn {
    background: rgba(0, 0, 0, 0.05) !important;
    color: rgba(0, 0, 0, 0.5) !important;
}

[data-theme="light"] .maps-tile-map-container .modal-search-toggle-btn:hover,
html.theme-light .maps-tile-map-container .modal-search-toggle-btn:hover,
body.theme-light .maps-tile-map-container .modal-search-toggle-btn:hover {
    background: rgba(0, 0, 0, 0.10) !important;
    color: #111827 !important;
}

[data-theme="light"] .maps-tile-map-container .modal-search-expanded,
html.theme-light .maps-tile-map-container .modal-search-expanded,
body.theme-light .maps-tile-map-container .modal-search-expanded {
    background: #ffffff !important;
}

[data-theme="light"] .maps-tile-map-container .modal-search-input,
html.theme-light .maps-tile-map-container .modal-search-input,
body.theme-light .maps-tile-map-container .modal-search-input {
    background: rgba(0, 0, 0, 0.04) !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    color: #111827 !important;
}

[data-theme="light"] .maps-tile-map-container .modal-search-input:focus,
html.theme-light .maps-tile-map-container .modal-search-input:focus,
body.theme-light .maps-tile-map-container .modal-search-input:focus {
    border-color: rgba(0, 0, 0, 0.25) !important;
    background: rgba(0, 0, 0, 0.07) !important;
}

[data-theme="light"] .maps-tile-map-container .modal-search-input-icon,
html.theme-light .maps-tile-map-container .modal-search-input-icon,
body.theme-light .maps-tile-map-container .modal-search-input-icon {
    color: rgba(0, 0, 0, 0.4) !important;
}

[data-theme="light"] .maps-tile-map-container .modal-search-close-btn,
html.theme-light .maps-tile-map-container .modal-search-close-btn,
body.theme-light .maps-tile-map-container .modal-search-close-btn {
    color: rgba(0, 0, 0, 0.5) !important;
}

[data-theme="light"] .maps-tile-map-container .modal-search-close-btn:hover,
html.theme-light .maps-tile-map-container .modal-search-close-btn:hover,
body.theme-light .maps-tile-map-container .modal-search-close-btn:hover {
    color: #111827 !important;
}

[data-theme="light"] .maps-tile-map-container .map-ctrl-styles__body,
html.theme-light .maps-tile-map-container .map-ctrl-styles__body,
body.theme-light .maps-tile-map-container .map-ctrl-styles__body {
    scrollbar-color: rgba(0, 0, 0, 0.15) transparent !important;
}

[data-theme="light"] .maps-tile-map-container .map-ctrl-styles__body::-webkit-scrollbar-thumb,
html.theme-light .maps-tile-map-container .map-ctrl-styles__body::-webkit-scrollbar-thumb,
body.theme-light .maps-tile-map-container .map-ctrl-styles__body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15) !important;
}

[data-theme="light"] .maps-tile-map-container .map-ctrl-styles__list .tile-zone-item,
html.theme-light .maps-tile-map-container .map-ctrl-styles__list .tile-zone-item,
body.theme-light .maps-tile-map-container .map-ctrl-styles__list .tile-zone-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
    color: #111827 !important;
}

[data-theme="light"] .maps-tile-map-container .map-ctrl-styles__list .tile-zone-item:hover,
html.theme-light .maps-tile-map-container .map-ctrl-styles__list .tile-zone-item:hover,
body.theme-light .maps-tile-map-container .map-ctrl-styles__list .tile-zone-item:hover {
    background: rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .maps-tile-map-container .map-ctrl-styles__list .tile-zone-item__title,
html.theme-light .maps-tile-map-container .map-ctrl-styles__list .tile-zone-item__title,
body.theme-light .maps-tile-map-container .map-ctrl-styles__list .tile-zone-item__title {
    color: #1f2937 !important;
}

[data-theme="light"] .maps-tile-map-container .map-ctrl-styles__list .tile-zone-item:hover .tile-zone-item__title,
[data-theme="light"] .maps-tile-map-container .map-ctrl-styles__list .tile-zone-item.is-hovered .tile-zone-item__title,
html.theme-light .maps-tile-map-container .map-ctrl-styles__list .tile-zone-item:hover .tile-zone-item__title,
body.theme-light .maps-tile-map-container .map-ctrl-styles__list .tile-zone-item:hover .tile-zone-item__title {
    color: #000000 !important;
}

[data-theme="light"] .maps-tile-map-container .map-ctrl-styles__list .tile-zone-item.is-active,
html.theme-light .maps-tile-map-container .map-ctrl-styles__list .tile-zone-item.is-active,
body.theme-light .maps-tile-map-container .map-ctrl-styles__list .tile-zone-item.is-active {
    background: rgba(0, 0, 0, 0.06) !important;
    border-bottom: 1px solid transparent !important;
}

[data-theme="light"] .maps-tile-map-container .map-ctrl-styles__list .tile-zone-item.is-active .tile-zone-item__title,
html.theme-light .maps-tile-map-container .map-ctrl-styles__list .tile-zone-item.is-active .tile-zone-item__title,
body.theme-light .maps-tile-map-container .map-ctrl-styles__list .tile-zone-item.is-active .tile-zone-item__title {
    color: var(--accent-primary) !important;
    text-shadow: none !important;
}

[data-theme="light"] .maps-tile-map-container .map-ctrl-styles__list .tile-zone-item.is-child::before,
[data-theme="light"] .maps-tile-map-container .map-ctrl-styles__list .tile-zone-item.is-child::after,
html.theme-light .maps-tile-map-container .map-ctrl-styles__list .tile-zone-item.is-child::before,
body.theme-light .maps-tile-map-container .map-ctrl-styles__list .tile-zone-item.is-child::before {
    border-color: rgba(0, 0, 0, 0.20) !important;
}

[data-theme="light"] .maps-tile-map-container .modal-no-results,
html.theme-light .maps-tile-map-container .modal-no-results,
body.theme-light .maps-tile-map-container .modal-no-results {
    color: rgba(0, 0, 0, 0.45) !important;
}

[data-theme="light"] .maps-tile-map-container .modal-title,
html.theme-light .maps-tile-map-container .modal-title,
body.theme-light .maps-tile-map-container .modal-title {
    color: #111827 !important;
}

[data-theme="light"] .maps-tile-map-container .modal-close-btn,
html.theme-light .maps-tile-map-container .modal-close-btn,
body.theme-light .maps-tile-map-container .modal-close-btn {
    color: rgba(0, 0, 0, 0.45) !important;
}

[data-theme="light"] .maps-tile-map-container .modal-close-btn:hover,
html.theme-light .maps-tile-map-container .modal-close-btn:hover,
body.theme-light .maps-tile-map-container .modal-close-btn:hover {
    color: #111827 !important;
    background: rgba(0, 0, 0, 0.06) !important;
}

/* Help Mode Tooltip in Light Mode */
[data-theme="light"] .help-mode-tooltip,
html.theme-light .help-mode-tooltip,
body.theme-light .help-mode-tooltip {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.04) !important;
    color: #111827 !important;
}

[data-theme="light"] .help-mode-tooltip__desc,
html.theme-light .help-mode-tooltip__desc,
body.theme-light .help-mode-tooltip__desc {
    color: #4b5563 !important;
}

[data-theme="light"] .help-mode-tooltip__shortcut,
html.theme-light .help-mode-tooltip__shortcut,
body.theme-light .help-mode-tooltip__shortcut {
    background: rgba(0, 0, 0, 0.06) !important;
    color: #374151 !important;
}

[data-theme="light"] .help-mode-tooltip__shortcut svg,
html.theme-light .help-mode-tooltip__shortcut svg,
body.theme-light .help-mode-tooltip__shortcut svg {
    color: #6b7280 !important;
    stroke: #6b7280 !important;
}

[data-theme="light"] .help-mode-tooltip__shortcut-label,
html.theme-light .help-mode-tooltip__shortcut-label,
body.theme-light .help-mode-tooltip__shortcut-label {
    color: #4b5563 !important;
}

/* Toast Notification in Light Mode */
[data-theme="light"] .toast-notification,
[data-theme="light"] .maps-tile-map-area .toast-notification,
html.theme-light .toast-notification,
html.theme-light .maps-tile-map-area .toast-notification,
body.theme-light .toast-notification,
body.theme-light .maps-tile-map-area .toast-notification {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid rgba(0, 0, 0, 0.10) !important;
    color: #111827 !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.10), 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .toast-notification span,
[data-theme="light"] .maps-tile-map-area .toast-notification span,
html.theme-light .toast-notification span,
html.theme-light .maps-tile-map-area .toast-notification span,
body.theme-light .toast-notification span,
body.theme-light .maps-tile-map-area .toast-notification span {
    color: #111827 !important;
}

[data-theme="light"] .toast-notification.toast-notification--disabled,
[data-theme="light"] .maps-tile-map-area .toast-notification.toast-notification--disabled,
html.theme-light .toast-notification.toast-notification--disabled,
html.theme-light .maps-tile-map-area .toast-notification.toast-notification--disabled,
body.theme-light .toast-notification.toast-notification--disabled,
body.theme-light .maps-tile-map-area .toast-notification.toast-notification--disabled {
    color: #dc2626 !important;
    border-color: rgba(220, 38, 38, 0.25) !important;
    background: rgba(254, 242, 242, 0.96) !important;
}

[data-theme="light"] .toast-notification.toast-notification--disabled span,
[data-theme="light"] .maps-tile-map-area .toast-notification.toast-notification--disabled span,
html.theme-light .toast-notification.toast-notification--disabled span,
html.theme-light .maps-tile-map-area .toast-notification.toast-notification--disabled span,
body.theme-light .toast-notification.toast-notification--disabled span,
body.theme-light .maps-tile-map-area .toast-notification.toast-notification--disabled span {
    color: #dc2626 !important;
}

/* Exit Help Mode & Exit Annotation Mode Buttons in Light Mode */
[data-theme="light"] body.is-help-mode-active .mobile-help-exit-btn,
html.theme-light body.is-help-mode-active .mobile-help-exit-btn,
body.theme-light.is-help-mode-active .mobile-help-exit-btn {
    background: rgba(254, 242, 242, 0.96) !important;
    color: #dc2626 !important;
    border: 1px solid rgba(220, 38, 38, 0.22) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.10), 0 2px 8px rgba(220, 38, 38, 0.08) !important;
}

[data-theme="light"] body.is-help-mode-active .mobile-help-exit-btn:hover,
html.theme-light body.is-help-mode-active .mobile-help-exit-btn:hover,
body.theme-light.is-help-mode-active .mobile-help-exit-btn:hover {
    background: #ffffff !important;
    border-color: rgba(220, 38, 38, 0.35) !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.14) !important;
}

[data-theme="light"] .exit-help-key-badge,
html.theme-light .exit-help-key-badge,
body.theme-light .exit-help-key-badge {
    background: #ffffff !important;
    border: 1px solid rgba(220, 38, 38, 0.3) !important;
    color: #dc2626 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] body.is-annotation-mode .annotation-exit-btn,
html.theme-light body.is-annotation-mode .annotation-exit-btn,
body.theme-light.is-annotation-mode .annotation-exit-btn {
    background: rgba(254, 242, 242, 0.96) !important;
    color: #dc2626 !important;
    border: 1px solid rgba(220, 38, 38, 0.22) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.10), 0 2px 8px rgba(220, 38, 38, 0.08) !important;
}

[data-theme="light"] body.is-suggest-locked .suggest-exit-btn,
html.theme-light body.is-suggest-locked .suggest-exit-btn,
body.theme-light.is-suggest-locked .suggest-exit-btn {
    background: rgba(254, 242, 242, 0.96) !important;
    color: #dc2626 !important;
    border: 1px solid rgba(220, 38, 38, 0.22) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.10), 0 2px 8px rgba(220, 38, 38, 0.08) !important;
}

[data-theme="light"] body.is-suggest-locked .suggest-exit-btn:hover,
html.theme-light body.is-suggest-locked .suggest-exit-btn:hover,
body.theme-light.is-suggest-locked .suggest-exit-btn:hover {
    background: #ffffff !important;
    border-color: rgba(220, 38, 38, 0.35) !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.14) !important;
}

