body #topbar {
    position: relative;
    z-index: 100;
    overflow: visible;
}
body #topbar .topbar-inner { position: relative; }
body #topbar .topbar-inner .ome-account-tools { position: static; }
#topbar .ome-account-control {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    padding: 6px 10px;
    border: 1px solid #756546;
    border-radius: 7px;
    background: #182332;
    color: #f1d8a2;
    text-decoration: none;
    font: 600 12px/1.3 Arial, sans-serif;
}
#topbar .ome-account-control:hover { background: #233448; }
#topbar .ome-account-control svg {
    flex: none;
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
}
#topbar .ome-account-dropdown { position: relative; }
#topbar .ome-account-dropdown summary { cursor: pointer; list-style: none; }
#topbar .ome-account-dropdown summary::-webkit-details-marker { display: none; }
#topbar .ome-account-dropdown[open] .ome-account-chevron { transform: rotate(180deg); }
#topbar .ome-account-avatar { border-radius: 5px; object-fit: cover; }
#topbar .ome-account-name { max-width: 105px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#topbar .ome-unread {
    min-width: 20px;
    padding: 2px 5px;
    border-radius: 999px;
    background: #ad2638;
    color: #fff;
    text-align: center;
}
#topbar .ome-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    clip-path: inset(50%);
    overflow: hidden;
    white-space: nowrap;
}
#topbar .ome-account-popover {
    position: absolute;
    inset: calc(100% + 6px) 0 auto auto;
    box-sizing: border-box;
    width: min(340px, calc(100vw - 32px));
    max-height: 75vh;
    overflow: hidden auto;
    padding: 15px;
    border: 1px solid #8a744a;
    border-radius: 10px;
    background: #0d1825;
    box-shadow: 0 12px 28px #0009;
    color: #e7edf5;
}
#topbar .ome-account-popover h2 {
    margin: 0 0 12px;
    color: #f0d395;
    font: 700 16px/1.3 Arial, sans-serif;
}
#topbar .ome-account-balances {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
#topbar .ome-account-balances { margin: 0 0 12px; }
#topbar .ome-account-balances div { padding: 8px; border-radius: 6px; background: #19293a; }
#topbar .ome-account-balances dt { color: #b8c5d6; font-size: 11px; }
#topbar .ome-account-balances dd { margin: 3px 0 0; color: #f0d395; font-size: 17px; font-weight: 700; }
#topbar #sidebox_info_login .card-body { padding: 0; }
#topbar #sidebox_info_login .input-group {
    display: flex;
    align-items: stretch;
    width: 100%;
}
#topbar #sidebox_info_login .input-group-text { flex: 0 0 auto; }
#topbar #sidebox_info_login .input-group > .form-control {
    flex: 1 1 0;
    width: 0;
    min-width: 0;
}
#topbar #sidebox_info_login .card-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 10px;
}
#topbar #sidebox_info_login { color-scheme: dark; }
#topbar #sidebox_info_login .input-group .input-group-text,
#topbar #sidebox_info_login input.form-control {
    background: #142438 !important;
    color: #edf3fb !important;
    border-color: #506075;
}
#topbar #sidebox_info_login input.form-control {
    caret-color: #edf3fb;
}
#topbar #sidebox_info_login input.form-control::placeholder {
    color: #adbed2;
    opacity: 1;
}
#topbar #sidebox_info_login input.form-control:-webkit-autofill,
#topbar #sidebox_info_login input.form-control:-webkit-autofill:hover,
#topbar #sidebox_info_login input.form-control:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 100px #142438 inset !important;
    box-shadow: 0 0 0 100px #142438 inset !important;
    -webkit-text-fill-color: #edf3fb !important;
    caret-color: #edf3fb;
}
#topbar .ome-account-popover form .nice_button {
    width: 100%;
    border: 1px solid #cda65c;
    border-radius: 7px;
    background: #d6ae60;
    color: #20170c;
}
@media (max-width: 560px) {
    body #topbar .topbar-inner .ome-account-tools { justify-content: flex-end; }
    #topbar .ome-account-control { min-height: 44px; }
}


#topbar .ome-account-identity {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding: 10px;
    border: 1px solid #96734066;
    border-radius: 8px;
    background: linear-gradient(120deg, #372e22, #19293a);
}
#topbar .ome-account-identity img {
    flex: none;
    border: 1px solid #b8965e;
    border-radius: 50%;
    object-fit: cover;
}
#topbar .ome-account-identity strong,
#topbar .ome-account-identity span {
    display: block;
    overflow-wrap: anywhere;
}
#topbar .ome-account-identity strong { color: #f0d395; font-size: 15px; }
#topbar .ome-account-identity span { margin-top: 3px; color: #e0d3bb; font-size: 12px; }
#topbar .ome-account-shortcuts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}
#topbar .ome-account-shortcuts a {
    flex-direction: column;
    gap: 5px;
    min-height: 54px;
    padding: 6px 3px;
    text-align: center;
}
#topbar .ome-account-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #75654660;
}
#topbar .ome-account-footer a { background: transparent; border-color: transparent; }
#topbar .ome-account-footer a:hover { background: #233448; }

#topbar #sidebox_info_login .input-group > :is(input.side-password-input, input#floatingPassword) {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    flex: 1 1 0;
    width: 0;
    min-width: 0;
    min-height: 34px;
}
#topbar #sidebox_info_login [data-input-id="floatingPassword"]:focus-visible {
    outline: 2px solid #f0d395;
    outline-offset: 2px;
}

#topbar .ome-account-settings {
    box-sizing: border-box;
    min-width: 38px;
    padding-inline: 9px;
}
#topbar .ome-account-footer svg { width: 14px; height: 14px; }
#topbar .ome-account-register,
#topbar .ome-account-login {
    box-sizing: border-box;
    padding-inline: 12px;
    text-shadow: none;
    white-space: nowrap;
}
#topbar .ome-account-register {
    background: #28231b;
    border-color: #a28148;
    color: #f0d395;
}
#topbar .ome-account-register:hover { background: #393020; }
#topbar .ome-account-login { border-color: #6b614e; }
#topbar .ome-account-login .ome-account-chevron { width: 12px; height: 12px; }

#topbar #sidebox_info_login {
    --field-border-radius: 7px;
    background: linear-gradient(145deg, #1b211f, #10191e 70%);
    border-color: #a281487d;
}
#topbar #sidebox_info_login .ome-sign-in-heading {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #a281484d;
}
#topbar .ome-sign-in-emblem {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 1px solid #a281485e;
    border-radius: 7px;
    background: #a281481a;
}
#topbar .ome-sign-in-emblem svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
}
#topbar #sidebox_info_login .input-group:has(> :is(.side-username-input, .side-password-input, #floatingUser, #floatingPassword)) {
    border: 1px solid #a2814861;
    border-radius: 7px;
    background: #111c24;
}
#topbar #sidebox_info_login .input-group:has(> :is(.side-username-input, .side-password-input, #floatingUser, #floatingPassword)):focus-within {
    border-color: #d4b06b;
}
#topbar #sidebox_info_login .input-group > :is(.side-username-input, .side-password-input, #floatingUser, #floatingPassword) {
    min-height: 40px;
    border: 0 !important;
    border-radius: 0 6px 6px 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}
#topbar #sidebox_info_login .input-group:has(> :is(.side-username-input, .side-password-input, #floatingUser, #floatingPassword)) > .input-group-text {
    border: 0 !important;
    border-right: 1px solid #a2814840 !important;
    border-radius: 6px 0 0 6px !important;
    background: #a2814815 !important;
    color: #dbc08b !important;
}
#topbar #sidebox_info_login input.form-control:-webkit-autofill {
    -webkit-box-shadow: inset 0 0 0 100px #111c24 !important;
    box-shadow: inset 0 0 0 100px #111c24 !important;
    -webkit-text-fill-color: #edf3fb !important;
}
#topbar #sidebox_info_login .card-links { font-size: 12px; }
#topbar #sidebox_info_login .card-links a { color: #dfc28b; }
#topbar #sidebox_info_login form .nice_button {
    min-height: 40px;
    border: 1px solid #e2be73 !important;
    border-radius: 7px !important;
    background: linear-gradient(#ecd092, #c39b50) !important;
    box-shadow: none !important;
    color: #241a0e !important;
    font: 700 12px/1.3 Arial, sans-serif !important;
    letter-spacing: .04em;
    text-shadow: none !important;
}
#topbar #sidebox_info_login form .nice_button:hover { filter: brightness(1.08); }

:is(#topbar, .ome-mobile-social-row) .ome-topbar-community {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}
:is(#topbar, .ome-mobile-social-row) .ome-topbar-community a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 36px;
    height: 36px;
    min-height: 0;
    padding: 0;
    border-color: #ffffff30;
    border-radius: 50%;
    color: #fff;
    text-shadow: none;
}
:is(#topbar, .ome-mobile-social-row) .ome-topbar-community a:hover { filter: brightness(1.17); }
:is(#topbar, .ome-mobile-social-row) .ome-topbar-community svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; }
:is(#topbar, .ome-mobile-social-row) .ome-social-facebook { background: #28588d; }
:is(#topbar, .ome-mobile-social-row) .ome-social-youtube { background: #a92130; }
:is(#topbar, .ome-mobile-social-row) .ome-social-discord { background: #4754aa; }
:is(#topbar, .ome-mobile-social-row) .ome-topbar-clock {
    display: grid;
    gap: 2px;
    line-height: 1;
    white-space: nowrap;
}
:is(#topbar, .ome-mobile-social-row) .ome-topbar-clock[hidden] { display: none; }
:is(#topbar, .ome-mobile-social-row) .ome-clock-date {
    color: #d8bc83;
    font: 700 10px/1.15 Arial, sans-serif;
    letter-spacing: .06em;
    text-transform: uppercase;
}
:is(#topbar, .ome-mobile-social-row) .ome-clock-time {
    color: #e5edf8;
    font: 700 18px/1 Arial, sans-serif;
    font-variant-numeric: tabular-nums;
}
@media (pointer: coarse) {
    :is(#topbar, .ome-mobile-social-row) .ome-topbar-community a { width: 44px; height: 44px; }
}
#topbar a.ome-account-identity { text-decoration: none; }
#topbar a.ome-account-identity:hover { border-color: #bd9b63; }
#topbar .ome-account-identity-copy { flex: 1 1 auto; min-width: 0; margin: 0; }
#topbar .ome-profile-arrow { color: #e8c886; font-size: 21px; }

#topbar .ome-mobile-quick { display: none; }

@media (max-width: 1000px) {
    .ome-mobile-header-ready #topbar .topbar-inner { min-height: 0; padding-block: 5px !important; }
    .ome-mobile-header-ready #topbar .topbar-inner .ome-account-tools {
        width: 100% !important;
        justify-content: flex-end;
        flex-wrap: nowrap;
        gap: 5px;
    }
    .ome-mobile-header-ready #topbar .ome-mobile-quick { display: inline-flex; }
    .ome-mobile-header-ready #topbar .ome-mobile-home { margin-inline-end: auto; }
    .ome-mobile-header-ready #topbar .ome-account-tools > .ome-account-control,
    .ome-mobile-header-ready #topbar .ome-account-dropdown > summary {
        box-sizing: border-box;
        min-width: 44px;
        min-height: 44px;
        padding: 5px 7px;
    }
    .ome-mobile-header-ready #topbar :is(.ome-mobile-account-label, .ome-account-name) {
        position: absolute;
        width: 1px;
        height: 1px;
        clip-path: inset(50%);
        overflow: hidden;
        white-space: nowrap;
    }
    .ome-mobile-header-ready #header.ome-top-navigation .nav_menu.mobile { display: none; }
    .ome-mobile-social-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        padding: 0 14px;
        border-bottom: 1px solid #b18b3529;
        background: #11191d;
    }
    #my-page .ome-mobile-social-row .ome-topbar-community {
        flex-wrap: nowrap;
        gap: 0;
        margin-inline-start: -7px;
    }
    #my-page .ome-mobile-social-row .ome-topbar-community a {
        width: 44px;
        height: 44px;
        padding: 7px;
        border: 0;
        background-clip: content-box;
    }
    #my-page .ome-mobile-social-row .ome-topbar-community svg {
        width: 15px;
        height: 15px;
    }
    #my-page .ome-mobile-social-row .ome-topbar-clock { text-align: right; }
    #my-page .ome-mobile-social-row .ome-clock-date {
        font-size: 9px;
        letter-spacing: .02em;
    }
    #my-page .ome-mobile-social-row .ome-clock-time { font-size: 14px; }
}

@media (max-width: 1000px) {
    /* Position both account popovers against the full topbar row. */
    body #topbar .topbar-inner .ome-account-tools,
    body #topbar .ome-account-tools > .ome-account-dropdown {
        position: static !important;
    }
    body #topbar .ome-account-dropdown > .ome-account-popover {
        inset: calc(100% + 6px) 0 auto;
        width: min(340px, calc(100% - 16px));
        margin-inline: auto;
    }
}
