html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

:root {
    --font-sans: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --sky-50: #f0f9ff;
    --sky-100: #e0f2fe;
    --sky-200: #bae6fd;
    --sky-500: #0ea5e9;
    --sky-600: #0284c7;
    --sky-700: #0369a1;
    --sky-950: #082f49;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --white: #ffffff;
    --bg-app: #f8fafc;
    --bg-header-box: rgba(255, 255, 255, 0.85);
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --border-color: rgba(226, 232, 240, 0.8);
    --card-bg: rgba(255, 255, 255, 0.72);
    --card-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.04), 0 4px 10px -5px rgba(0, 0, 0, 0.03);
    --card-shadow-hover: 0 20px 30px -5px rgba(2, 132, 199, 0.1), 0 10px 20px -5px rgba(0, 0, 0, 0.03);
    --overlay-bg: rgba(15, 23, 42, 0.45);
    --input-bg: rgba(226, 232, 240, 0.5);
    --active-chip-bg: #0284c7;
    --active-chip-text: #ffffff;
    --inactive-chip-bg: rgba(241, 245, 249, 0.8);
    --inactive-chip-text: #64748b;
    --text: #0f172a;
    --muted: #475569;
    --stroke: #94a3b8;
    --blue: #2563eb;
    --blue-hot: #f97316;
    --green: #22c55e;
    --green-hot: #16a34a;
    --selected: #7c3aed;
    --selected-fill: #f3e8ff;
    --rm-header-top: max(8px, env(safe-area-inset-top, 0px));
    --rm-header-block-height: 64px;
}

header {
    position: fixed !important;
    top: 8px !important;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100vw;
    z-index: 10;
    display: flex;
    justify-content: center;
    padding: 0 8px;
    box-sizing: border-box;
    background: transparent;
    pointer-events: none;
    isolation: isolate;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

header .header-container {
    --rm-nav-btn-size: 44px;
    width: 100%;
 /*   max-width: min(1440px, 100%);*/
    box-sizing: border-box;
    display: grid;
    grid-template-columns: minmax(0, max-content) minmax(180px, 1fr) minmax(0, max-content);
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
    pointer-events: auto;
}

@media (min-width: 768px) {
    header {
        position: fixed;
    }

    body:not(.family-page)>main[role="main"] {
        transition: padding-top 0.24s cubic-bezier(0.16, 1, 0.3, 1);
    }
}

header .header-brand-zone {
    justify-self: start;
    min-width: 0;
    max-width: 100%;
}

header .header-search-zone {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding: 0 4px;
    pointer-events: auto;
    box-sizing: border-box;
}

header .rm-search-ambient-wrapper {
    position: relative;
    width: 100%;
    max-width: 584px;
    min-width: 0;
    border-radius: 30px;
    isolation: isolate;
}

header .rm-search-ambient-wrapper>.ambient-spin-container {
    inset: -3px;
    z-index: 0;
}

header .rm-search-ambient-wrapper .ambient-border-line {
    border-radius: 32px;
    padding: 1.5px;
}

header .rm-search-ambient-wrapper .ambient-glow {
    inset: -10px;
    border-radius: 36px;
}

header .rm-header-search-wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    border-radius: 30px;
    overflow: hidden;
    isolation: isolate;
    position: relative;
    z-index: 1;
    background-color: white;
    background: 
    /* background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.05) 40%, rgba(255, 255, 255, 0.02));*/
    /*    backdrop-filter: blur(28px) saturate(200%) contrast(120%);
    -webkit-backdrop-filter: blur(28px) saturate(200%) contrast(120%);*/
    /*    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.4), inset 0 -10px 20px rgba(0, 0, 0, 0.1);
 border: 1px solid rgba(255, 255, 255, 0.15);
    transition: box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, background-color 0.3s ease;*/
}

header .rm-header-search-wrap.elite-floating {
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.15);
/*    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.4), inset 0 -10px 20px rgba(0, 0, 0, 0.1);
*/

}

header .rm-header-search-wrap:focus-within {
    border-color: rgba(14, 165, 233, 0.22);
    box-shadow:
        0 5px 12px rgba(15, 23, 42, 0.10),
        0 0 0 2px rgba(14, 165, 233, 0.08);
}

header .rm-search-ambient-wrapper.ambient-spin-active .rm-header-search-wrap {
    border-color: rgba(255, 255, 255, 0.04);
    box-shadow:
        0 18px 54px rgba(15, 23, 42, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.35),
        inset 0 -10px 20px rgba(0, 0, 0, 0.09);
}

header .rm-search-ambient-wrapper.search-results-ready .ambient-border-line {
    opacity: 0;
    transition-duration: .16s;
}

header .rm-search-ambient-wrapper.search-results-ready .ambient-glow {
    opacity: 0;
    filter: blur(18px);
    transition-duration: .16s;
}

header .rm-header-search-wrap.is-pressed,
header .rm-header-search-wrap:active {
    box-shadow:
        0 4px 10px rgba(15, 23, 42, 0.10),
        inset 0 1px 4px rgba(15, 23, 42, 0.10);
    border-color: rgba(148, 163, 184, 0.28);
}

header .rm-search-ambient-wrapper.has-autocomplete-open .rm-header-search-wrap {
    border-color: rgba(14, 165, 233, 0.34);
    border-bottom-right-radius: 30px;
    border-bottom-left-radius: 30px;
}

body.dark header .rm-header-search-wrap:focus-within {
    border-color: rgba(255, 255, 255, 0.24);
    box-shadow:
        0 5px 12px rgba(0, 0, 0, 0.28),
        0 0 0 2px rgba(255, 255, 255, 0.08);
}

body.dark header .rm-search-ambient-wrapper.ambient-spin-active .rm-header-search-wrap {
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow:
        0 18px 54px rgba(0, 0, 0, 0.48),
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 -10px 20px rgba(0, 0, 0, 0.12);
}

body.dark header .rm-header-search-wrap.is-pressed,
body.dark header .rm-header-search-wrap:active {
    border-color: rgba(255, 255, 255, 0.22);
    box-shadow:
        0 4px 10px rgba(0, 0, 0, 0.32),
        inset 0 1px 4px rgba(0, 0, 0, 0.28);
}

body.dark header .rm-search-ambient-wrapper.has-autocomplete-open .rm-header-search-wrap {
    border-color: rgba(255, 255, 255, 0.26);
}

header .rm-header-search-wrap .form-control {
    width: 100%;
    height: 44px;
    border: 0;
    border-radius: 30px;
    padding: 10px 44px 10px 42px;
    font-size: 15px;
    line-height: 1.4;
    color: var(--text-primary);
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

header .rm-header-search-wrap .form-control::placeholder {
    color: var(--slate-400);
    opacity: 0.92;
}

header .rm-header-search-wrap .form-control:focus {
    outline: 0;
    box-shadow: none;
    background: transparent;
    border-color: transparent;
}

header .rm-header-search-wrap .rm-search-icon {
    left: 14px;
    opacity: 0.78;
}

header .rm-header-search-wrap.busy .form-control {
    padding-right: 40px;
}

header .rm-header-search-wrap .rm-search-spinner {
    right: 14px;
}

header .elite-floating {
    box-shadow: 0 3px 5px rgba(15, 23, 42, 0.10);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease, transform .14s ease;
}

body.dark header .elite-floating {
    border: 1px solid var(--border-color);
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.38);
}

header .brand-box {
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 30px;
    pointer-events: auto;
/*    background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.05) 40%, rgba(255, 255, 255, 0.02));
*/    backdrop-filter: blur(28px) saturate(200%) contrast(120%);
    -webkit-backdrop-filter: blur(28px) saturate(200%) contrast(120%);
    box-shadow: 0 3px 5px rgba(15, 23, 42, 0.12);
    transition: background-color .3s ease;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 10px 20px;
}

@media (min-width: 768px) {
    header .brand-box {
        padding: 10px 20px;
    }
}

header .brand-logo-btn {
    width: 36px;
    height: 36px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    box-shadow: 0 4px 14px 0 rgba(2, 132, 199, 0.38);
    cursor: pointer;
    animation: pulse-slow 3s infinite ease-in-out;
    border: none;
    outline: none;
}

header .brand-logo-btn:hover {
    transform: translateY(-1px) scale(1.04);
}

header .text-col {
    display: flex;
    flex-direction: column;
}

header .brand-title {
/*    font-family: Georgia, "Times New Roman", serif;*/
    font-size: 12pt;
    font-weight: 600;
    text-transform: uppercase;
    color: #777777;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
    line-height: 1; 
}
[data-bs-theme="dark"] header .brand-title {
    color: white;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.9);
}



/*[data-bs-theme="light"] header .brand-title {
    --text-underlay: rgba(255, 255, 255, 0.9);
}

[data-bs-theme="dark"] header .brand-title {
    --text-underlay: rgba(0, 0, 0, 0.9);
}*/

header .brand-subtitle {
    font-size: 9px;
    font-weight: 600;
    color: var(--sky-600);
    text-transform: uppercase;
    letter-spacing: -0.01em;
    margin-top: 5px;
    
}

header .header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 10px;
    pointer-events: auto;
    min-width: 0;
    max-width: 100%;
    justify-self: end;
}

header .rm-header-lang-dropdown,
header .rm-favourites-dropdown-root,
header .rm-profile-dropdown {
    position: relative;
}

header .rm-lang-toggle {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

header .header-actions>div,
header .header-actions>button,
header .header-actions>a {
    flex: 0 0 var(--rm-nav-btn-size);
    width: var(--rm-nav-btn-size);
    height: var(--rm-nav-btn-size);
}

header a {
    text-decoration: none !important;
}
/*
header a.header-btn,
header a.header-btn:visited,
header a.header-btn:focus {
    color: var(--slate-400);
}
*/
header .dropdown-menu .dropdown-item {
    color: var(--bs-dropdown-color);
}

header .dropdown-menu .dropdown-item:hover,
header .dropdown-menu .dropdown-item:focus-visible,
header .dropdown-menu .dropdown-item.active {
    background: var(--bs-tertiary-bg);
    color: var(--bs-body-color);
}

[data-bs-theme="dark"] header .dropdown-menu .dropdown-item:hover,
[data-bs-theme="dark"] header .dropdown-menu .dropdown-item:focus-visible,
[data-bs-theme="dark"] header .dropdown-menu .dropdown-item.active,
body.dark header .dropdown-menu .dropdown-item:hover,
body.dark header .dropdown-menu .dropdown-item:focus-visible,
body.dark header .dropdown-menu .dropdown-item.active {
    background: rgba(255, 255, 255, .10);
    color: rgba(255, 255, 255, .95);
}

header .header-btn,
header button.header-btn {
    width: var(--rm-nav-btn-size);
    height: var(--rm-nav-btn-size);
    min-width: var(--rm-nav-btn-size);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 9999px;
    cursor: pointer;
    color: var(--slate-400) !important;
    transform-origin: center;
    padding: 0;
    margin: 0;
    font: inherit;
    line-height: 1;
    appearance: none;
    -webkit-appearance: none;
    /*    background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.05) 40%, rgba(255, 255, 255, 0.02));
   
    box-shadow: 0 3px 5px rgba(15, 23, 42, 0.12);
    */
    backdrop-filter: blur(28px) saturate(200%) contrast(120%);
    -webkit-backdrop-filter: blur(28px) saturate(200%) contrast(120%);
    background-color: rgba(14, 165, 233, .08);
/*    box-shadow: 0 5px 10px rgba(15, 23, 42, .14);*/
    transition: background-color .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .14s ease;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

    header .header-btn:hover,
    header button.header-btn:hover,
    header .avatar-box:hover,
    header .brand-box:hover {
        color: white;
        border-color: rgba(14, 165, 233, .34);
      /*  background-color: rgba(14, 165, 233, .08);*/
        background-color: rgba(255, 255, 255, .08);
        box-shadow: 0 5px 10px rgba(15, 23, 42, .14);
        transform: translateY(-1px);
    }

[data-bs-theme="dark"] header .header-btn:hover,
body.dark header .header-btn:hover,
[data-bs-theme="dark"] header button.header-btn:hover,
body.dark header button.header-btn:hover,
[data-bs-theme="dark"] header .avatar-box:hover,
body.dark header .avatar-box:hover,
[data-bs-theme="dark"] header .brand-box:hover,
body.dark header .brand-box:hover {
    color: rgba(255, 255, 255, .94);
    border-color: rgba(255, 255, 255, .38);
    background-color: rgba(255, 255, 255, .12);
    box-shadow: 0 5px 10px rgba(0, 0, 0, .42);
}

header .header-btn i {
    font-size: 1.15rem;
    line-height: 1;
}

header .header-btn:active {
    transform: scale(0.94);
}

header .header-btn.active {
    color: var(--sky-600);
    background-color: var(--sky-50);
}

header .header-btn-language {
    display: flex !important;
    flex-direction: row;
    align-content: center;
    object-fit: cover;
    justify-content: center;
    align-items: center;
    gap: 2px;
}

header .header-btn-language>img {
    width: calc(var(--rm-nav-btn-size) - 6px);
    height: calc(var(--rm-nav-btn-size) - 6px);
    object-fit: cover;
    border-radius: 50%;
}

header .avatar-box {
    width: var(--rm-nav-btn-size);
    height: var(--rm-nav-btn-size);
    min-width: var(--rm-nav-btn-size);
    border-radius: 9999px;
    cursor: pointer;
    padding: 2px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-origin: center;
    color: var(--slate-400);
    background-color: rgba(14, 165, 233, .08);
    backdrop-filter: blur(28px) saturate(200%) contrast(120%);
    -webkit-backdrop-filter: blur(28px) saturate(200%) contrast(120%);
    box-shadow: 0 5px 10px rgba(15, 23, 42, .14);
    transition: background-color .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .14s ease;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

header .header-actions > .rm-profile-dropdown {
    flex: 0 1 auto;
    width: auto;
    height: var(--rm-nav-btn-size);
}

header .rm-profile-dropdown .avatar-box {
    width: auto;
    max-width: 220px;
    gap: 8px;
    padding: 2px 12px 2px 2px;
}

header .rm-profile-dropdown .avatar-img {
    width: calc(var(--rm-nav-btn-size) - 4px);
    height: calc(var(--rm-nav-btn-size) - 4px);
}

header .rm-profile-username {
    min-width: 0;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--bs-body-color);
    font-size: .84rem;
    font-weight: 700;
    line-height: 1;
}

header .avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 9999px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

header .avatar-box:hover .avatar-img {
    transform: scale(1.1);
}

@media (max-width: 991.98px) {
    header .header-container {
        grid-template-columns: minmax(0, max-content) minmax(140px, 1fr) minmax(0, max-content);
        gap: 8px 10px;
    }

    header .rm-search-ambient-wrapper {
        max-width: 480px;
    }

    header .rm-header-search-wrap {
        max-width: 480px;
    }

    header .rm-header-search-wrap .form-control {
        height: 42px;
        padding-top: 9px;
        padding-bottom: 9px;
        font-size: 16px; /* >= 16px prevents iOS Safari auto-zoom on focus */
    }
}

@media (min-width: 768px) and (max-width: 899.98px) {
    header .brand-box .text-col {
        display: none;
    }

    header .brand-box {
        padding: 6px;
        border-radius: 9999px;
    }

    header .brand-logo-btn,
    header .brand-logo-btn img {
        width: 32px;
        height: 32px;
    }

    header .header-container {
        grid-template-columns: minmax(44px, max-content) minmax(140px, 1fr) minmax(0, max-content);
    }
}

[dir="rtl"] header .rm-header-search-wrap .form-control {
    padding: 0 42px 0 44px;
}

[dir="rtl"] header .rm-header-search-wrap .rm-search-icon {
    left: auto;
    right: 14px;
}

[dir="rtl"] header .rm-header-search-wrap.busy .form-control {
    padding-left: 40px;
    padding-right: 44px;
}

[dir="rtl"] header .rm-header-search-wrap .rm-search-spinner {
    right: auto;
    left: 14px;
}

header button.header-btn.rm-header-search-toggle {
    display: none;
}

header button.header-btn.rm-mobile-menu-toggle {
    display: none;
}

@media (min-width: 768px) {
    header .header-search-zone {
        display: flex;
    }
}

@media (max-width: 767.98px) {
    :root {
        --rm-header-block-height: 52px;
    }

    html {
        overflow-x: clip;
    }

    body {
        overflow-x: clip;
    }

    /* Sticky in document flow for scroll pages; fixed over full-screen tree */
    body.family-page>header {
        position: fixed;
        left: 0;
        right: 0;
        width: 100%;
    }

    body:not(.family-page)>header {
        position: fixed !important;
    }

    body:not(.family-page)>main[role="main"] {
        padding-top: 0;
    }

    header {
        padding: 0 max(8px, env(safe-area-inset-right, 0px)) 0 max(8px, env(safe-area-inset-left, 0px));
    }

    header .header-container {
        --rm-nav-btn-size: 40px;
        width: 100%;
        grid-template-columns: minmax(0, 1fr) minmax(0, max-content);
        grid-template-rows: auto;
        grid-template-areas: "brand actions";
        gap: 8px;
        align-items: center;
    }

    header.is-search-open .header-container {
        grid-template-rows: auto auto;
        grid-template-areas:
            "brand actions"
            "search search";
    }

    header button.header-btn.rm-header-search-toggle {
        display: flex;
        flex: 0 0 auto;
  
    }

    header button.header-btn.rm-mobile-menu-toggle {
        display: flex;
        flex: 0 0 auto;
    }

    header .rm-tree-depth-dropdown-root,
    header .rm-desktop-favourites-root {
        display: none !important;
    }

    #header-trends-toggle {
        display: none !important;
    }

    header .header-brand-zone {
        grid-area: brand;
        justify-self: start;
        align-self: center;
        min-width: 0;
        max-width: 100%;
    }

    header .header-search-zone {
        display: none;
        grid-area: search;
        width: 100%;
        max-width: 100%;
        padding: 0;
    }

    header .rm-search-ambient-wrapper {
        max-width: none;
    }

    header.is-search-open .header-search-zone {
        display: flex;
        padding-top: 6px;
        animation: rm-header-search-in 0.24s cubic-bezier(0.16, 1, 0.3, 1);
    }

    @keyframes rm-header-search-in {
        from {
            opacity: 0;
            transform: translateY(-6px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    header .header-actions {
        grid-area: actions;
        justify-self: end;
        align-self: center;
        width: max-content;
        max-width: 100%;
        margin-left: auto;
        gap: 6px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        overscroll-behavior-x: contain;
    }

    header .header-actions::-webkit-scrollbar {
        display: none;
    }

    header .brand-box {
        padding: 8px 10px;
        gap: 8px;
        max-width: 100%;
    }

    header .brand-subtitle {
        display: none;
    }

    header .brand-title {
     
        font-size: 12px;
        letter-spacing: 0.12em;
    }

    header .rm-header-search-wrap {
        max-width: none;
        width: 100%;
        box-shadow:
            0 5px 12px rgba(15, 23, 42, 0.12),
            inset 0 1px 0 rgba(255, 255, 255, 0.28);
    }

    header .rm-header-search-wrap:focus-within {
        box-shadow:
            0 5px 12px rgba(15, 23, 42, 0.12),
            0 0 0 2px rgba(14, 165, 233, 0.08),
            inset 0 1px 0 rgba(255, 255, 255, 0.28);
    }

    header .rm-header-search-wrap .form-control {
        height: 40px;
        padding: 9px 36px 9px 38px;
        font-size: 14px;
        min-width: 0;
    }

    header .rm-header-search-wrap .rm-search-icon {
        left: 12px;
        width: 18px;
        height: 18px;
    }

    header .header-btn,
    header button.header-btn,
    header .avatar-box {
        flex-shrink: 0;
        margin-top:1px;
    }

    header .header-actions > .rm-profile-dropdown {
        flex: 0 0 var(--rm-nav-btn-size);
        width: var(--rm-nav-btn-size);
    }

    header .rm-profile-dropdown .avatar-box {
        width: var(--rm-nav-btn-size);
        max-width: var(--rm-nav-btn-size);
        padding: 2px;
        gap: 0;
    }

    header .rm-profile-username {
        display: none;
    }

    header .header-btn i {
        font-size: 1.05rem;
    }

    header .header-btn-language>img {
        width: calc(var(--rm-nav-btn-size) - 6px);
        height: calc(var(--rm-nav-btn-size) - 6px);
    }

    [dir="rtl"] header .header-container {
        grid-template-areas: "actions brand";
    }

    [dir="rtl"] header.is-search-open .header-container {
        grid-template-areas:
            "actions brand"
            "search search";
    }
}

@media (max-width: 767.98px) {
    header .brand-box .text-col {
        display: none;
    }

    header .brand-box {
        padding: 6px;
        border-radius: 9999px;
    }

    header .brand-logo-btn {
        width: 32px;
        height: 32px;
    }

    header .brand-logo-btn img {
        width: 32px;
        height: 32px;
    }

    header .header-actions {
        max-width: calc(100vw - 56px);
    }

    header .header-container {
        --rm-nav-btn-size: 38px;
    }

    header .rm-header-search-wrap .form-control {
        height: 38px;
        padding: 8px 34px 8px 36px;
        font-size: 16px; /* >= 16px prevents iOS Safari auto-zoom on focus */
    }

    header .rm-header-search-wrap .form-control::placeholder {
        font-size: 16px;
    }
}

@keyframes ambient-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.ambient-spin-container {
    position: absolute;
    inset: -2px;
    pointer-events: none;
    z-index: 10;
}

/* Modal Ambient Spin Overrides */
.ambient-modal-spin-container .ambient-border-line {
    border-radius: 2.8rem;
    padding: 2px;
}

.ambient-modal-spin-container .ambient-glow {
    border-radius: 3rem;
    filter: blur(20px);
}

/* Custom Error Ambient Spin */
.ambient-error-spin-container .ambient-border-line {
    border-radius: 2.8rem;
    padding: 2.5px;
}

.ambient-error-spin-container .ambient-glow {
    border-radius: 3rem;
    filter: blur(25px);
}

.ambient-error-spin-container .ambient-border-line::before {
    background: conic-gradient(rgba(244, 63, 94, 0) 0deg,
            rgb(244, 63, 94) 30deg,
            rgb(225, 29, 72) 60deg,
            rgb(249, 115, 22) 90deg,
            rgba(244, 63, 94, 0.4) 0.5turn,
            rgba(244, 63, 94, 0) 0.8turn,
            rgba(244, 63, 94, 0) 1turn);
}

.ambient-error-spin-container .ambient-glow::before {
    background: conic-gradient(rgba(244, 63, 94, 0) 0deg,
            rgb(244, 63, 94) 30deg,
            rgb(225, 29, 72) 60deg,
            rgb(249, 115, 22) 90deg,
            rgba(244, 63, 94, 0.4) 0.5turn,
            rgba(244, 63, 94, 0) 0.8turn,
            rgba(244, 63, 94, 0) 1turn);
}

.ambient-border-line {
    position: absolute;
    inset: 0;
    border-radius: 2.2rem;
    padding: 1.5px;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.ambient-border-line::before {
    content: "";
    position: absolute;
    left: -50%;
    top: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(rgba(52, 168, 82, 0) 0deg,
            rgb(52, 168, 82) 38.9738deg,
            rgb(255, 211, 20) 62.3678deg,
            rgb(255, 70, 65) 87.0062deg,
            rgb(49, 134, 255) 107.428deg,
            rgba(49, 134, 255, 0.5) 0.568turn,
            rgba(49, 134, 255, 0) 0.858turn,
            rgba(52, 168, 82, 0) 1turn);
    animation: ambient-spin 5s linear infinite;
    animation-play-state: paused;
}

.ambient-glow {
    position: absolute;
    inset: -12px;
    opacity: 0;
    transition: opacity 1s ease, filter 1s ease;
    filter: blur(15px);
    z-index: -1;
    overflow: hidden;
    border-radius: 4rem;
}

.ambient-glow::before {
    content: "";
    position: absolute;
    left: -50%;
    top: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(rgba(52, 168, 82, 0) 0deg,
            rgb(52, 168, 82) 38.9738deg,
            rgb(255, 211, 20) 62.3678deg,
            rgb(255, 70, 65) 87.0062deg,
            rgb(49, 134, 255) 107.428deg,
            rgba(49, 134, 255, 0.5) 0.568turn,
            rgba(49, 134, 255, 0) 0.858turn,
            rgba(52, 168, 82, 0) 1turn);
    animation: ambient-spin 8s linear infinite;
    animation-play-state: paused;
}

.ambient-spin-active .ambient-border-line {
    opacity: 1;
}

.ambient-spin-active .ambient-glow {
    opacity: 0.7;
    filter: blur(25px) brightness(1.1);
}

.ambient-spin-active .ambient-border-line::before,
.ambient-spin-active .ambient-glow::before {
    animation-play-state: running;
}

.ambient-spin-active .ambient-spin-target {
    border-color: transparent !important;
    box-shadow: none !important;
}

/* ── Global Scrollbar Hiding & Momentum Touch Scrolling ── */
::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

* {
    scrollbar-width: none !important;
    /* Firefox */
    -ms-overflow-style: none !important;
    /* IE and Edge */
    -webkit-overflow-scrolling: touch;
    /* Smooth momentum scrolling on mobile */
}



.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem var(--bs-body-bg), 0 0 0 0.25rem var(--bs-primary);
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
}

.form-floating>.form-control-plaintext::placeholder,
.form-floating>.form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating>.form-control-plaintext:focus::placeholder,
.form-floating>.form-control:focus::placeholder {
    text-align: start;
}

.footer {
    position: fixed;
    bottom: 0 !important;
    z-index: 100;
    display: flex;
    padding-right: 5px !important;
    padding-left: 5px !important;
    align-items: center;
    width: 100% !important;
    justify-content: center;
    line-height: 1em !important;
}

body.family-page .footer {
    display: none !important;
}

.footer .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px !important;
    background: #ffffffaa !important;
    color: rgb(30, 41, 59) !important;
    font-weight: 400;
    border-top-left-radius: 1rem !important;
    border-top-right-radius: 1rem !important;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    background-blend-mode: multiply, normal;
}

.footer-item {
    flex: 1;
}

.footer a {
    color: #003366;
}

.footer a:hover {
    color: #336699;
}

.footer-links {
    align-items: end !important;
    justify-content: flex-end !important;
    display: flex;
    gap: 10px;
}

.footer-links>a {
    text-decoration: none;
    --bg-opacity: 1 !important;
    /*    color:rgb(117 117 117/var(--bg-opacity))!important;*/
    border-radius: 5px !important;
    padding: 5px !important;
    background: rgba(0, 0, 0, 0.50) !important;
    opacity: 0.8;
    color: aliceblue;
    transition: 0.3s;
}

.footer-links>a:hover {
    background-color: rgb(0 0 0/var(--bg-opacity)) !important;
    color: var(--bs-white) !important;
}

[data-bs-theme="dark"] .footer .container {
    background: rgba(18, 24, 31, .82) !important;
    color: var(--bs-body-color) !important;
    border-color: var(--bs-border-color);
}

[data-bs-theme="dark"] .footer a {
    color: var(--bs-link-color);
}

[data-bs-theme="dark"] .footer a:hover {
    color: var(--bs-link-hover-color);
}

[data-bs-theme="dark"] .footer-links>a {
    background: rgba(255, 255, 255, .08) !important;
    color: var(--bs-body-color);
}

[data-bs-theme="dark"] .footer-links>a:hover {
    background-color: rgba(255, 255, 255, .14) !important;
    color: var(--bs-link-hover-color) !important;
}

.footer-item.footer-text {
    flex: unset;
    white-space: nowrap;
}

@media (min-width: 768px) {

    .rm-nav-row .rm-lang-dropdown,
    .rm-nav-row .rm-profile-dropdown,
    .rm-nav-row .rm-menu-dropdown {
        position: relative;
    }

    .rm-nav-row .rm-lang-dropdown>.dropdown-menu,
    .rm-nav-row .rm-profile-dropdown>.dropdown-menu,
    .rm-nav-row .rm-menu-dropdown>.dropdown-menu {
        position: absolute;
        inset: auto 0 auto auto;
        top: 100%;
    }
}

.rm-lang-flag {
    width: 1.25rem;
    height: .875rem;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, .12);
    flex: 0 0 auto;
}

/* ===== Language picker (header) ===== */

.rm-header-lang-dropdown>.dropdown-menu.rm-lang-menu {
    --rm-lang-menu-pad: .45rem;
    min-width: 220px;
    margin-top: 0 !important;
    padding: var(--rm-lang-menu-pad);
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-dropdown-border-radius, .375rem);
    background: var(--bs-dropdown-bg);
    color: var(--bs-dropdown-color);
    box-shadow: var(--bs-box-shadow);
}

body.dark .rm-header-lang-dropdown>.dropdown-menu.rm-lang-menu {
    border-color: var(--bs-border-color);
    background: var(--bs-dropdown-bg);
    color: var(--bs-dropdown-color);
    box-shadow: var(--bs-box-shadow);
}

canvas {

    touch-action: pan-y;

}

@media (min-width: 768px) {
    .rm-header-lang-dropdown>.dropdown-menu.rm-lang-menu {
        position: absolute !important;
        top: calc(100% + 8px) !important;
        right: 0 !important;
        left: auto !important;
        transform: none !important;
    }
}

.rm-header-lang-dropdown .rm-lang-menu .dropdown-item.rm-lang-menu-item {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .5rem .65rem;
    border-radius: 8px;
    border: 0;
    font-size: .9rem;
    font-weight: 500;
    color: var(--bs-dropdown-color);
    
}

[data-bs-theme="dark"] .rm-header-lang-dropdown .rm-lang-menu .dropdown-item.rm-lang-menu-item,
body.dark .rm-header-lang-dropdown .rm-lang-menu .dropdown-item.rm-lang-menu-item {
    color: var(--bs-dropdown-color, #e5e7eb);
}

body.dark .rm-header-lang-dropdown>.dropdown-menu.rm-lang-menu {
    background: rgba(15, 23, 42, .98);
}

body.dark .rm-header-lang-dropdown .rm-lang-menu .dropdown-item.rm-lang-menu-item:hover,
body.dark .rm-header-lang-dropdown .rm-lang-menu .dropdown-item.rm-lang-menu-item:focus-visible {
    color: rgba(255, 255, 255, .95);
}

.rm-header-lang-dropdown .rm-lang-menu .dropdown-item.rm-lang-menu-item:hover,
.rm-header-lang-dropdown .rm-lang-menu .dropdown-item.rm-lang-menu-item:focus-visible {
    background: var(--bs-tertiary-bg);
    color: var(--bs-body-color);
}

.rm-header-lang-dropdown .rm-lang-menu .dropdown-item.rm-lang-menu-item.active {
    background: var(--bs-tertiary-bg);
    color: var(--bs-body-color);
    font-weight: 600;
}

[data-bs-theme="dark"] .rm-header-lang-dropdown .rm-lang-menu .dropdown-item.rm-lang-menu-item:hover,
[data-bs-theme="dark"] .rm-header-lang-dropdown .rm-lang-menu .dropdown-item.rm-lang-menu-item:focus-visible,
[data-bs-theme="dark"] .rm-header-lang-dropdown .rm-lang-menu .dropdown-item.rm-lang-menu-item.active,
body.dark .rm-header-lang-dropdown .rm-lang-menu .dropdown-item.rm-lang-menu-item.active {
    background: rgba(255, 255, 255, .10);
    color: rgba(255, 255, 255, .95);
}

.rm-lang-menu-ring {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    padding: 0;
    flex: 0 0 auto;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.rm-header-lang-dropdown .rm-lang-menu-item.active .rm-lang-menu-ring {
    background: transparent;
}

.rm-lang-menu-flag {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 1px solid var(--bs-border-color);
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.rm-lang-menu-label {
    min-width: 0;
    white-space: nowrap;
  
    text-overflow: ellipsis;
}

/* Mobile language bottom sheet */
.rm-lang-sheet {
    position: fixed;
    inset: 0;
    z-index: 1060;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    box-sizing: border-box;
    padding: 0 10px max(10px, env(safe-area-inset-bottom, 0px));
    pointer-events: none;
    visibility: hidden;
    opacity: 0;
    overscroll-behavior: contain;
    transition: visibility 0s linear 0.28s, opacity 0.22s ease;
}

.rm-lang-sheet.open {
    pointer-events: auto;
    visibility: visible;
    opacity: 1;
    transition: visibility 0s, opacity 0.22s ease;
}

.rm-lang-sheet[hidden] {
    display: none !important;
}

.rm-lang-sheet:not([hidden]).open {
    display: flex !important;
}

.rm-lang-sheet-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    padding: 0;
    margin: 0;
    background: var(--overlay-bg);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    cursor: pointer;
}

.rm-lang-sheet-panel {
    position: relative;
    width: 100%;
    max-width: min(100%, 520px);
    max-height: min(38vh, 240px);
    box-sizing: border-box;
    padding: 0 0 12px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.05) 40%, rgba(255, 255, 255, 0.02));
    backdrop-filter: blur(28px) saturate(200%) contrast(120%);
    -webkit-backdrop-filter: blur(28px) saturate(200%) contrast(120%);
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.35);
    transform: translateY(calc(100% + 24px));
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    flex-shrink: 0;
}

body.dark .rm-lang-sheet-panel {
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.rm-lang-sheet.open .rm-lang-sheet-panel {
    transform: translateY(0);
}

.rm-lang-sheet-grabber {
    width: 36px;
    height: 4px;
    margin: 8px auto 4px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.45);
}

.rm-lang-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 14px 8px;
}

.rm-lang-sheet-title {
    margin: 0;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.rm-lang-sheet-close {
    flex-shrink: 0;
    opacity: 0.65;
}

.rm-lang-stories-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 14px 2px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    touch-action: pan-x;
    cursor: grab;
    user-select: none;
}

.rm-lang-stories-scroll.is-dragging {
    cursor: grabbing;
    scroll-snap-type: none;
}

.rm-lang-stories-scroll::-webkit-scrollbar {
    display: none;
}

.rm-lang-story-card {
    flex: 0 0 auto;
    width: 62px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: var(--text-primary);
    scroll-snap-align: center;
    transition: transform 0.14s ease;
    -webkit-user-drag: none;
}

.rm-lang-story-card:active {
    transform: scale(0.95);
}

.rm-lang-story-ring {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    padding: 2px;
    background: rgba(148, 163, 184, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1);
}

.rm-lang-story-card.active .rm-lang-story-ring {
    padding: 2px;
    background: linear-gradient(135deg, var(--sky-500), var(--sky-600));
    box-shadow: 0 6px 18px rgba(14, 165, 233, 0.28);
}

.rm-lang-story-flag {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--bs-body-bg, #fff);
    display: block;
    pointer-events: none;
}

.rm-profile-sheet-menu {
    padding: 4px 12px 14px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .5rem;
}

.rm-profile-sheet-menu hr {
    grid-column: 1 / -1;
    margin: .1rem 0;
}

.rm-profile-sheet-menu form {
    grid-column: 1 / -1;
}

.rm-profile-sheet-menu .dropdown-item {
    min-height: 48px;
    border-radius: 10px;
    font-weight: 600;
    border: 1px solid var(--bs-border-color);
    background: var(--bs-body-bg);
    padding: .65rem .7rem;
    color: var(--bs-body-color) !important;
    transition: background-color .15s ease, color .15s ease;
    display: flex;
    align-items: center;
    gap: .5rem;
    width: 100%;
    text-align: left;
}

.rm-profile-sheet-menu .dropdown-item:hover,
.rm-profile-sheet-menu .dropdown-item:focus-visible {
    background: var(--bs-tertiary-bg);
    color: var(--bs-link-color) !important;
}

[data-bs-theme="dark"] .rm-profile-sheet-menu .dropdown-item:hover,
[data-bs-theme="dark"] .rm-profile-sheet-menu .dropdown-item:focus-visible,
body.dark .rm-profile-sheet-menu .dropdown-item:hover,
body.dark .rm-profile-sheet-menu .dropdown-item:focus-visible {
    background: rgba(255, 255, 255, .10);
    border-color: rgba(255, 255, 255, .36);
    color: rgba(255, 255, 255, .95) !important;
}

.rm-lang-story-label {
    width: 100%;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rm-lang-story-card.active .rm-lang-story-label {
    color: var(--sky-600);
}

/* Language offcanvas menu grid */
.rm-lang-menu-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .5rem;
}

.rm-lang-menu-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    min-height: 48px;
    padding: .65rem .7rem;
    border-radius: 10px;
    border: 1px solid var(--bs-border-color);
    background: var(--bs-body-bg);
    color: var(--bs-body-color) !important;
    font-weight: 600;
    text-decoration: none;
    transition: background-color .15s ease, color .15s ease;
}

.rm-lang-menu-item:hover,
.rm-lang-menu-item:focus-visible {
    background: var(--bs-tertiary-bg);
    color: var(--bs-link-color) !important;
}

.rm-lang-menu-item.active {
    border-color: var(--bs-primary);
    color: var(--bs-primary) !important;
}

[data-bs-theme="dark"] .rm-lang-menu-item:hover,
[data-bs-theme="dark"] .rm-lang-menu-item:focus-visible,
body.dark .rm-lang-menu-item:hover,
body.dark .rm-lang-menu-item:focus-visible {
    background: rgba(255, 255, 255, .10);
    border-color: rgba(255, 255, 255, .36);
    color: rgba(255, 255, 255, .95);
}

.rm-lang-menu-flag {
    width: 24px;
    height: 24px;
    border-radius: 3px;
    object-fit: cover;
    flex-shrink: 0;
}

html.rm-lang-sheet-open,
body.rm-lang-sheet-open {
    overflow: hidden;
    overscroll-behavior: none;
}

body.rm-lang-sheet-open {
    position: fixed;
    left: 0;
    right: 0;
    width: 100%;
}

body.rm-lang-sheet-open header {
    padding-right: var(--rm-scroll-lock-comp, 0px);
}

@media (max-width: 767.98px) {
    .rm-header-lang-dropdown>.dropdown-menu.rm-lang-menu {
        display: none !important;
    }
}

/* ===== Search autocomplete panel ===== */

.autocomplete {
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    border: 1px solid var(--bs-border-color);
    border-radius: 14px;
    box-shadow: 0 20px 48px rgba(15, 23, 42, .18), 0 4px 12px rgba(15, 23, 42, .07);
    overflow: auto;
    z-index: 1200;
}

/* Container: 3-column grid (full-width items overlap all cols) */
.autocomplete.rm-person-search {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .4rem;
    padding: .5rem;
}

.autocomplete.rm-person-search.rm-header-autocomplete {
    border-radius: 14px;
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    border: 1px solid var(--bs-border-color);
    box-shadow: 0 20px 48px rgba(15, 23, 42, .18), 0 4px 12px rgba(15, 23, 42, .07);
}

/* Base item reset (each div is a grid child) */
.autocomplete>div {
    line-height: 1.25;
    border-bottom: 0;
}

/* ── Person result cards ── */
.autocomplete.rm-person-search>div.rm-person-card {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    align-items: center;
    gap: .5rem;
    padding: .5rem .7rem;
    min-height: 58px;
    border-radius: 10px;
    border: 1px solid var(--bs-border-color);
    background: var(--bs-body-bg);
    cursor: pointer;
    transition: background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.autocomplete.rm-person-search>div.rm-person-card:hover,
.autocomplete.rm-person-search>div.rm-person-card.selected {
    background: var(--bs-tertiary-bg);
    border-color: var(--bs-link-color);
    box-shadow: 0 4px 14px rgba(13, 110, 253, .13);
    transform: translateY(-1px);
}

.autocomplete.rm-header-autocomplete>div.rm-person-card {
    grid-template-columns: 40px 1fr auto;
    justify-items: stretch;
    min-height: 58px;
    padding: .5rem .7rem;
    border-radius: 10px;
    background: var(--bs-body-bg);
    transition: background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.autocomplete.rm-header-autocomplete>div.rm-person-card:hover,
.autocomplete.rm-header-autocomplete>div.rm-person-card.selected {
    background: var(--bs-tertiary-bg);
    border-color: var(--bs-link-color);
    box-shadow: 0 4px 14px rgba(13, 110, 253, .13);
    transform: translateY(-1px);
}

.autocomplete.rm-header-autocomplete .imgctl {
    width: 40px;
    height: 40px;
}

/* Full-width slots (header, hints, separators) */
.autocomplete.rm-person-search>div.rm-tree-scope-header,
.autocomplete.rm-person-search>div.rm-tree-hint-item,
.autocomplete.rm-person-search>div.group,
.autocomplete.rm-person-search>div.empty {
    grid-column: 1 / -1;
}

/* Photo avatar */
.autocomplete .imgctl {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bs-secondary-bg);
    border: 1px solid var(--bs-border-color);
    flex-shrink: 0;
}

.autocomplete .imgctl img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

/* Name + occupation column */
.rm-search-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: .05rem;
}

.autocomplete-name {
    font-weight: 500;
    font-size: .97rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.autocomplete-name b {
    font-weight: 700;
}

.autocomplete-occ {
    font-size: .82rem;
    color: var(--bs-secondary-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Right column: tree badge (optional) above dates */
.rm-search-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .08rem;
    min-width: 52px;
}

.autocomplete-date {
    font-size: .82rem;
    color: var(--bs-secondary-color);
    white-space: nowrap;
    text-align: right;
}

/* Tree badge: only shown on non-Family pages */
.rm-result-tree-badge {
    font-size: .65rem;
    padding: .07rem .36rem;
    border-radius: 20px;
    background: var(--bs-secondary-bg);
    color: var(--bs-secondary-color);
    border: 1px solid var(--bs-border-color);
    white-space: nowrap;
    max-width: 88px;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: right;
}

/* ===== Other-tree header banner ===== */

.rm-tree-scope-header {
    display: flex !important;
    align-items: center;
    gap: .6rem;
    padding: .4rem .65rem !important;
    min-height: 42px;
    border-radius: 10px;
    background: rgba(var(--bs-primary-rgb), .07) !important;
    border: 1px solid rgba(var(--bs-primary-rgb), .2) !important;
    cursor: pointer;
    transition: background-color 55ms ease-in, border-color 55ms ease-in;
}

.rm-tree-scope-header:hover,
.rm-tree-scope-header.selected {
    background: rgba(var(--bs-primary-rgb), .13) !important;
    border-color: rgba(var(--bs-primary-rgb), .42) !important;
}

.rm-tree-scope-back-icon {
    font-size: 1rem;
    color: var(--bs-primary);
    flex: 0 0 auto;
    line-height: 1;
}

.rm-tree-scope-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--bs-body-color);
    font-weight: 500;
    font-size: .875rem;
}

.rm-tree-scope-close {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(var(--bs-primary-rgb), .12);
    border: none;
    color: var(--bs-primary);
    cursor: pointer;
    font-size: .75rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background-color 100ms;
}

.rm-tree-scope-close:hover {
    background: rgba(var(--bs-primary-rgb), .26);
}

/* ===== Hints footer divider ===== */

.rm-tree-hints-sep.group {
    display: flex !important;
    align-items: center;
    gap: .45rem;
    padding: .28rem .55rem .1rem !important;
    min-height: unset !important;
    background: transparent !important;
    border: none !important;
    font-size: .67rem;
    font-weight: 600;
    color: var(--bs-secondary-color);
    text-transform: uppercase;
    letter-spacing: .07em;
    cursor: default;
    margin-top: 2px;
}

.rm-tree-hints-sep.group::before,
.rm-tree-hints-sep.group::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--bs-border-color);
}

/* ===== Hint (other-tree) items ===== */

.rm-tree-hint-item {
    display: flex !important;
    align-items: center;
    gap: .55rem;
    padding: .3rem .6rem !important;
    min-height: 42px;
    border-radius: 10px;
    background: transparent !important;
    border: 1px solid transparent !important;
    cursor: pointer;
    font-size: .875rem;
    transition: background-color 55ms ease-in, border-color 55ms ease-in;
}

.rm-tree-hint-item:hover,
.rm-tree-hint-item.selected {
    background: var(--bs-tertiary-bg) !important;
    border-color: var(--bs-border-color) !important;
}

.rm-hint-tree-icon {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border-radius: 7px;
    background: var(--bs-secondary-bg);
    border: 1px solid var(--bs-border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
}

.rm-hint-tree-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--bs-body-color);
    font-weight: 500;
}

.rm-hint-match-count {
    flex: 0 0 auto;
    font-size: .72rem;
    color: var(--bs-secondary-color);
    background: var(--bs-secondary-bg);
    border: 1px solid var(--bs-border-color);
    padding: .08rem .42rem;
    border-radius: 20px;
    white-space: nowrap;
}

.rm-hint-chevron {
    flex: 0 0 auto;
    color: var(--bs-secondary-color);
    font-size: .88rem;
}

.rm-search-spinner {
    position: absolute;
    right: 10px;
    top: 50%;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    border-radius: 50%;
    border: 2px solid rgba(100, 116, 139, .22);
    border-top-color: #2563eb;
    animation: rm-spin .7s linear infinite;
    display: none;
    pointer-events: none;
}

.rm-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    width: 20px;
    height: 20px;
    transform: translateY(-50%);
    pointer-events: none;
    opacity: .72;
}

.rm-nav-search-wrap input {
    padding-left: 42px;
}

@keyframes rm-spin {
    to {
        transform: rotate(360deg);
    }
}

.rm-nav-search-wrap.busy .rm-search-spinner {
    display: block;
}

.rm-nav-search-wrap.busy input {
    padding-right: 30px;
}

.rm-mobile-actions {
    display: none;
}

.rm-theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: .75rem;
}

.rm-theme-option {
    border: 1px solid var(--bs-border-color);
    border-radius: 16px;
    background: var(--bs-body-bg);
    padding: .6rem;
    text-align: center;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.rm-theme-option:hover,
.rm-theme-option.active {
    transform: translateY(-2px);
    border-color: rgba(37, 99, 235, .55);
    box-shadow: 0 12px 28px rgba(15, 23, 42, .12);
}

.rm-theme-option img {
    width: 96px;
    height: 96px;
    max-width: 96px;
    max-height: 96px;
    aspect-ratio: 1 / 1;
    border-radius: 14px;
    object-fit: cover;
    display: block;
    margin: 0 auto .45rem;
}

@media (max-width: 767.98px) {
    .navbar {
        background: transparent !important;
        border-bottom: 0 !important;
        box-shadow: none !important;
    }

    .rm-nav-row {
        justify-content: flex-end;
        min-height: 56px;
        position: relative;
    }

    .rm-nav-row .navbar-brand {
        display: none;
    }

    .rm-mobile-actions {
        display: flex;
        align-items: center;
        gap: .45rem;
        width: auto;
        margin-left: auto;
        justify-content: flex-end;
    }

    .rm-mobile-actions:has(.rm-mobile-search-wrap.open) .navbar-toggler {
        opacity: 0;
        pointer-events: none;
    }

    .rm-mobile-actions.search-open .navbar-toggler {
        opacity: 0;
        pointer-events: none;
    }

    .rm-mobile-search-wrap {
        width: 42px;
        flex: 0 0 42px;
        height: 42px;
        overflow: visible;
        box-sizing: border-box;
        transition: width .24s cubic-bezier(.2, .85, .2, 1), flex-basis .24s cubic-bezier(.2, .85, .2, 1);
        order: 1;
    }

    body.family-page .rm-mobile-actions .navbar-toggler {
        order: 2;
        margin-left: 0 !important;
    }

    body.family-page .rm-mobile-actions .rm-mobile-search-wrap {
        order: 1;
    }

    .rm-mobile-search-wrap.open {
        position: fixed;
        left: 10px;
        right: 10px;
        top: 8px;
        width: calc(100dvw - 20px);
        max-width: calc(100dvw - 20px);
        flex-basis: calc(100dvw - 20px);
        z-index: 1080;
    }

    .rm-mobile-search-toggle {
        position: absolute;
        inset: 0 auto 0 0;
        width: 42px !important;
        height: 42px !important;
        border: 1px solid var(--bs-border-color);
        border-radius: .5rem;
        background: var(--bs-tertiary-bg) !important;
        color: var(--bs-body-color);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 2;
        box-shadow: 0 4px 16px rgba(15, 23, 42, 0.14) !important;
        padding: 0 !important;
    }

    .rm-mobile-search-wrap.open .rm-mobile-search-toggle {
        opacity: 0;
        pointer-events: none;
    }

    .rm-mobile-actions .navbar-toggler {
        border: 1px solid var(--bs-border-color);
        border-radius: .5rem;
        background: var(--bs-tertiary-bg) !important;
        color: var(--bs-body-color);
        width: 42px !important;
        height: 42px !important;
        padding: 0 !important;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 16px rgba(15, 23, 42, 0.14) !important;
        order: 2;
    }

    .rm-mobile-actions .navbar-toggler .navbar-toggler-icon {
        width: 20px;
        height: 20px;
        background-size: 20px 20px;
    }

    [data-bs-theme="dark"] .rm-mobile-actions .navbar-toggler,
    [data-bs-theme="dark"] .rm-mobile-search-toggle {
        background: var(--bs-secondary-bg) !important;
        border-color: var(--bs-border-color);
    }

    [data-bs-theme="dark"] .rm-mobile-actions .navbar-toggler .navbar-toggler-icon,
    [data-bs-theme="dark"] .rm-mobile-search-toggle img {
        /*   filter: invert(1) grayscale(100%) brightness(1.8);*/
    }

    .autocomplete.rm-person-search {
        grid-template-columns: 1fr;
        border-radius: 18px 18px 0 0;
        max-width: none;
    }

    .autocomplete.rm-person-search>div {
        grid-column: 1 / -1 !important;
    }
}

@media (min-width: 768px) and (max-width: 1199.98px) {
    .autocomplete.rm-person-search {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .autocomplete.rm-person-search>div {
        grid-column: span 1;
    }

    .autocomplete.rm-person-search>div:nth-last-child(1):nth-child(2n + 1) {
        grid-column: 1 / -1;
    }
}

@media (max-width: 767.98px) {
    .rm-mobile-search-wrap .rm-nav-search-wrap {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 42px;
        opacity: 0;
        pointer-events: none;
        transition: opacity .12s ease;
    }

    .rm-mobile-search-wrap .rm-nav-search-wrap .form-control {
        height: 42px;
        font-size: 16px; /* >= 16px prevents iOS Safari auto-zoom on focus */
    }

    .rm-mobile-search-wrap.open .rm-nav-search-wrap {
        opacity: 1;
        pointer-events: auto;
    }

    #mobileNavSheet,
    #rmProfileSheet,
    #rmLangSheet {
        border-radius: 22px 22px 0 0;
        transition: transform .28s cubic-bezier(.2, .85, .2, 1), opacity .2s ease;
    }

    #mobileNavSheet .navbar-nav .nav-link {
        border-radius: 10px;
        color: var(--bs-body-color) !important;
        transition: background-color .15s ease, color .15s ease;
    }

    #mobileNavSheet .rm-mobile-menu-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .5rem;
    }

    #mobileNavSheet .rm-mobile-menu-grid .nav-item,
    #mobileNavSheet .rm-mobile-menu-grid form {
        min-width: 0;
    }

    #mobileNavSheet .rm-mobile-menu-grid .dropdown-divider {
        display: none;
    }

    #mobileNavSheet .navbar-nav .nav-link,
    #mobileNavSheet .navbar-nav .dropdown-divider + .nav-item .nav-link {
        min-height: 48px;
        border: 1px solid var(--bs-border-color);
        background: var(--bs-body-bg);
        padding: .65rem .7rem;
    }

    #mobileNavSheet .navbar-nav .nav-link:hover,
    #mobileNavSheet .navbar-nav .nav-link:focus-visible {
        background: var(--bs-tertiary-bg);
        color: var(--bs-link-color) !important;
    }

    [data-bs-theme="dark"] #mobileNavSheet .navbar-nav .nav-link:hover,
    [data-bs-theme="dark"] #mobileNavSheet .navbar-nav .nav-link:focus-visible,
    body.dark #mobileNavSheet .navbar-nav .nav-link:hover,
    body.dark #mobileNavSheet .navbar-nav .nav-link:focus-visible {
        background: rgba(255, 255, 255, .10);
        border-color: rgba(255, 255, 255, .36);
        color: rgba(255, 255, 255, .95) !important;
    }

    .rm-mobile-toolbar {
        display: flex;
        align-items: center;
        gap: .5rem;
        padding: .55rem;
        margin-bottom: .65rem;
        border: 1px solid var(--bs-border-color);
        border-radius: 18px;
        background: var(--bs-tertiary-bg);
    }

    .rm-mobile-tool-btn {
        width: 42px;
        min-width: 42px;
        height: 42px;
        border-radius: 14px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        border: 1px solid var(--bs-border-color);
        background: var(--bs-body-bg);
        color: var(--bs-body-color);
        transition: transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
    }

    .rm-mobile-tool-btn:has(span) {
        width: auto;
        padding: 0 .65rem;
        gap: .35rem;
    }

    .rm-mobile-toolbar .rm-color-mode-btn {
        margin-left: auto;
    }

    .rm-mobile-tool-btn:hover,
    .rm-mobile-tool-btn:focus-visible,
    .rm-mobile-tool-btn.active {
        transform: translateY(-1px);
        background: var(--bs-tertiary-bg);
        border-color: var(--bs-link-color);
        color: var(--bs-link-color);
    }

    [data-bs-theme="dark"] .rm-mobile-tool-btn:hover,
    [data-bs-theme="dark"] .rm-mobile-tool-btn:focus-visible,
    [data-bs-theme="dark"] .rm-mobile-tool-btn.active,
    body.dark .rm-mobile-tool-btn:hover,
    body.dark .rm-mobile-tool-btn:focus-visible,
    body.dark .rm-mobile-tool-btn.active {
        background: rgba(255, 255, 255, .10);
        border-color: rgba(255, 255, 255, .36);
        color: rgba(255, 255, 255, .95);
    }

    .rm-mobile-tool-btn[hidden] {
        display: none !important;
    }

    .rm-mobile-favourites-dropup {
        position: relative;
    }

    .rm-mobile-tree-settings {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .75rem;
    }

    .rm-mobile-tree-settings .rm-setting-title,
    .rm-mobile-tree-settings .rm-setting-row:not(.rm-mobile-depth-card):not(.rm-mobile-toggle-card) {
        grid-column: 1 / -1;
    }

    .rm-mobile-tree-settings .rm-mobile-depth-card {
        display: flex;
        min-width: 0;
        flex-direction: column;
        align-items: stretch;
        gap: .55rem;
    }

    .rm-mobile-tree-settings .rm-mobile-depth-card .rm-setting-label {
        width: 100%;
        text-align: left;
    }

    .rm-mobile-tree-settings .rm-mobile-depth-card .rm-stepper {
        justify-content: flex-start;
        width: 100%;
    }

    .rm-mobile-tree-settings .rm-mobile-toggle-card {
        min-width: 0;
        align-items: flex-start;
        flex-direction: column;
        gap: .55rem;
    }

    .rm-mobile-tree-settings .rm-mobile-toggle-card .rm-setting-label {
        min-height: 2.4em;
    }

    .rm-mobile-tool-btn .rm-lang-flag {
        width: 24px;
        height: 24px;
    }

    .rm-mobile-tool-lang {
        margin-left: 0;
        padding: 0 .45rem;
    }

    .rm-theme-grid {
        grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    }

    .rm-theme-option {
        padding: .5rem;
    }
}

.rm-desktop-tool-btn {
    min-height: 34px;
    border-radius: .65rem;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}

.rm-language-list .list-group-item {
    border-radius: 0;
    border-left: 1px solid rgba(148, 163, 184, .25);
    border-right: 1px solid rgba(148, 163, 184, .25);
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
}

.rm-language-list .list-group-item:hover,
.rm-language-list .list-group-item:focus-visible,
.rm-language-list .list-group-item.active {
    background: var(--bs-tertiary-bg);
    border-color: var(--bs-border-color);
    color: var(--bs-body-color);
}

[data-bs-theme="dark"] .rm-language-list .list-group-item:hover,
[data-bs-theme="dark"] .rm-language-list .list-group-item:focus-visible,
[data-bs-theme="dark"] .rm-language-list .list-group-item.active,
body.dark .rm-language-list .list-group-item:hover,
body.dark .rm-language-list .list-group-item:focus-visible,
body.dark .rm-language-list .list-group-item.active {
    background: rgba(255, 255, 255, .10);
    color: rgba(255, 255, 255, .95);
}

.rm-language-list .list-group-item:first-child {
    border-top-left-radius: .75rem;
    border-top-right-radius: .75rem;
    border-top: 1px solid rgba(148, 163, 184, .25);
}

.rm-language-list .list-group-item:last-child {
    border-bottom-left-radius: .75rem;
    border-bottom-right-radius: .75rem;
    border-bottom: 1px solid rgba(148, 163, 184, .25);
}

.shareoncontainer {
    z-index: 1002;
    position: absolute;
    top: 200px;
    border-radius: 9px;
    background: rgba(0, 0, 0, 0.30) !important;
    left: 200px;
    width: 150px;
}

img.grayscale {
    filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#grayscale");
    /* Firefox 3.5+, IE10 */
    filter: gray;
    /* IE6-9 */
    -webkit-filter: grayscale(100%);
    /* Chrome 19+ & Safari 6+ */
    -webkit-transition: all .6s ease;
    /* Fade to color for Chrome and Safari */
    -webkit-backface-visibility: hidden;
    /* Fix for transition flickering */
}

img.grayscale:hover {
    filter: none;
    -webkit-filter: grayscale(0%);
}

.starfill {
    color: #ecc100 !important;
}

.unselectable {
    -moz-user-select: -moz-none;
    -khtml-user-select: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-user-select: none;
    user-select: none;
}


@media print {

    body {
        margin: 0;
        color: #000;
        background-color: #fff;
    }

    @page {
        size: landscape;
    }

    body {}

    .minimap-container {
        display: none;
    }

    #navbar {
        display: none;
    }

    .navbar-brand {
        display: block;
    }

    #content {
        overflow: visible !important;
    }
}

.tree-shell {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0 !important;
    padding: 0;
    overflow: hidden;
    background: linear-gradient(180deg, #eef4fb 0%, #f8fbff 100%);
}

.tree-stage {
    width: 100%;
    height: 100%;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.07), transparent 28%),
        radial-gradient(circle at top right, rgba(34, 197, 94, 0.07), transparent 24%),
        linear-gradient(180deg, #fbfdff 0%, #f2f7fd 100%);
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.10);
    touch-action: none;
    position: relative;
}

.tree-svg {
    width: 100%;
    height: 100%;
    display: block;
    cursor: grab;
    user-select: none;
}

.tree-svg.dragging {
    cursor: grabbing;
}

.person {
    cursor: pointer;
    outline: none;
}

.selection-ring {
    fill: rgba(245, 158, 11, 0.10);
    stroke: rgba(245, 158, 11, 0.75);
    stroke-width: 2.4;
    opacity: 0;
    pointer-events: none;
    transition: opacity .16s;
}

.selected-ring {
    fill: none;
    stroke: var(--selected);
    stroke-width: 3.5;
    stroke-dasharray: 8 5;
    opacity: 0;
    pointer-events: none;
}

.ft-shell {
    transform-box: fill-box;
    transform-origin: center;
    transition: transform .16s ease;
}

.ft-card {
    fill: url(#card-fill);
    stroke: none;
    transition: fill .16s ease;
}

.ft-card-border {
    fill: none;
    stroke: #334155;
    stroke-width: 2.6;
    vector-effect: non-scaling-stroke;
    pointer-events: none;
}

.ft-accent {
    fill: var(--blue);
    opacity: .96;
    transition: fill .16s ease;
}

.ft-name {
    font: 700 16px Arial, sans-serif;
    fill: var(--text);
}

.ft-meta {
    font: 13px Arial, sans-serif;
    fill: var(--muted);
}

.ft-occ {
    font: 600 13px Arial, sans-serif;
    fill: #1d4ed8;
}

.ft-name,
.ft-meta,
.ft-occ {
    user-select: none;
    pointer-events: none;
}

.person:hover .selection-ring,
.person:focus .selection-ring {
    opacity: 1;
}

.person:hover .ft-card,
.person:focus .ft-card {
    fill: url(#card-fill-hover);
}

.person:hover .ft-card-border,
.person:focus .ft-card-border {
    stroke: #f59e0b;
}

.person.selected .selected-ring {
    opacity: 1;
}

.person.selected .ft-shell {
    transform: translateY(-2px) scale(1.01);
}

.person.selected .ft-card {
    fill: var(--selected-fill);
}

.person.selected .ft-card-border {
    stroke: var(--selected);
    stroke-width: 3.2;
}

.person.selected .ft-accent {
    fill: var(--selected);
}

.person.main-person .ft-card {
    fill: #ecfeff;
}

.person.main-person .ft-card-border {
    stroke: #0ea5e9;
    stroke-width: 3.4;
}

.person.main-person .ft-accent {
    fill: #0284c7;
}

.person.main-person .ft-name {
    fill: #0c4a6e;
}

.person.gender-male .ft-card {
    fill: #eef7ff;
}

.person.gender-male .ft-accent {
    fill: #3b82f6;
}

.person.gender-female .ft-card {
    fill: #fff1f6;
}

.person.gender-female .ft-accent {
    fill: #ec4899;
}

.person.main-person.gender-male .ft-card {
    fill: #e0f2fe;
}

.person.main-person.gender-female .ft-card {
    fill: #fce7f3;
}

.family-hub {
    display: none;
}

.marriage-link {
    fill: none;
    stroke: var(--green);
    stroke-width: 3.1;
    stroke-dasharray: 9 6;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: stroke;
    transition: stroke .16s, stroke-width .16s;
}

.marriage-link.recorded-union {
    stroke-dasharray: none;
}

.marriage-group:hover .marriage-link,
.marriage-group.is-hovered .marriage-link {
    stroke: var(--green-hot);
    stroke-width: 4.8;
}

.marriage-group:hover .family-hub,
.marriage-group.is-hovered .family-hub {
    stroke: var(--green-hot);
}

.marriage-group:hover .marriage-label-start,
.marriage-group:hover .marriage-label-end,
.marriage-group.is-hovered .marriage-label-start,
.marriage-group.is-hovered .marriage-label-end {
    text-shadow: 0 1px 2px rgba(255, 255, 255, .9);
}

.marriage-label-start {
    font: 600 12px Arial, sans-serif;
    fill: #166534;
    text-anchor: middle;
    pointer-events: visiblePainted;
    paint-order: normal;
    stroke: none;
    stroke-width: 0;
    cursor: default;
}

.marriage-label-end {
    font: 600 12px Arial, sans-serif;
    fill: #64748b;
    text-anchor: middle;
    pointer-events: visiblePainted;
    paint-order: normal;
    stroke: none;
    stroke-width: 0;
    cursor: default;
}

.child-line {
    fill: none;
    stroke: var(--blue);
    stroke-width: 3.1;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: stroke;
    transition: stroke .16s, stroke-width .16s;
}

.child-end {
    marker-end: url(#child-arrow);
}

.child-group:hover .child-line,
.child-group.is-child-hovered .child-line {
    stroke: var(--blue-hot);
    stroke-width: 4;
}

.child-group:hover .child-end,
.child-group.is-child-hovered .child-end {
    marker-end: url(#child-arrow-hot);
}

.tree-loading {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 5;
    background: rgba(248, 251, 255, .42);
    backdrop-filter: blur(2px);
    pointer-events: none;
}

.tree-loading.show {
    display: flex;
}

.tree-spinner {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 5px solid rgba(37, 99, 235, .14);
    border-top-color: #2563eb;
    animation: tree-spin .75s linear infinite;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .12);
}

@@keyframes tree-spin {
    to {
        transform: rotate(360deg);
    }
}

.tree-minimap {
    position: absolute;
    right: 16px;
    bottom: 16px;
    width: min(260px, calc(100vw - 32px));
    height: 202px;
    border: 1px solid var(--bs-border-color);
    border-radius: 16px;
    background: rgba(var(--bs-body-bg-rgb), .84);
    box-shadow: 0 14px 34px rgba(15, 23, 42, .16);
    backdrop-filter: blur(10px);
    overflow: hidden;
    z-index: 4;
}

.tree-minimap-title {
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 10px 0 12px;
    border-bottom: 1px solid var(--bs-border-color);
    color: var(--bs-body-color);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;
    cursor: move;
    user-select: none;
    touch-action: none;
    background: rgba(var(--bs-body-bg-rgb), .58);
}

.tree-minimap-close {
    border: 0;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    background: var(--bs-tertiary-bg);
    color: var(--bs-body-color);
    font-size: 16px;
    cursor: pointer;
    touch-action: manipulation;
}

.tree-minimap-close:hover {
    background: var(--bs-danger-bg-subtle);
    color: var(--bs-danger-text-emphasis);
}

.tree-minimap.closing {
    pointer-events: none;
    animation: minimap-close .24s ease forwards;
}

.tree-minimap.opening {
    animation: minimap-open .26s cubic-bezier(.2, .85, .2, 1) both;
}

@@keyframes minimap-close {
    to {
        opacity: 0;
        transform: translate(var(--minimap-fly-x, 80px), var(--minimap-fly-y, -80px)) scale(.18);
    }
}

@@keyframes minimap-open {
    from {
        opacity: 0;
        transform: translate(var(--minimap-fly-x, 80px), var(--minimap-fly-y, -80px)) scale(.18);
    }

    to {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
}

.tree-minimap-body {
    height: 170px;
}

.tree-minimap svg {
    width: 100%;
    height: 100%;
    display: block;
    cursor: grab;
}

.tree-minimap.dragging svg {
    cursor: grabbing;
}

.mini-node {
    fill: #cbd5e1;
    stroke: rgba(51, 65, 85, .35);
    stroke-width: 1;
}

.mini-node.male {
    fill: #93c5fd;
}

.mini-node.female {
    fill: #f9a8d4;
}

.mini-node.root {
    fill: #0ea5e9;
    stroke: #0369a1;
    stroke-width: 2;
}

.mini-viewport {
    fill: rgba(249, 115, 22, .12);
    stroke: #f97316;
    stroke-width: 2.2;
    vector-effect: non-scaling-stroke;
    cursor: move;
    display: none;
}

.hint {
    position: absolute;
    left: 12px;
    bottom: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(var(--bs-body-bg-rgb), .78);
    color: var(--bs-body-color);
    font-size: 12px;
    backdrop-filter: blur(6px);
    border: 1px solid var(--bs-border-color);
    pointer-events: none;
}

.tree-sidebar {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: clamp(340px, 33vw, 560px);
    max-width: 100%;
    background: rgba(var(--bs-body-bg-rgb), .97);
    color: var(--bs-body-color);
    border-left: 1px solid var(--bs-border-color);
    box-shadow: -14px 0 30px rgba(15, 23, 42, .12);
    z-index: 36 !important;
    transform: translateX(100%);
    opacity: 0;
    transition: transform .24s cubic-bezier(.2, .85, .2, 1), opacity .18s ease;
    display: flex;
    flex-direction: column;
    font-weight: 600;
}

.tree-sidebar.show {
    transform: translateX(0);
    opacity: 1;
    z-index: 26;
    padding: 0;
    isolation: isolate;
}

.tree-sidebar-close {
    position: absolute;
    top: 10px;
    right: 20px;
    z-index: 7;
    border: 0;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: rgba(var(--bs-body-bg-rgb), .9);
    color: var(--bs-body-color);
    font-size: 20px;
    line-height: 1;
    box-shadow: 0 6px 16px rgba(15, 23, 42, .18);
    transition: transform .15s ease, background .15s ease, color .15s ease;
}

.tree-sidebar-close:hover {
    /*   transform: scale(1.05); */
    background: var(--bs-danger-bg-subtle);
    color: var(--bs-danger-text-emphasis);
}

.tree-sidebar-photo-wrap {
/*    background-repeat: no-repeat, no-repeat;
    filter: blur(8px);
    -webkit-filter: blur(5px);
    background-size: cover;
    background-position: center;
    width: 100% !important;
    height: 100% !important;
    z-index: -5;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    max-height: 200px;*/
     
    position: relative;
    width: calc(100% + 32px);
    margin: -16px -16px 0;
    min-height: 210px;
    background-color: #172033;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px 18px 32px;
    overflow: visible; 
}

.tree-sidebar-photo-wrap::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, .32), rgba(15, 23, 42, .76));
    backdrop-filter: blur(5px);
}
    .tree-sidebar-photo-wrap.coa-bg {
        background-image: url(https://royalmapper.com/api/DbImage/thumb/e7e303f5-8511-47fc-83a8-a8c1bca0f929);
        /* background-origin: content-box; */
        background-position-y: 80%;
        background-repeat:no-repeat;
        background-repeat: no-repeat;
        

}
.tree-sidebar-photo-wrap.coa-bg::before {
    background: rgba(15, 23, 42, .18);
    backdrop-filter: none;
}

.tree-sidebar-photo {
    position: relative;
    z-index: 1;
    width: 180px;
    height: 180px;
    object-fit: cover;
    border: 1px solid white;
/*    padding: 8px;*/
        box-sizing: content-box;
        border-radius: 50%;
        /* box-shadow: 10px 20px 17px 28px rgba(15, 23, 42, .14);*/
        /*    background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.05) 40%, rgba(255, 255, 255, 0.02));
*/
    }

.tree-sidebar-photo.has-originals {
    cursor: zoom-in;
}

.tree-sidebar-body {
    padding: 16px 16px 22px;
    overflow: auto;
    flex: 1 1 auto;
}

.tree-sidebar-name {
    margin: .5rem 0 0;
    font-size: 22px;
    font-weight: 800;
    color: var(--bs-body-color);
    line-height: 1.12;
    text-align: center;
}

.tree-sidebar-lead {
    margin-top: 7px;
    color: var(--bs-secondary-color);
    font-size: 13px;
    line-height: 1.35;
    text-align: center;
}

.tree-sidebar-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 8;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px 1px;
    pointer-events: auto;
}

.tree-sidebar-action-group {
    display: flex;
    align-items: center;
    gap: 10px;
    padding:inherit;
}

.tree-sidebar-action {
    width: 56px;
    height: 56px;
    min-width: 44px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, .9);
    background-color: #222222 !important;
    /*    background-color: rgba(255, 255, 255, .15);*/
    /*    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);*/
    border: 1px solid rgba(255, 255, 255, .50);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
    transition: background-color .18s ease, transform .14s ease, color .18s ease, border-color .18s ease;
    cursor: pointer;
    font-size: 1.35rem;
    padding: 0;
    text-decoration: none;
    font-weight: normal;
    gap: 0;
}

.tree-sidebar-action:hover {
    color: white;
    background-color: rgba(255, 255, 255, .28);
    border-color: rgba(255, 255, 255, .5);
    transform: translateY(-2px);
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .32);
}

.tree-sidebar-action:active {
    transform: scale(0.94);
}

.tree-fav-toggle.is-fav {
    color: #fbbf24;
    border-color: rgba(245, 158, 11, .6);
    background-color: rgba(245, 158, 11, .18);
}

.tree-fav-toggle.is-fav:hover {
    color: #fcd34d;
    background-color: rgba(245, 158, 11, .3);
    border-color: rgba(245, 158, 11, .75);
}

.tree-fav-toggle.is-disabled {
    opacity: .80;
    cursor: not-allowed;
}

.tree-fav-toggle.is-disabled:hover {
    transform: none;
    background-color: rgba(255, 255, 255, .15);
    color: rgba(255, 255, 255, .7);
    border-color: rgba(255, 255, 255, .28);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
}

.rm-favourites-dropdown {
    width: min(360px, calc(100vw - 24px));
    max-height: min(460px, calc(100vh - 120px));
    overflow: auto;
}

.rm-favourite-row {
    width: 100%;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--bs-body-color);
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 8px;
    text-align: left;
}

.rm-favourite-row:hover,
.rm-favourite-row:focus-visible {
    background: var(--bs-tertiary-bg);
}

.rm-favourite-row img {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--bs-secondary-bg);
}

.rm-favourite-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
}

.rm-favourite-years {
    color: var(--bs-secondary-color);
    font-size: 12px;
    white-space: nowrap;
}

.rm-mobile-favourites-dropdown {
    margin-bottom: 8px !important;
}

.tree-share-wrap {
    position: relative;
}

.tree-share-toggle {
    flex-shrink: 0;
}

.tree-share-popup {
    position: absolute;
    top: calc(100% + 8px);
    bottom: auto;
    right: 0;
    left: auto;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 6px 24px rgba(15, 23, 42, .18);
    z-index: 1020;
}

.tree-share-popup[hidden] {
    display: none !important;
}

.tree-share-popup .shareon {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.tree-share-popup .shareon>.copy-url {
    grid-column: 1 / -1;
    font-size: 12px !important;
   /* padding-left: 36px;*/
}



.tree-sidebar-section {
    margin-top: 14px;
    padding-top: 13px;

}

.tree-sidebar-section h3 {
    margin: 0 0 9px;
    color: var(--bs-body-color);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .01em;
}

.tree-sidebar-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tree-sidebar-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    border: 1px solid var(--bs-border-color);
    padding: 6px 9px;
    background: var(--bs-tertiary-bg);
    color: var(--bs-body-color);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.tree-sidebar-chip.noble {
    border-color: var(--bs-warning-border-subtle);
    background: var(--bs-warning-bg-subtle);
}

.tree-sidebar-chip.dynasty {
    background: var(--bs-info-bg-subtle);
    border-color: var(--bs-info-border-subtle);
}

.tree-sidebar-facts {
    display: grid;
    gap: 0;
}

.tree-sidebar-facts-compact .tree-sidebar-fact {
    border-radius: 8px;
    padding: 7px 8px;
}

.tree-sidebar-fact,
.tree-sidebar-list-item {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 9px;
    align-items: center;
    padding: 8px 9px;
    border-radius: 0;
    background: var(--bs-tertiary-bg);
    border: 1px solid var(--bs-border-color);
    border-top: 0;
}

.tree-sidebar-facts .tree-sidebar-fact:first-child,
.tree-sidebar-facts .tree-sidebar-list-item:first-child {
    border-top: 1px solid var(--bs-border-color);
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.tree-sidebar-facts .tree-sidebar-fact:last-child,
.tree-sidebar-facts .tree-sidebar-list-item:last-child {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.tree-sidebar-icon {
    width: 28px;
    height: 28px;
    border-radius: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    font-size: 18px;
}

.tree-sidebar-icon img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.tree-sidebar-fact-name {
    color: var(--bs-secondary-color);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.tree-sidebar-fact-value {
    color: var(--bs-body-color);
    font-size: 13px;
    line-height: 1.3;
    word-break: break-word;
}

.tree-sidebar-person-list {
    display: grid;
    gap: 0;
}

.tree-sidebar-person {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    gap: 9px;
    align-items: center;
    padding: 6px 8px;
    border-radius: 0;
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    text-decoration: none;
    border: 1px solid var(--bs-border-color);
    border-top: 0;
}

.tree-sidebar-person-list .tree-sidebar-person:first-child {
    border-top: 1px solid var(--bs-border-color);
}

.tree-sidebar-person-list .tree-sidebar-person:first-child {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.tree-sidebar-person-list .tree-sidebar-person:last-child {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.tree-sidebar-person:hover {
    background: var(--bs-tertiary-bg);
    border-color: var(--bs-link-color);
}

.tree-sidebar-person img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.tree-sidebar-person-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 600;
}

.tree-sidebar-person-years {
    color: var(--bs-secondary-color);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.tree-sidebar-text-list {
    margin: 0;
    color: var(--bs-body-color);
    font-size: 13px;
    line-height: 1.45;
    display: grid;
    gap: 0;
}

.tree-sidebar-text-item {
    padding: 6px 8px;
    border: 1px solid var(--bs-border-color);
    border-top: 0;
    background: var(--bs-body-bg);
    font-weight: var(--bs-body-font-weight); 
}

.tree-sidebar-text-item:first-child {
    border-top: 1px solid var(--bs-border-color);
}

.tree-sidebar-text-hint {
    font-size: 0.85em;
    opacity: 0.6;
    margin-left: 4px;
}

.tree-sidebar-wiki-frame {
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    overflow: hidden;
    background: var(--bs-body-bg);
}

.tree-sidebar-wiki-frame iframe {
    width: 100%;
    height: 420px;
    display: block;
}

.tree-sidebar-empty {
    margin: 0;
    color: var(--bs-secondary-color);
    font-size: 13px;
}

.tree-sidebar-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--bs-body-bg-rgb), .94);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s ease, visibility .2s ease;
    z-index: 2;
}

.tree-sidebar-loading.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.tree-sidebar-spinner {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 4px solid rgba(37, 99, 235, .16);
    border-top-color: #2563eb;
    animation: tree-spin .75s linear infinite;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .14);
}

@media (max-width: 720px) {
    body.family-page.family-sidebar-open>header {
        display: none !important;
    }

    .tree-shell {
        top: 0;
    }

    .tree-stage {
        height: 100%;
    }

    .tree-minimap {
        right: 10px;
        bottom: 44px;
        width: min(220px, calc(100vw - 20px));
        height: 164px;
        border-radius: 12px;
    }

    .tree-minimap-title {
        height: 44px;
        padding: 0 8px 0 14px;
        font-size: 13px;
    }

    .tree-minimap-close {
        width: 36px;
        height: 36px;
        font-size: 24px;
    }

    .tree-minimap-body {
        height: 118px;
    }

    .hint {
        display: none;
    }

    .tree-sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0; 
        width: 100%;
        max-height: 100dvh;
        border-left: 0;
        border-top-left-radius: 22px;
        border-top-right-radius: 22px;
        box-shadow: 0 -8px 32px rgba(15, 23, 42, .22);
        z-index: 5000;
        max-width: 100vw;
        transform: translateY(100%);
    }

    .tree-sidebar.show {
        transform: translateY(0);
    }

    .tree-sidebar-photo-wrap {
        border-top-left-radius: 22px;
        border-top-right-radius: 22px;
    }
}


.header-actions a{
 /*   color:unset !important;*/
}


    .offcanvas-bottom{
    margin-right:20px;
    margin-left:20px;
}

.offcanvas-header {
    backdrop-filter: blur(28px) saturate(90%) contrast(90%);
    border-top-left-radius: 22px;
    border-top-right-radius: 22px;
}

[data-bs-theme="dark"] .offcanvas-header {
    backdrop-filter: blur(28px) saturate(200%) contrast(120%);
}

/*.fade-bottom {
    -webkit-mask-image: linear-gradient( to bottom, black 0%, black 82%, transparent 100% );
    mask-image: linear-gradient( to bottom, black 0%, black 82%, transparent 100% );
}*/

.fade-bottom {
    position: relative;
}

    .fade-bottom::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 20%;
        pointer-events: none;
        background: linear-gradient( to bottom, transparent 0%, var(--bs-body-bg) 97% );
    }
 
/*
.offcanvas-title{
    color:white;rgba(var(--bs-body-bg-rgb), .97);
}*/



.rm-tree-settings-dropdown {
    min-width: 248px;
}

    .rm-tree-settings-dropdown h6 {
        font-size: .78rem;
        font-weight: 800;
        letter-spacing: .06em;
        text-transform: uppercase;
        color: var(--bs-secondary-color);
        margin-bottom: .85rem;
    }

.rm-setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

    .rm-setting-row + .rm-setting-row {
        margin-top: .65rem;
    }

.rm-setting-label {
    font-size: .85rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.rm-stepper {
    display: flex;
    align-items: center;
    gap: 4px;
}

.rm-stepper-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    touch-action: manipulation;
    user-select: none;
    transition: background .12s, border-color .12s;
}

    .rm-stepper-btn:hover:not(:disabled) {
        background: var(--bs-secondary-bg);
        border-color: var(--bs-primary);
    }

    .rm-stepper-btn:active:not(:disabled) {
        transform: scale(.93);
    }

    .rm-stepper-btn:disabled {
        opacity: .35;
        cursor: not-allowed;
    }

.rm-stepper-input {
    width: 52px;
    height: 36px;
    text-align: center;
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    font-size: .95rem;
    font-weight: 700;
    padding: 0 4px;
    -moz-appearance: textfield;
}

    .rm-stepper-input::-webkit-inner-spin-button,
    .rm-stepper-input::-webkit-outer-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }

.rm-mobile-tree-settings {
    padding: .85rem 0 .65rem;
    margin-bottom: .5rem;
}

    .rm-mobile-tree-settings .rm-setting-title {
        font-size: .74rem;
        font-weight: 800;
        letter-spacing: .06em;
        text-transform: uppercase;
        color: var(--bs-secondary-color);
        margin-bottom: .85rem;
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .rm-mobile-tree-settings .rm-stepper-btn {
        width: 44px;
        height: 44px;
        min-width: 44px;
        font-size: 1.35rem;
    }

    .rm-mobile-tree-settings .rm-stepper-input {
        width: 58px;
        height: 44px;
        font-size: 1rem;
    }

.rm-tree-toggle-switch .form-check-input {
    width: 2.5rem;
    height: 1.4rem;
    cursor: pointer;
}

    .rm-tree-toggle-switch .form-check-input:focus {
        box-shadow: 0 0 0 .2rem rgba(var(--bs-primary-rgb), .2);
    }

.rm-mobile-tree-settings .rm-tree-toggle-switch .form-check-input {
    width: 3.25rem;
    height: 1.8rem;
    margin-top: 0;
}

.rm-settings-icon-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    touch-action: manipulation;
    transition: background .12s, border-color .12s, color .12s;
    flex-shrink: 0;
    padding: 0;
    overflow: hidden;
}

    .rm-settings-icon-btn:hover:not(:disabled) {
        background: var(--bs-secondary-bg);
        border-color: var(--bs-primary);
    }

    .rm-settings-icon-btn.active {
        border-color: var(--bs-primary);
        background: var(--bs-primary-bg-subtle);
        color: var(--bs-primary);
    }

.rm-theme-preview-img {
    width: 24px;
    height: 24px;
    object-fit: cover;
    display: block;
    border-radius: 3px;
    pointer-events: none;
}



  .rm-stepper-btn {
    background: #336699;
    color:white;
}
.rm-stepper-btn:hover {
    background: #6699bb !important;
  
}
[data-bs-theme="dark"] .rm-stepper-btn {
    background-color: #003366;
}